diff options
author | Andrew Dolgov <[email protected]> | 2019-03-14 12:29:03 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2019-03-14 12:29:03 +0300 |
commit | 6d814be641fbde0f8a24901332cec34fabc93d77 (patch) | |
tree | 99f828f3c483de4fbe6f38626618245a115aa546 | |
parent | dc693b0f3e7bff8c7de68b53c1e3e4b760dd864a (diff) |
use common notation for storage keys
-rwxr-xr-x | reader.js | 19 |
1 files changed, 9 insertions, 10 deletions
@@ -15,7 +15,7 @@ function Model() { return self._themeName(); }, write: function(theme) { - localforage.setItem("THEME", theme).then(() => { + localforage.setItem("TTC:THEME", theme).then(() => { model._themeName(theme); }); } @@ -91,7 +91,7 @@ function Model() { self._zip = null; self.fileName(""); self.currentPage(-2); - localforage.setItem('LAST-OPENED-FILE', null); + localforage.setItem("TTC:LAST-OPENED-FILE", null); }; self.openFile = function (file) { @@ -121,7 +121,7 @@ function Model() { return a.entryName.localeCompare(b.entryName); }); - localforage.setItem('LAST-OPENED-FILE', file).then(() => { + localforage.setItem("TTC:LAST-OPENED-FILE", file).then(() => { self.mruList(file); self.fileName(file.split(/[\\/]/).pop()); @@ -196,7 +196,7 @@ function Model() { require('electron').remote.app.addRecentDocument(file); } - localforage.setItem("MRU-LIST", self._mruList()); + localforage.setItem("TTC:MRU-LIST", self._mruList()); } }); @@ -207,7 +207,7 @@ function Model() { return self._fitToWidth(); }, write: function(ftw) { - localforage.setItem("FIT-TO-WIDTH", ftw).then(() => { + localforage.setItem("TTC:FIT-TO-WIDTH", ftw).then(() => { self._fitToWidth(ftw); }); }, @@ -335,11 +335,11 @@ $(document).ready(function () { model.syncAccount(acct); }); - localforage.getItem("FIT-TO-WIDTH").then((ftw) => { + localforage.getItem("TTC:FIT-TO-WIDTH").then((ftw) => { model.fitToWidth(ftw); }); - localforage.getItem("THEME").then((theme) => { + localforage.getItem("TTC:THEME").then((theme) => { model.themeName(theme); }); @@ -538,14 +538,13 @@ $(document).ready(function () { } }); - localforage.getItem("MRU-LIST").then((mru) => { + localforage.getItem("TTC:MRU-LIST").then((mru) => { if (mru != null) $.each(mru, (i,e) => { model._mruList.push(e); }); - - localforage.getItem("LAST-OPENED-FILE").then((last) => { + localforage.getItem("TTC:LAST-OPENED-FILE").then((last) => { const argv = remote.process.argv; if (argv[1] && argv[1] != ".") { |