Dyllon,

I'm unable to get the hash comparison to work. Every time I save, I see a
log message about there being no known hash:

$:/plugins/slaymaker1907/browser-nativesaver/saver.js:464 Saving with
method 'autosave'
$:/plugins/slaymaker1907/browser-nativesaver/saver.js:77 Input saver style
[] is not recognized, using default of SingleFile.
$:/core/modules/utils/logger.js:52  saver-handler: Saving wiki with method
autosave through saver slaymaker1907/browser-nativesaver
$:/plugins/slaymaker1907/browser-nativesaver/saver.js:379 No previous known
hash to compare against
$:/plugins/slaymaker1907/browser-nativesaver/saver.js:413 Creating
writable...
$:/plugins/slaymaker1907/browser-nativesaver/saver.js:415 Created writable
$:/plugins/slaymaker1907/browser-nativesaver/saver.js:418 Wrote data
successfully
$:/plugins/slaymaker1907/browser-nativesaver/saver.js:422 Closed writable
$:/plugins/slaymaker1907/browser-nativesaver/saver.js:485 Successfully
saved to file system


I never see the "Computing hash of text to save..." message in the log.

Also, when I click the "Reset file save location" button, nothing in the
indexdb gets deleted. The button doesn't seem to have any effect in spite
of the log messages:

$:/plugins/slaymaker1907/browser-nativesaver/saver.js:495 Reseting file
saver...
$:/plugins/slaymaker1907/browser-nativesaver/saver.js:506 Reset file save
location.

Brian

On Fri, Feb 4, 2022 at 11:12 PM Brian Theado <[email protected]> wrote:

> I tried it and it worked for me. Nice job. From both a file: url and a
> localhost url I was able to save and reload. I was also able to save the
> file handle in the indexdb. I didn't try any of the other new features.
>
> But even when I had the file handle saved in indexdb, the settings modal
> still comes every reload.  I'm not sure I understand the intended workflow,
> but it seems like it would be less confusing if the modal would only come
> when the indexdb file handle is missing. Is that possible?
>
> Also, I notice you implemented the reset-file-saver message handler as a
> TW widget. In other code (i.e.
> https://github.com/Jermolene/TiddlyWiki5/blob/master/plugins/tiddlywiki/browser-storage/startup.js)
> I've seen it implemented via a startup module. Any thoughts on that?
>
> On Fri, Feb 4, 2022 at 6:11 PM Dyllon Gagnier <[email protected]>
> wrote:
>
>> This is a plugin I've been working on for a while that allows you to save
>> your wiki to the file system without downloading a new file each time and
>> without requiring an external program besides the browser. It currently
>> only works in Chromium (desktop) browsers such as Edge/Chrome since they
>> are the only browsers which support the necessary APIs (though others may
>> support it once the APIs are fully standardized).
>>
>> You can see File System Access API | Can I use... Support tables for
>> HTML5, CSS3, etc <https://caniuse.com/native-filesystem-api> for
>> browsers which will probably work. I have not tested it on Safari so if you
>> try it out there, let me know how it goes.
>>
>> I've implemented several new major features for  
>> slaymaker1907/TW5-browser-nativesaver
>> (github.com) <https://github.com/slaymaker1907/TW5-browser-nativesaver> for
>> those who are interested.
>>
>>    - By default, the plugin now checks for file consistency issues (such
>>    as having the same wiki open in multiple tabs).
>>    - I've softened a bit on the security implications of saving file
>>    handles to IndexedDB when the wiki is served from file://. You can now
>>    avoid selecting the file each time via a setting.
>>    - In addition to the default saver style, you can also have a save
>>    trail of versions under a backups folder. It's a bit clunky though so I
>>    would still recommend using a separate backup system for your wiki.
>>    - The plugin shows a settings modal at load time. The plugin needs an
>>    interaction event (such as a click) to use parts of the file system API 
>> and
>>    I found it takes me out of the flow to have the file picker show up after
>>    I've edited a tiddler.
>>
>> The new API for triggering modals from JS is pretty nice, but let me know
>> if there is a way to trigger modals in a way that works with older wikis.
>> I'm using "$tw.modal.display(tiddlerTitle)", but this seems to be new to
>> 5.2.1.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "TiddlyWiki" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/tiddlywiki/92d16d9f-002e-4417-a1fa-42e869d7c143n%40googlegroups.com
>> <https://groups.google.com/d/msgid/tiddlywiki/92d16d9f-002e-4417-a1fa-42e869d7c143n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/CAO5X8Cz_nwF_ZLHdm-V-n8fJ-m3PDpckAhrX%2BPnsYFXF2v5eQA%40mail.gmail.com.

Reply via email to