Commit Graph

13 Commits

Author SHA1 Message Date
btheado 86d45f1c3d
Request permission to protect local storage from eviction (#7398)
* Request the browser to never evict the persistent storage

* Store browser storage persisted state in a tiddler

* Factor out some code into helper functions

* Display status of persistence request in the settings page
2023-06-13 10:50:00 +01:00
fkmiec 005dfdadf0
Automatic sync of tiddler changes in browser storage when sync connection is re-established (#7169)
* Add automatic sync of tiddler changes in browswer-storage on restoration of server connection in tiddlywebadaptor

* Fix issue with new tiddlers not being synced.

* Fix issue with new tiddlers not being synced.

* Added logging

* Modified browser-storage plugin. Refactored into utility class.

* Modified browser-storage plugin. Refactored into utility class.

* Fix: browser storage config tiddler created on load only if not already exists

* Fix: Removed extra indent in util.js
2023-01-17 22:12:18 +00:00
jeremy@jermolene.com 8fabcabebb Browserstorage plugin: don't crash if local storage not available
Fix #6701
2022-05-21 15:36:23 +01:00
btheado 8a9d48e055
Allow browser storage plugin to delete existing tiddlers (#6625)
* Do not remove localstorage items while looping

While looping over all the browser storage items by index, the items
should not be removed because removing alters the index positions. The
item following the removed one will be skipped by the loop.

Instead, accumulate a list of keys to remove and remove them after the
loop.

* Implement full delete support for browser storage plugin

Before, deletes only worked for tiddlers which are only present in the
localstorage. Now deleted tiddlers are marked in localstorage using an
empty string value.

At startup, the localstorage tiddlers with empty strings will be deleted
from the wiki if they are still present. If they are already gone from
the wiki, then the blank localstorage entry will be deleted.

* Document drawbacks to using '[all[]]' and provide an alternative
2022-04-12 22:11:37 +01:00
jeremy@jermolene.com 7e964e9501 Browser-storage: Fix startup constraints
The use of $tw.perf requires the "startup" startup module to be executed first.
2020-08-11 12:32:39 +01:00
Jeremy Ruston c80fcf19c0 More browser storage fixes
See 698733a4a
2019-05-29 09:37:48 +01:00
Jermolene dd4305d520 Browser-storage: Only delete our own items
We should only delete our own items because browsers share local storage with all file:// URIs
2019-03-03 11:30:14 +00:00
Jermolene a6875df7ef Browser-storage: Add enable/disable and clear button 2019-03-01 22:06:14 +00:00
Jermolene 2710fae71d BrowserStorage: Use path to make unique item names for non-file URIs
Previously, we were only using the path to disambiguate files on a file:// URI. That meant that all wikis on tiddlywiki.com was sharing the same pool of local storage...
2019-02-08 15:19:20 +00:00
Jermolene 5577f7a4fe BrowserStorage: Add support for a custom quota exceeded message 2019-02-07 14:46:23 +00:00
Jermolene 51b4f63c5c BrowserStorage: Add a filter to determine which tiddlers are saved 2019-02-07 14:35:25 +00:00
Jermolene 6f5f9ca2fb Browser-storage: Handle quota exceeded error 2019-02-03 17:29:32 +00:00
Jermolene e31c5563ff BrowserStorage: A new plugin to save tiddlers to local storage
Experimental at this point.
2019-02-03 12:51:15 +00:00