show the power-off switch in manager

This commit is contained in:
tophf 2022-03-10 22:39:45 +03:00
parent 238b1db31e
commit 5e27f8d35a
6 changed files with 22 additions and 19 deletions

View File

@ -23,6 +23,7 @@
--accent-1: hsl(180, 100%, 95%); --accent-1: hsl(180, 100%, 95%);
--accent-3: hsl(180, 30%, 18%); --accent-3: hsl(180, 30%, 18%);
--input-bg: var(--c95); --input-bg: var(--c95);
--red1: hsl(0, 85%, 65%);
} }
textarea, textarea,
input[type=url], input[type=url],

View File

@ -33,6 +33,7 @@
--accent-1: hsl(180, 100%, 15%); --accent-1: hsl(180, 100%, 15%);
--accent-2: hsl(180, 50%, 40%); --accent-2: hsl(180, 50%, 40%);
--accent-3: hsl(180, 40%, 69%); --accent-3: hsl(180, 40%, 69%);
--red1: hsl(0, 70%, 45%);
} }
body { body {
font: normal 12px var(--family); font: normal 12px var(--family);
@ -307,6 +308,17 @@ summary {
position: absolute; position: absolute;
} }
.all-disabled #disableAll {
border-color: var(--red1);
}
.all-disabled #disableAll-label {
font-weight: bold;
color: var(--red1);
}
.all-disabled #disableAll-label .svg-icon {
fill: currentColor;
}
:focus, :focus,
.CodeMirror-focused, .CodeMirror-focused,
/* Allowing click outline on text/search inputs and textareas */ /* Allowing click outline on text/search inputs and textareas */

View File

@ -412,6 +412,10 @@ function waitForSelector(selector, {recur, stopOnDomReady = true} = {}) {
const dom = {}; const dom = {};
prefs.subscribe('disableAll', (_, val) => {
$.rootCL.toggle('all-disabled', val);
}, {runNow: true});
prefs.ready.then(() => { prefs.ready.then(() => {
waitForSelector('details[data-pref]', { waitForSelector('details[data-pref]', {
recur(elems) { recur(elems) {

View File

@ -154,6 +154,11 @@
<div id="header"> <div id="header">
<h1 id="manage-heading" i18n="manageHeading"></h1> <h1 id="manage-heading" i18n="manageHeading"></h1>
<label id="disableAll-label" i18n="disableAllStyles">
<input id="disableAll" type="checkbox">
<svg class="svg-icon checked"><use xlink:href="#svg-icon-checked"/></svg>
</label>
<div id="manage-settings"> <div id="manage-settings">
<div class="settings-column"> <div class="settings-column">
<details id="filters" data-pref="manage.filters.expanded"> <details id="filters" data-pref="manage.filters.expanded">

View File

@ -2,10 +2,6 @@
--inner-padding: 18px; /* checkbox + gap */ --inner-padding: 18px; /* checkbox + gap */
--outer-padding: 9px; --outer-padding: 9px;
--hotkey-margin: 16px; --hotkey-margin: 16px;
--red1: hsl(0, 70%, 45%);
}
[data-ui-theme="dark"] {
--red1: hsl(0, 85%, 65%);
} }
html, body { html, body {
@ -49,16 +45,6 @@ body:not(.blocked) .if-blocked,
width: fit-content; width: fit-content;
position: relative; position: relative;
} }
.all-disabled #disableAll {
border-color: var(--red1);
}
.all-disabled #disableAll-label {
font-weight: bold;
color: var(--red1);
}
.all-disabled #disableAll-label .svg-icon {
fill: currentColor;
}
.all-disabled #installed:hover + #main-actions #disableAll-label { .all-disabled #installed:hover + #main-actions #disableAll-label {
animation: .5s blink-red infinite; animation: .5s blink-red infinite;
} }

View File

@ -83,11 +83,6 @@ function toggleSideBorders(_key, state) {
/** @param {chrome.webNavigation.GetAllFrameResultDetails[]} frames */ /** @param {chrome.webNavigation.GetAllFrameResultDetails[]} frames */
async function initPopup(frames) { async function initPopup(frames) {
prefs.subscribe('popupWidth', setPopupWidth, {runNow: true}); prefs.subscribe('popupWidth', setPopupWidth, {runNow: true});
// action buttons
$('#disableAll').onchange = function () {
$.rootCL.toggle('all-disabled', this.checked);
};
setupLivePrefs(); setupLivePrefs();
const elFind = $('#find-styles-btn'); const elFind = $('#find-styles-btn');