preserve expert setting preference

This commit is contained in:
Stewart Allen 2020-02-10 11:30:11 -05:00
commit 00fc00c3a4
2 changed files with 6 additions and 3 deletions

View file

@ -2625,9 +2625,9 @@ self.kiri.license = exports.LICENSE;
UC.newButton("save", settingsSave) UC.newButton("save", settingsSave)
],[ ],[
UI.settingsExpert = UI.settingsExpert =
UC.newButton("expert", () => { UC.setExpert(true) }, {modes:FDM, expert: false}), UC.newButton("expert", () => { UC.setExpert(true); SDB.setItem('expert', true) }, {modes:FDM, expert: false}),
UI.settingsExpert = UI.settingsExpert =
UC.newButton("basic", () => { UC.setExpert(false) }, {modes:FDM, expert: true}) UC.newButton("basic", () => { UC.setExpert(false); SDB.removeItem('expert') }, {modes:FDM, expert: true})
] ]
]), ]),
@ -3827,6 +3827,9 @@ self.kiri.license = exports.LICENSE;
// place version number a couple of places to help users // place version number a couple of places to help users
UI.helpButton.title = `${LANG.version} ` + KIRI.version; UI.helpButton.title = `${LANG.version} ` + KIRI.version;
// restore expert setting preference
UC.setExpert(SDB.getItem('expert') ? true : false);
// setup tab visibility watcher // setup tab visibility watcher
// DOC.addEventListener('visibilitychange', function() { document.title = document.hidden }); // DOC.addEventListener('visibilitychange', function() { document.title = document.hidden });

View file

@ -1,7 +1,7 @@
var exports = { var exports = {
COPYRIGHT:"Copyright (C) 2014-2019 Stewart Allen <sa@grid.space> - All Rights Reserved", COPYRIGHT:"Copyright (C) 2014-2019 Stewart Allen <sa@grid.space> - All Rights Reserved",
LICENSE:"See the license.md file included with the source distribution", LICENSE:"See the license.md file included with the source distribution",
VERSION:"1.5.7" VERSION:"1.5.8"
}; };
if (!module) var module = {}; if (!module) var module = {};
module.exports = exports; module.exports = exports;