+
-
- Ratio: -- todo --
+
+
+
+
+
+ Ratio:
+
+
+
+
+
+ You can enter a ratio in width:height format (e.g. "21:9" or "1:2.39"), or just the factor
+ (in this case, "1:2.39" would become "2.39" and "21:9" would become "2.33"). You should enter
+ your numbers without quote marks. Number will be converted to factor form on save.
+
+
+
+
+ Label:
+
+
+
+
+
+ Label for the button. You can make it say something other than ratio.
+
+
+
+
+
+
+
Shortcut:
+
+
+
+
+
+ Note: Your browser and OS already use certain key combinations that involve Ctrl and Meta (Windows) keys — and, to a lesser extent, Alt.
+ The extension doesn't (and cannot) check whether the keyboard shortcut you enter is actually free for you to use. The extension also won't override
+ any keyboard shortcuts defined by the site itself.
+
-
-
-
- -- todo: edit keyboard shortcut --
-
-
- ------------ >
- present items: >
- editModeOptions? {{!!editModeOptions}}
- .crop? {{!!editModeOptions?.crop}}
- .selected? {{!!editModeOptions?.crop?.selected}}
-
- selected action: {{editModeOptions?.crop?.selected}}
-
-
-
@@ -297,6 +307,7 @@
import Button from '../../../common/components/Button.vue'
import KeyboardShortcutParser from '../../../common/js/KeyboardShortcutParser';
import ShortcutButton from '../../../common/components/ShortcutButton';
+import EditShortcutButton from '../../../common/components/EditShortcutButton';
import ComputeActionsMixin from '../../../common/mixins/ComputeActionsMixin';
import ExecAction from '../ui-libs/ExecAction';
import BrowserDetect from '../../../ext/conf/BrowserDetect';
@@ -319,7 +330,8 @@ export default {
y: 0
},
editMode: true,
- editModeOptions: {},
+ editModeOptions: {
+ },
resizerConfig: {
crop: null,
stretch: null,
@@ -357,6 +369,7 @@ export default {
},
components: {
ShortcutButton,
+ EditShortcutButton,
Button,
AlignmentOptionsControlComponent
},
@@ -521,6 +534,18 @@ export default {
console.error(`[Ultrawidify] there's a problem with VideoSettings.vue::editAction():`, e);
}
},
+
+ updateSelectedShortcut(shortcut, actionType) {
+ try {
+ if (!this.editModeOptions[actionType]?.selected) {
+ return;
+ } else {
+ this.editModeOptions[actionType].selected.shortcut = shortcut
+ }
+ } catch (e) {
+ console.error(`[Ultrawidify] there's a problem with VideoSettings.vue::updateShortcut():`, e);
+ }
+ },
//#endregion
//#region comms and bus
@@ -588,4 +613,13 @@ export default {
padding-bottom: 16px;
padding-top: 8px;
}
+
+.edit-action-area {
+ background-color: rgba($blackBg,0.5);
+ padding: 0.5rem;
+
+ .edit-action-area-header {
+ border-bottom: 1px solid rgba(255,255,255,0.5);
+ }
+}
diff --git a/src/csui/src/res-common/_variables.scss b/src/csui/src/res-common/_variables.scss
index c93342d..3ef31ef 100644
--- a/src/csui/src/res-common/_variables.scss
+++ b/src/csui/src/res-common/_variables.scss
@@ -3,3 +3,7 @@ $warning-color: #d6ba4a;
$primary: rgb(255, 147, 85);
$primaryBrighter: rgb(255, 174, 127);
$primaryBg: rgba(54, 31, 21, 0.5);
+
+$blackBg: rgb(11,11,11);
+$normalTransparentOpacity: 0.5;
+$hoverTransparentOpacity: 0.9;
diff --git a/src/csui/src/res-common/common.scss b/src/csui/src/res-common/common.scss
index c7d29e8..d1abdc5 100644
--- a/src/csui/src/res-common/common.scss
+++ b/src/csui/src/res-common/common.scss
@@ -31,13 +31,18 @@ h1, h2, h3 {
}
.button {
- background-color: rgba(11,11,11,0.5);
+ background-color: rgba($blackBg, $normalTransparentOpacity);
+
+ padding: 0.5rem 2rem;
+ margin: 3px;
+
color: #aaa;
border: 1px solid transparent;
+ user-select: none !important;
&:hover {
color: #fff;
- background-color: rgba(11,11,11,0.9);
+ background-color: rgba($blackBg, $hoverTransparentOpacity);
border-bottom: 1px solid rgba($primary, 0.5);
}
@@ -51,3 +56,47 @@ h1, h2, h3 {
margin: 0.25rem;
padding: 0.5rem 2rem;
}
+
+.field {
+ display: flex;
+ flex-direction: row;
+ flex-wrap: wrap;
+
+ margin-top: 0.5rem;
+ margin-bottom: 0.5rem;
+ padding-top: 0.5rem;
+
+ align-items: center;
+
+ .label {
+ flex: 0 0 25%;
+ text-align: right;
+ padding-right: 1rem;
+ }
+ .input {
+ flex: 0 0 70%;
+ background-color: rgba($blackBg, $normalTransparentOpacity);
+ border: 1px solid transparent;
+ border-bottom: 1px solid rgba(255,255,255,0.5);
+ padding-top: 0.25rem;
+ padding-bottom: 0.25rem;
+
+ &:active, &:focus, &:focus-within {
+ border-bottom: 1px solid rgba($primary, 0.5);
+ }
+
+ input {
+ width: 100%;
+ outline: none;
+ border: 1px solid transparent;
+ background-color: transparent;
+ color: #fff;
+ }
+ }
+ .hint {
+ padding-left: calc(25% + 1rem);
+ font-size: 0.8rem;
+ opacity: 0.7;
+ margin-top: 0.25rem;
+ }
+}
diff --git a/src/res/css/common.scss b/src/res/css/common.scss
index 5b11612..ca3175f 100644
--- a/src/res/css/common.scss
+++ b/src/res/css/common.scss
@@ -226,18 +226,16 @@ small {
}
.button {
- /*display: inline-block;*/
- // padding-top: 8px;
- // padding-bottom: 3px;
- //padding-left: 5px;
- //padding-right: 5px;
- border: 1px solid rgb(39, 39, 39);
+ border: 1px solid transparent;
+ padding: 0.5rem 2rem;
+
margin-top: 3px;
margin-bottom: 3px;
+
color: $text-dim;
text-align: center;
cursor: pointer;
- user-select: none;;
+ user-select: none;
}