If you click the save button, it will simply save a HTML file. To allow save offline, I need to add a SyncAdaptor that will sent single tiddler via HTTP request, then service worker can use
workbox-background-sync strategy to wait for onlien,
and use cache to hode changes locally, if you reopen the app and it is still offline, syncadaptor can retch skinnytiddlers and changed tiddlers from service worker Cache API.
So to make it a read-write PWA, we need to use SyncAdaptor instead of Saver. And need to implement Cache and background-sync.
I'm using Github to store tiddlers now, so I hope there can be a Github SyncAdaptor (and with multiple repo support, so I can save tiddlers tagged with "private" to be saved to a private repo)
With Github SyncAdaptor, I can make it a read-write app that works offline and resync upon reconnect.
---
I'm currently working on a NodeJS version of TiddlerDesktop (using WebCatalog app), that can save tiddlers instead of save HTML, this will works good with Github SyncAdaptor in the future.
在 2020年4月20日星期一 UTC+8下午12:02:54,TonyM写道: