mirror of
https://github.com/zadam/trilium.git
synced 2025-11-16 10:15:52 +01:00
refactored options_init to options on frontend
This commit is contained in:
@@ -2,7 +2,7 @@ import server from "../../services/server.js";
|
||||
import utils from "../../services/utils.js";
|
||||
import cssLoader from "../../services/css_loader.js";
|
||||
import zoomService from "../../services/zoom.js";
|
||||
import optionsInit from "../../services/options_init.js";
|
||||
import optionsService from "../../services/options.js";
|
||||
|
||||
export default class ApperanceOptions {
|
||||
constructor() {
|
||||
@@ -45,7 +45,7 @@ export default class ApperanceOptions {
|
||||
const hideTabRowForOneTab = this.$oneTabDisplaySelect.val() === 'hide' ? 'true' : 'false';
|
||||
|
||||
server.put('options/hideTabRowForOneTab/' + hideTabRowForOneTab)
|
||||
.then(optionsInit.reloadOptions);
|
||||
.then(optionsService.reloadOptions);
|
||||
});
|
||||
|
||||
this.$leftPaneMinWidth.change(async () => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import optionsInit from "../../services/options_init.js";
|
||||
import optionsService from "../../services/options.js";
|
||||
import server from "../../services/server.js";
|
||||
import infoService from "../../services/info.js";
|
||||
|
||||
@@ -18,7 +18,7 @@ export default class ProtectedSessionOptions {
|
||||
const protectedSessionTimeout = this.$protectedSessionTimeout.val();
|
||||
|
||||
server.put('options', { 'protectedSessionTimeout': protectedSessionTimeout }).then(() => {
|
||||
optionsInit.reloadOptions();
|
||||
optionsService.reloadOptions();
|
||||
|
||||
infoService.showMessage("Options change have been saved.");
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import libraryLoader from "../../services/library_loader.js";
|
||||
import server from "../../services/server.js";
|
||||
import optionsInit from "../../services/options_init.js";
|
||||
import optionsService from "../../services/options.js";
|
||||
|
||||
export default class SidebarOptions {
|
||||
constructor() {
|
||||
@@ -28,7 +28,7 @@ export default class SidebarOptions {
|
||||
|
||||
await server.put('options/showSidebarInNewTab/' + flag);
|
||||
|
||||
optionsInit.reloadOptions();
|
||||
optionsService.reloadOptions();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ export default class SidebarOptions {
|
||||
|
||||
await server.put('options', opts);
|
||||
|
||||
optionsInit.reloadOptions();
|
||||
optionsService.reloadOptions();
|
||||
}
|
||||
|
||||
parseJsonSafely(str) {
|
||||
|
||||
Reference in New Issue
Block a user