Show which feature is force disabled in the options page
Bug: twpowertools:64
Change-Id: I11ce740d5036ccff832f39d2a0f10290b0b063aa
diff --git a/src/static/_locales/en/messages.json b/src/static/_locales/en/messages.json
index d4574c0..466dfb6 100644
--- a/src/static/_locales/en/messages.json
+++ b/src/static/_locales/en/messages.json
@@ -19,6 +19,10 @@
"message": "One or more options have been force disabled because they might not be working properly. Please go to the <a href='https://groups.google.com/g/twpowertools-discuss' rel='noreferrer noopener' target='_blank'>twpowertools-discuss Google Group</a> to learn more about why some options have been force disabled.",
"description": "Warning shown in the options page if a feature has been remotely force disabled via the kill switch mechanism. This happens when a feature doesn't work properly and might be doing dangerous things, and the maintainer or an authorized user remotely force disables the feature."
},
+ "options_killswitchenabled": {
+ "message": "The previous option has been force disabled due to an issue.",
+ "description": "Warning shown in the options page below an option, when it has been remotely force disabled via the kill switch mechanism."
+ },
"options_list": {
"message": "Enable infinite scrolling in thread lists.",
"description": "Feature checkbox in the options page"
diff --git a/src/static/options/options.css b/src/static/options/options.css
index a3cd7ab..ce79b81 100644
--- a/src/static/options/options.css
+++ b/src/static/options/options.css
@@ -24,15 +24,20 @@
cursor: pointer;
}
-.option, .kill-switch-text {
+.option, #kill-switch-warning {
margin: 4px 0;
line-height: 1.8em;
}
-.kill-switch-text {
+#kill-switch-warning, .kill-switch-label {
color: red;
}
+.kill-switch-label {
+ margin: 0 0 8px 0;
+ line-height: 1em;
+}
+
.help {
cursor: help;
border-bottom: dashed 1px gray;
diff --git a/src/static/options/options.html b/src/static/options/options.html
index 8dde2a4..8a0915a 100644
--- a/src/static/options/options.html
+++ b/src/static/options/options.html
@@ -39,7 +39,7 @@
</a>
</div>
<form>
- <div class="kill-switch-text" id="kill-switch-warning" hidden data-i18n="killswitchwarning"></div>
+ <div id="kill-switch-warning" hidden data-i18n="killswitchwarning"></div>
<div id="options-container"></div>
<div class="actions"><button id="save" data-i18n="save"></button></div>
</form>