mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-03-02 19:07:40 +01:00
Add wider and transparent styles to /popup
This commit is contained in:
parent
3bea7d4885
commit
a9e4bef01b
@ -1273,6 +1273,12 @@ export function initDefaultSlashCommands() {
|
|||||||
new SlashCommandNamedArgument(
|
new SlashCommandNamedArgument(
|
||||||
'wide', 'show wide popup', [ARGUMENT_TYPE.BOOLEAN], false, false, null, commonEnumProviders.boolean('onOff')(),
|
'wide', 'show wide popup', [ARGUMENT_TYPE.BOOLEAN], false, false, null, commonEnumProviders.boolean('onOff')(),
|
||||||
),
|
),
|
||||||
|
new SlashCommandNamedArgument(
|
||||||
|
'wider', 'show wider popup', [ARGUMENT_TYPE.BOOLEAN], false, false, null, commonEnumProviders.boolean('onOff')(),
|
||||||
|
),
|
||||||
|
new SlashCommandNamedArgument(
|
||||||
|
'transparent', 'show transparent popup', [ARGUMENT_TYPE.BOOLEAN], false, false, null, commonEnumProviders.boolean('onOff')(),
|
||||||
|
),
|
||||||
new SlashCommandNamedArgument(
|
new SlashCommandNamedArgument(
|
||||||
'okButton', 'text for the OK button', [ARGUMENT_TYPE.STRING], false,
|
'okButton', 'text for the OK button', [ARGUMENT_TYPE.STRING], false,
|
||||||
),
|
),
|
||||||
@ -1883,9 +1889,12 @@ async function buttonsCallback(args, text) {
|
|||||||
|
|
||||||
async function popupCallback(args, value) {
|
async function popupCallback(args, value) {
|
||||||
const safeValue = DOMPurify.sanitize(value || '');
|
const safeValue = DOMPurify.sanitize(value || '');
|
||||||
|
/** @type {import('./popup.js').PopupOptions} */
|
||||||
const popupOptions = {
|
const popupOptions = {
|
||||||
large: isTrueBoolean(args?.large),
|
large: isTrueBoolean(args?.large),
|
||||||
wide: isTrueBoolean(args?.wide),
|
wide: isTrueBoolean(args?.wide),
|
||||||
|
wider: isTrueBoolean(args?.wider),
|
||||||
|
transparent: isTrueBoolean(args?.transparent),
|
||||||
okButton: args?.okButton !== undefined && typeof args?.okButton === 'string' ? args.okButton : 'Ok',
|
okButton: args?.okButton !== undefined && typeof args?.okButton === 'string' ? args.okButton : 'Ok',
|
||||||
};
|
};
|
||||||
await delay(1);
|
await delay(1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user