config dialog tweaks
* same icon in manager (didn't change the editor config icons as those aren't for usercss) * "external" icon for USO styles to avoid confusion (opening a tab is an extremely different action) * smaller paddings in popup * removed hover effect on label text (necause native <select> elements cannot be expanded from js) * various fixups
This commit is contained in:
parent
543132aafa
commit
38e0937f45
|
@ -93,9 +93,7 @@
|
||||||
|
|
||||||
<template data-id="configureIcon">
|
<template data-id="configureIcon">
|
||||||
<span class="configure-usercss" i18n-title="configureStyle">
|
<span class="configure-usercss" i18n-title="configureStyle">
|
||||||
<svg class="svg-icon configure" viewBox="0 0 16 16">
|
<svg class="svg-icon config"><use xlink:href="#svg-icon-config"></use></svg>
|
||||||
<path d="M8,0C7.6,0,7.3,0,6.9,0.1v2.2C6.1,2.5,5.4,2.8,4.8,3.2L3.2,1.6c-0.6,0.4-1.1,1-1.6,1.6l1.6,1.6C2.8,5.4,2.5,6.1,2.3,6.9H0.1C0,7.3,0,7.6,0,8c0,0.4,0,0.7,0.1,1.1h2.2c0.1,0.8,0.4,1.5,0.9,2.1l-1.6,1.6c0.4,0.6,1,1.1,1.6,1.6l1.6-1.6c0.6,0.4,1.4,0.7,2.1,0.9v2.2C7.3,16,7.6,16,8,16c0.4,0,0.7,0,1.1-0.1v-2.2c0.8-0.1,1.5-0.4,2.1-0.9l1.6,1.6c0.6-0.4,1.1-1,1.6-1.6l-1.6-1.6c0.4-0.6,0.7-1.4,0.9-2.1h2.2C16,8.7,16,8.4,16,8c0-0.4,0-0.7-0.1-1.1h-2.2c-0.1-0.8-0.4-1.5-0.9-2.1l1.6-1.6c-0.4-0.6-1-1.1-1.6-1.6l-1.6,1.6c-0.6-0.4-1.4-0.7-2.1-0.9V0.1C8.7,0,8.4,0,8,0z M8,4.3c2.1,0,3.7,1.7,3.7,3.7c0,0,0,0,0,0c0,2.1-1.7,3.7-3.7,3.7c0,0,0,0,0,0c-2.1,0-3.7-1.7-3.7-3.7c0,0,0,0,0,0C4.3,5.9,5.9,4.3,8,4.3C8,4.3,8,4.3,8,4.3z"></path>
|
|
||||||
</svg>
|
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -356,6 +354,10 @@
|
||||||
<title i18n-text="helpAlt"></title>
|
<title i18n-text="helpAlt"></title>
|
||||||
<path fill-rule="evenodd" d="M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"></path>
|
<path fill-rule="evenodd" d="M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"></path>
|
||||||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8c0.2,0.2,0.2,0.4,0,0.6l-0.3,0.3c-0.2,0.2-0.4,0.2-0.6,0l-0.8-0.8c-0.7,0.5-1.4,0.8-2.3,0.9v1.2c0,0.2-0.2,0.4-0.4,0.4H6.8c-0.2,0-0.4-0.2-0.4-0.4v-1.2c-0.8-0.1-1.6-0.4-2.3-0.9l-0.8,0.8c-0.2,0.2-0.4,0.2-0.6,0l-0.3-0.3c-0.2-0.2-0.2-0.4,0-0.6l0.8-0.8C2.8,9.2,2.5,8.4,2.4,7.6H1.2C1,7.6,0.8,7.4,0.8,7.2V6.8c0-0.2,0.2-0.4,0.4-0.4h1.2c0.1-0.8,0.4-1.6,0.9-2.3L2.5,3.3c-0.2-0.2-0.2-0.4,0-0.6l0.3-0.3c0.2-0.2,0.4-0.2,0.6,0l0.8,0.8c0.7-0.5,1.4-0.8,2.3-0.9V1.2C6.4,1,6.6,0.8,6.8,0.8L6.8,0.8z M7,3.6C5.1,3.6,3.6,5.1,3.6,7c0,0,0,0,0,0c0,1.9,1.5,3.4,3.4,3.4c1.9,0,3.4-1.5,3.4-3.4C10.4,5.1,8.9,3.6,7,3.6C7,3.6,7,3.6,7,3.6z M7,4.8c1.2,0,2.2,1,2.2,2.2c0,1.2-1,2.2-2.2,2.2c-1.2,0-2.2-1-2.2-2.2C4.8,5.8,5.8,4.8,7,4.8z"/>
|
||||||
|
</symbol>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -1,4 +1,16 @@
|
||||||
/* config dialog */
|
#stylus-popup #message-box-contents {
|
||||||
|
padding: .25rem .75rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
#stylus-popup .config-body label {
|
||||||
|
padding: .5em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#stylus-popup .config-body label > :first-child {
|
||||||
|
max-width: 140px;
|
||||||
|
min-width: 140px;
|
||||||
|
}
|
||||||
|
|
||||||
.config-heading {
|
.config-heading {
|
||||||
float: right;
|
float: right;
|
||||||
margin: -1.25rem 0 0 0;
|
margin: -1.25rem 0 0 0;
|
||||||
|
@ -36,11 +48,6 @@
|
||||||
cursor: default;
|
cursor: default;
|
||||||
}
|
}
|
||||||
|
|
||||||
.config-body label:not([disabled]):hover > :first-child {
|
|
||||||
text-shadow: 0 0 0.01px rgba(0, 0, 0, .25);
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.config-dialog .dirty:after {
|
.config-dialog .dirty:after {
|
||||||
content: "*";
|
content: "*";
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -56,11 +63,12 @@
|
||||||
.config-body .onoffswitch {
|
.config-body .onoffswitch {
|
||||||
width: var(--onoffswitch-width);
|
width: var(--onoffswitch-width);
|
||||||
margin: 0;
|
margin: 0;
|
||||||
height: 2em;
|
height: 22px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.config-body input[type="text"],
|
||||||
.config-body .select-resizer,
|
.config-body .select-resizer,
|
||||||
.config-body select {
|
.config-body select {
|
||||||
width: auto;
|
width: auto;
|
||||||
|
|
|
@ -75,7 +75,7 @@ function configDialog(style) {
|
||||||
if (va) {
|
if (va) {
|
||||||
va.dirty = varsInitial[va.name] !== (isDefault(va) ? va.default : va.value);
|
va.dirty = varsInitial[va.name] !== (isDefault(va) ? va.default : va.value);
|
||||||
if (prefs.get('config.autosave')) {
|
if (prefs.get('config.autosave')) {
|
||||||
debounce(save, 100);
|
debounce(save);
|
||||||
} else {
|
} else {
|
||||||
target.closest('label').classList.toggle('dirty', va.dirty);
|
target.closest('label').classList.toggle('dirty', va.dirty);
|
||||||
updateButtons();
|
updateButtons();
|
||||||
|
@ -272,10 +272,10 @@ function configDialog(style) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function adjustSizeForPopup(box) {
|
function adjustSizeForPopup(box) {
|
||||||
box.style = 'white-space: nowrap !important';
|
const contents = box.firstElementChild;
|
||||||
box.firstElementChild.style = 'max-width: none; max-height: none;'.replace(/;/g, '!important;');
|
contents.style = 'max-width: none; max-height: none;'.replace(/;/g, '!important;');
|
||||||
const {offsetWidth, offsetHeight} = box.firstElementChild;
|
let {offsetWidth: width, offsetHeight: height} = contents;
|
||||||
box.style = box.firstElementChild.style = '';
|
contents.style = '';
|
||||||
|
|
||||||
const colorpicker = document.body.appendChild(
|
const colorpicker = document.body.appendChild(
|
||||||
$create('.colorpicker-popup', {style: 'display: none!important'}));
|
$create('.colorpicker-popup', {style: 'display: none!important'}));
|
||||||
|
@ -283,8 +283,8 @@ function configDialog(style) {
|
||||||
const MIN_HEIGHT = 250;
|
const MIN_HEIGHT = 250;
|
||||||
colorpicker.remove();
|
colorpicker.remove();
|
||||||
|
|
||||||
const width = Math.max(Math.min(offsetWidth / 0.9 + 2, 800), MIN_WIDTH);
|
width = Math.max(Math.min(width / 0.9 + 2, 800), MIN_WIDTH);
|
||||||
const height = Math.max(Math.min(offsetHeight / 0.9 + 2, 600), MIN_HEIGHT);
|
height = Math.max(Math.min(height / 0.9 + 2, 600), MIN_HEIGHT);
|
||||||
document.body.style.setProperty('min-width', width + 'px', 'important');
|
document.body.style.setProperty('min-width', width + 'px', 'important');
|
||||||
document.body.style.setProperty('min-height', height + 'px', 'important');
|
document.body.style.setProperty('min-height', height + 'px', 'important');
|
||||||
}
|
}
|
||||||
|
|
|
@ -139,7 +139,7 @@ select {
|
||||||
margin-left: .5ex;
|
margin-left: .5ex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.svg-icon.configure {
|
.svg-icon.config {
|
||||||
width: 16px;
|
width: 16px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
}
|
}
|
||||||
|
|
16
popup.html
16
popup.html
|
@ -33,9 +33,7 @@
|
||||||
<a href="#" class="enable" i18n-text="enableStyleLabel"></a>
|
<a href="#" class="enable" i18n-text="enableStyleLabel"></a>
|
||||||
<a href="#" class="disable" i18n-text="disableStyleLabel"></a>
|
<a href="#" class="disable" i18n-text="disableStyleLabel"></a>
|
||||||
<a href="#" class="configure" i18n-title="configureStyle">
|
<a href="#" class="configure" i18n-title="configureStyle">
|
||||||
<svg class="svg-icon config" viewBox="0 0 14 16">
|
<svg class="svg-icon config"><use xlink:href="#svg-icon-config"></use></svg>
|
||||||
<path d="m6.2578 1.1191c-0.4526 0-0.81641 0.36381-0.81641 0.81641v0.69531a5.5932 5.5932 0 0 0-1.1328 0.47266l-0.49414-0.49414c-0.16002-0.16002-0.36907-0.24023-0.57812-0.24023-0.20905 0-0.41811 0.080216-0.57812 0.24023l-1.0488 1.0488c-0.32004 0.32004-0.32004 0.83621 0 1.1562l0.49023 0.49023a5.5932 5.5932 0 0 0-0.4668 1.1348h-0.69726c-0.4526 0-0.81641 0.36576-0.81641 0.81836v1.4844c0 0.4526 0.36381 0.81641 0.81641 0.81641h0.69726a5.5932 5.5932 0 0 0 0.4707 1.1328l-0.49414 0.49414c-0.32004 0.32004-0.32004 0.83426 0 1.1543l1.0488 1.0508c0.32004 0.32003 0.83621 0.32003 1.1562 0l0.49023-0.49024a5.5932 5.5932 0 0 0 1.1367 0.4668v0.69727c0 0.4526 0.36381 0.81641 0.81641 0.81641h1.4844c0.4526 0 0.81641-0.36381 0.81641-0.81641v-0.69727a5.5932 5.5932 0 0 0 1.1328-0.4707l0.49414 0.49414c0.32004 0.32003 0.83622 0.32003 1.1562 0l1.0488-1.0508c0.32004-0.32004 0.32004-0.83426 0-1.1543l-0.49023-0.49023a5.5932 5.5932 0 0 0 0.4668-1.1367h0.69726c0.4526 0 0.81641-0.36381 0.81641-0.81641v-1.4844c0-0.4526-0.36381-0.81836-0.81641-0.81836h-0.69726a5.5932 5.5932 0 0 0-0.4707-1.1309l0.49414-0.49414c0.32004-0.32004 0.32004-0.83621 0-1.1562l-1.0488-1.0488c-0.16002-0.16002-0.36907-0.24023-0.57812-0.24023s-0.41811 0.080216-0.57812 0.24023l-0.49023 0.49023a5.5932 5.5932 0 0 0-1.1367-0.4668v-0.69727c0-0.4526-0.36381-0.81641-0.81641-0.81641zm0.56836 0.7793h0.34766c0.22291 0 0.40234 0.17943 0.40234 0.40234v1.1621a4.5763 4.5763 0 0 1 2.2227 0.92383l0.82422-0.82422c0.15762-0.15762 0.41074-0.15762 0.56836 0l0.24609 0.24609c0.15762 0.15762 0.15762 0.41074 0 0.56836l-0.82226 0.82227a4.5763 4.5763 0 0 1 0.91797 2.2246h1.166c0.22291 0 0.40234 0.17943 0.40234 0.40234v0.34766c0 0.22291-0.17943 0.40234-0.40234 0.40234h-1.1641a4.5763 4.5763 0 0 1-0.92188 2.2227l0.82422 0.82422c0.15762 0.15762 0.15762 0.41074 0 0.56836l-0.24609 0.24609c-0.15762 0.15763-0.41074 0.15763-0.56836 0l-0.82227-0.82226a4.5763 4.5763 0 0 1-2.2246 0.91797v1.166c0 0.22291-0.17943 0.40234-0.40234 0.40234h-0.34766c-0.22291 0-0.40234-0.17943-0.40234-0.40234v-1.1641a4.5763 4.5763 0 0 1-2.2227-0.92188l-0.82422 0.82422c-0.15762 0.15763-0.41074 0.15763-0.56836 0l-0.24609-0.24609c-0.15762-0.15762-0.15762-0.41074 0-0.56836l0.82226-0.82226a4.5763 4.5763 0 0 1-0.91797-2.2246h-1.166c-0.22291 0-0.40234-0.17943-0.40234-0.40234v-0.34766c0-0.22291 0.17943-0.40234 0.40234-0.40234h1.1641a4.5763 4.5763 0 0 1 0.92188-2.2227l-0.82422-0.82422c-0.15762-0.15762-0.15762-0.41074 0-0.56836l0.24609-0.24609c0.15762-0.15762 0.41074-0.15762 0.56836 0l0.82227 0.82227a4.5763 4.5763 0 0 1 2.2246-0.91797v-1.166c0-0.22291 0.17943-0.40234 0.40234-0.40234zm0.17383 2.7109a3.3898 3.3898 0 0 0-3.3906 3.3906 3.3898 3.3898 0 0 0 3.3906 3.3887 3.3898 3.3898 0 0 0 3.3906-3.3887 3.3898 3.3898 0 0 0-3.3906-3.3906zm0 1.1875a2.2034 2.2034 0 0 1 2.2031 2.2031 2.2034 2.2034 0 0 1-2.2031 2.2031 2.2034 2.2034 0 0 1-2.2031-2.2031 2.2034 2.2034 0 0 1 2.2031-2.2031z"/>
|
|
||||||
</svg>
|
|
||||||
</a>
|
</a>
|
||||||
<a class="style-edit-link" href="edit.html?id=" i18n-title="editStyleLabel">
|
<a class="style-edit-link" href="edit.html?id=" i18n-title="editStyleLabel">
|
||||||
<svg class="svg-icon edit" viewBox="0 0 14 16">
|
<svg class="svg-icon edit" viewBox="0 0 14 16">
|
||||||
|
@ -156,6 +154,18 @@
|
||||||
<symbol id="svg-icon-checked" viewBox="0 0 1000 1000">
|
<symbol id="svg-icon-checked" viewBox="0 0 1000 1000">
|
||||||
<path fill-rule="evenodd" d="M983.2,184.3L853,69.8c-4-3.5-9.3-5.3-14.5-5c-5.3,0.4-10.3,2.8-13.8,6.8L352.3,609.2L184.4,386.9c-3.2-4.2-8-7-13.2-7.8c-5.3-0.8-10.6,0.6-14.9,3.9L18,487.5c-8.8,6.7-10.6,19.3-3.9,28.1L325,927.2c3.6,4.8,9.3,7.7,15.3,8c0.2,0,0.5,0,0.7,0c5.8,0,11.3-2.5,15.1-6.8L985,212.6C992.3,204.3,991.5,191.6,983.2,184.3z"/>
|
<path fill-rule="evenodd" d="M983.2,184.3L853,69.8c-4-3.5-9.3-5.3-14.5-5c-5.3,0.4-10.3,2.8-13.8,6.8L352.3,609.2L184.4,386.9c-3.2-4.2-8-7-13.2-7.8c-5.3-0.8-10.6,0.6-14.9,3.9L18,487.5c-8.8,6.7-10.6,19.3-3.9,28.1L325,927.2c3.6,4.8,9.3,7.7,15.3,8c0.2,0,0.5,0,0.7,0c5.8,0,11.3-2.5,15.1-6.8L985,212.6C992.3,204.3,991.5,191.6,983.2,184.3z"/>
|
||||||
</symbol>
|
</symbol>
|
||||||
|
|
||||||
|
<symbol id="svg-icon-select-arrow" viewBox="0 0 1792 1792">
|
||||||
|
<path fill-rule="evenodd" d="M1408 704q0 26-19 45l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0,0.2-0.2,0.4-0.4,0.4h-1.2c-0.1,0.8-0.4,1.6-0.9,2.3l0.8,0.8c0.2,0.2,0.2,0.4,0,0.6l-0.3,0.3c-0.2,0.2-0.4,0.2-0.6,0l-0.8-0.8c-0.7,0.5-1.4,0.8-2.3,0.9v1.2c0,0.2-0.2,0.4-0.4,0.4H6.8c-0.2,0-0.4-0.2-0.4-0.4v-1.2c-0.8-0.1-1.6-0.4-2.3-0.9l-0.8,0.8c-0.2,0.2-0.4,0.2-0.6,0l-0.3-0.3c-0.2-0.2-0.2-0.4,0-0.6l0.8-0.8C2.8,9.2,2.5,8.4,2.4,7.6H1.2C1,7.6,0.8,7.4,0.8,7.2V6.8c0-0.2,0.2-0.4,0.4-0.4h1.2c0.1-0.8,0.4-1.6,0.9-2.3L2.5,3.3c-0.2-0.2-0.2-0.4,0-0.6l0.3-0.3c0.2-0.2,0.4-0.2,0.6,0l0.8,0.8c0.7-0.5,1.4-0.8,2.3-0.9V1.2C6.4,1,6.6,0.8,6.8,0.8L6.8,0.8z M7,3.6C5.1,3.6,3.6,5.1,3.6,7c0,0,0,0,0,0c0,1.9,1.5,3.4,3.4,3.4c1.9,0,3.4-1.5,3.4-3.4C10.4,5.1,8.9,3.6,7,3.6C7,3.6,7,3.6,7,3.6z M7,4.8c1.2,0,2.2,1,2.2,2.2c0,1.2-1,2.2-2.2,2.2c-1.2,0-2.2-1-2.2-2.2C4.8,5.8,5.8,4.8,7,4.8z"/>
|
||||||
|
</symbol>
|
||||||
|
|
||||||
|
<symbol id="svg-icon-config-uso" viewBox="0 0 14 14">
|
||||||
|
<path d="M2,3h4v2H4v6h6V9h2v4H2V3z M8,1h6v6l-2.2-2.2l-4,4L6.2,7.2l4-4L8,1z"/>
|
||||||
|
</symbol>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -282,6 +282,7 @@ function createStyleElement({
|
||||||
if (!style.usercssData && style.updateUrl && style.updateUrl.includes('?') && style.url) {
|
if (!style.usercssData && style.updateUrl && style.updateUrl.includes('?') && style.url) {
|
||||||
config.href = style.url;
|
config.href = style.url;
|
||||||
config.target = '_blank';
|
config.target = '_blank';
|
||||||
|
$('use', config).attributes['xlink:href'].nodeValue = '#svg-icon-config-uso';
|
||||||
} else if (!style.usercssData || !Object.keys(style.usercssData.vars || {}).length) {
|
} else if (!style.usercssData || !Object.keys(style.usercssData.vars || {}).length) {
|
||||||
config.style.display = 'none';
|
config.style.display = 'none';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user