mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-10-05 07:31:43 +00:00
Refactor saver handler
Fixing problems caused by c4b76ceb0b:
* We still need to initialise the saver-handler even when syncing to a
server, otherwise offline snapshots can’t be saved
* We need to override the default save template a bit further up the
stack, to avoid the server side serving the offline version of the wiki
at `/`
This commit is contained in:
@@ -69,12 +69,12 @@ exports.startup = function() {
|
||||
$tw.syncadaptor = new module.adaptorClass({wiki: $tw.wiki});
|
||||
}
|
||||
});
|
||||
// Set up the syncer object if we've got a syncadaptor, otherwise setup the saverhandler
|
||||
// Set up the syncer object if we've got a syncadaptor
|
||||
if($tw.syncadaptor) {
|
||||
$tw.syncer = new $tw.Syncer({wiki: $tw.wiki, syncadaptor: $tw.syncadaptor});
|
||||
} else {
|
||||
$tw.saverHandler = new $tw.SaverHandler({wiki: $tw.wiki});
|
||||
}
|
||||
}
|
||||
// Setup the saver handler
|
||||
$tw.saverHandler = new $tw.SaverHandler({wiki: $tw.wiki, dirtyTracking: !$tw.syncadaptor});
|
||||
// Host-specific startup
|
||||
if($tw.browser) {
|
||||
// Install the popup manager
|
||||
|
||||
Reference in New Issue
Block a user