From 4f7c925dc600b155c5010f12eb4a6db3feb6c260 Mon Sep 17 00:00:00 2001 From: RossAscends <124905043+RossAscends@users.noreply.github.com> Date: Thu, 23 Nov 2023 22:10:23 +0900 Subject: [PATCH 1/2] properly round left menu borders --- public/style.css | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/public/style.css b/public/style.css index 56446d75a..fe905d227 100644 --- a/public/style.css +++ b/public/style.css @@ -61,22 +61,10 @@ --SmartThemeCheckboxBgColorR: 220; --SmartThemeCheckboxBgColorG: 220; --SmartThemeCheckboxBgColorB: 210; - --SmartThemeCheckboxTickColorValue: calc( - ( - ( - ( - (var(--SmartThemeCheckboxBgColorR) * 299) + - (var(--SmartThemeCheckboxBgColorG) * 587) + - (var(--SmartThemeCheckboxBgColorB) * 114) - ) / 1000 - ) - 128 - ) * -1000 - ); - --SmartThemeCheckboxTickColor: rgb( - var(--SmartThemeCheckboxTickColorValue), - var(--SmartThemeCheckboxTickColorValue), - var(--SmartThemeCheckboxTickColorValue) - ); + --SmartThemeCheckboxTickColorValue: calc(((((var(--SmartThemeCheckboxBgColorR) * 299) + (var(--SmartThemeCheckboxBgColorG) * 587) + (var(--SmartThemeCheckboxBgColorB) * 114)) / 1000) - 128) * -1000); + --SmartThemeCheckboxTickColor: rgb(var(--SmartThemeCheckboxTickColorValue), + var(--SmartThemeCheckboxTickColorValue), + var(--SmartThemeCheckboxTickColorValue)); --sheldWidth: 50vw; @@ -679,6 +667,7 @@ hr { backdrop-filter: blur(var(--SmartThemeBlurStrength)); box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); flex-flow: column; + border-radius: 10px; } .options-content, @@ -3782,4 +3771,4 @@ a { height: 100vh; z-index: 9999; } -} +} \ No newline at end of file From 73d680140697d4dde1d72efb3e1e879a0c945f52 Mon Sep 17 00:00:00 2001 From: RossAscends <124905043+RossAscends@users.noreply.github.com> Date: Thu, 23 Nov 2023 22:32:47 +0900 Subject: [PATCH 2/2] slashcommand /movingui to set a MUI preset --- public/scripts/power-user.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/public/scripts/power-user.js b/public/scripts/power-user.js index 807941eaf..7daeb8431 100644 --- a/public/scripts/power-user.js +++ b/public/scripts/power-user.js @@ -2352,6 +2352,28 @@ async function setThemeCallback(_, text) { saveSettingsDebounced(); } +async function setmovingUIPreset(_, text) { + const fuse = new Fuse(movingUIPresets, { + keys: [ + { name: 'name', weight: 1 }, + ], + }); + + const results = fuse.search(text); + console.debug('movingUI preset fuzzy search results for ' + text, results); + const preset = results[0]?.item; + + if (!preset) { + toastr.warning(`Could not find preset with name: ${text}`); + return; + } + + power_user.movingUIPreset = preset.name; + applyMovingUIPreset(preset.name); + $("#movingUIPresets").val(preset.name); + saveSettingsDebounced(); +} + /** * Gets the custom stopping strings from the power user settings. * @param {number | undefined} limit Number of strings to return. If 0 or undefined, returns all strings. @@ -3027,4 +3049,5 @@ $(document).ready(() => { registerSlashCommand('resetpanels', doResetPanels, ['resetui'], '– resets UI panels to original state.', true, true); registerSlashCommand('bgcol', setAvgBG, [], '– WIP test of auto-bg avg coloring', true, true); registerSlashCommand('theme', setThemeCallback, [], '(name) – sets a UI theme by name', true, true); + registerSlashCommand('movingui', setmovingUIPreset, [], '(name) – activates a movingUI preset by name', true, true); });