From 1a9ad1a7e3b51aeb16063d8064066999a49919f3 Mon Sep 17 00:00:00 2001 From: Al McKinlay Date: Tue, 19 Dec 2017 13:49:17 +0000 Subject: [PATCH] Add advanced toggle and hide certain settings by default --- client/js/options.js | 3 +++ client/views/windows/settings.tpl | 21 +++++++++++++++------ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/client/js/options.js b/client/js/options.js index 085ae38d..e2f05b78 100644 --- a/client/js/options.js +++ b/client/js/options.js @@ -24,6 +24,7 @@ let $warningBlocked; // Default settings const settings = { syncSettings: false, + advanced: false, autocomplete: true, nickPostfix: "", coloredNicks: true, @@ -155,6 +156,8 @@ function applySetting(name, value) { } else if (!value) { $warningBlocked.hide(); } + } else if (name === "advanced") { + $("#settings [data-advanced]").toggle(settings[name]); } } diff --git a/client/views/windows/settings.tpl b/client/views/windows/settings.tpl index f5fe5737..cf414f4b 100644 --- a/client/views/windows/settings.tpl +++ b/client/views/windows/settings.tpl @@ -4,9 +4,18 @@

Settings

+
+
+ +
+
+
{{#unless public}} -
+

Settings synchronisation @@ -71,7 +80,7 @@ Enable autocomplete

-
+
-
+
-
+
{{/unless}} {{/unless}} -
+

Custom Stylesheet

-
+