Move support messages to top of settings panel; remove 'Show Support Message' preference. #586

This commit is contained in:
ccd0 2015-12-03 21:31:16 -08:00
parent 96a72c9067
commit 4dfa4d6a19
4 changed files with 24 additions and 16 deletions

View File

@ -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/.'

View File

@ -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 = []

View File

@ -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('<legend>Warnings</legend><ul></ul>') %>
$.add $('ul', fs), warnings
$.add section, fs
items = {}
inputs = {}
for key, obj of Config.main

View File

@ -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;
}