mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-01-20 13:38:49 +01:00
Merge branch 'staging' into qr-context
This commit is contained in:
commit
5e4dc388eb
@ -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, [], '<span class="monospace">(name)</span> – sets a UI theme by name', true, true);
|
||||
registerSlashCommand('movingui', setmovingUIPreset, [], '<span class="monospace">(name)</span> – activates a movingUI preset by name', true, true);
|
||||
});
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user