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 false
'Indicate spoilers if Remove Spoilers is enabled, or make the text appear hovered if Remove Spoiler is disabled.' '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': [ 'Normalize URL': [
true true
'Rewrite the URL of the current page, removing slugs and excess slashes, and changing /res/ to /thread/.' '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 else
$.event '4chanXInitFinished' $.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: -> initThread: ->
if board = $ '.board' if board = $ '.board'
threads = [] threads = []

View File

@ -97,6 +97,20 @@ Settings =
$.event 'OpenSettings', null, section $.event 'OpenSettings', null, section
main: (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 = {} items = {}
inputs = {} inputs = {}
for key, obj of Config.main for key, obj of Config.main

View File

@ -511,6 +511,16 @@ audio.controls-added {
.section-advanced li { .section-advanced li {
padding-left: 4px; 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 { .section-main label {
text-decoration: underline; text-decoration: underline;
} }