From 4dfa4d6a196aff7bb2c411c769ac06677f022eeb Mon Sep 17 00:00:00 2001 From: ccd0 Date: Thu, 3 Dec 2015 21:31:16 -0800 Subject: [PATCH] Move support messages to top of settings panel; remove 'Show Support Message' preference. #586 --- src/General/Config.coffee | 4 ---- src/General/Main.coffee | 12 ------------ src/General/Settings.coffee | 14 ++++++++++++++ src/css/style.css | 10 ++++++++++ 4 files changed, 24 insertions(+), 16 deletions(-) diff --git a/src/General/Config.coffee b/src/General/Config.coffee index 8f5ebcc59..f9597c95a 100644 --- a/src/General/Config.coffee +++ b/src/General/Config.coffee @@ -109,10 +109,6 @@ Config = false 'Indicate spoilers if Remove Spoilers is enabled, or make the text appear hovered if Remove Spoiler is disabled.' ] - 'Show Support Message': [ - true - 'Warn if your browser or configuration is unsupported and may cause <%= meta.name %> to not operate correctly.' - ] 'Normalize URL': [ true 'Rewrite the URL of the current page, removing slugs and excess slashes, and changing /res/ to /thread/.' diff --git a/src/General/Main.coffee b/src/General/Main.coffee index e5611f461..8d56586e8 100644 --- a/src/General/Main.coffee +++ b/src/General/Main.coffee @@ -208,18 +208,6 @@ Main = else $.event '4chanXInitFinished' - if Conf['Show Support Message'] - if $.cantSync - why = if $.cantSet - 'save your settings' - else - 'synchronize settings between tabs' - new Notice 'warning', """ - <%= meta.name %> needs local storage to #{why}. - Enable it on boards.4chan.org in your browser's privacy settings - (may be listed as part of "local data" or "cookies"). - """ - initThread: -> if board = $ '.board' threads = [] diff --git a/src/General/Settings.coffee b/src/General/Settings.coffee index 007ac90e6..7ab49173a 100644 --- a/src/General/Settings.coffee +++ b/src/General/Settings.coffee @@ -97,6 +97,20 @@ Settings = $.event 'OpenSettings', null, section main: (section) -> + warnings = [] + if $.cantSync + why = if $.cantSet then 'save your settings' else 'synchronize settings between tabs' + warnings.push $.el 'li', + textContent: """ + <%= meta.name %> needs local storage to #{why}. + Enable it on boards.4chan.org in your browser's privacy settings (may be listed as part of "local data" or "cookies"). + """ + if warnings.length + fs = $.el 'fieldset', + <%= html('Warnings') %> + $.add $('ul', fs), warnings + $.add section, fs + items = {} inputs = {} for key, obj of Config.main diff --git a/src/css/style.css b/src/css/style.css index f2bced8b9..7823f8750 100644 --- a/src/css/style.css +++ b/src/css/style.css @@ -511,6 +511,16 @@ audio.controls-added { .section-advanced li { padding-left: 4px; } +.section-main ul { + margin: 0; + padding: 0 0 0 16px; +} +.section-main li { + white-space: pre-line; +} +.section-main li:not(:first-of-type) { + margin-top: 4px; +} .section-main label { text-decoration: underline; }