From a9e4bef01b1253efd3af752cc85a28c966f1cd00 Mon Sep 17 00:00:00 2001 From: Wolfsblvt Date: Fri, 6 Sep 2024 22:22:35 +0200 Subject: [PATCH] Add wider and transparent styles to /popup --- public/scripts/slash-commands.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/public/scripts/slash-commands.js b/public/scripts/slash-commands.js index ecc2b2259..6706d6692 100644 --- a/public/scripts/slash-commands.js +++ b/public/scripts/slash-commands.js @@ -1273,6 +1273,12 @@ export function initDefaultSlashCommands() { new SlashCommandNamedArgument( '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( 'okButton', 'text for the OK button', [ARGUMENT_TYPE.STRING], false, ), @@ -1883,9 +1889,12 @@ async function buttonsCallback(args, text) { async function popupCallback(args, value) { const safeValue = DOMPurify.sanitize(value || ''); + /** @type {import('./popup.js').PopupOptions} */ const popupOptions = { large: isTrueBoolean(args?.large), wide: isTrueBoolean(args?.wide), + wider: isTrueBoolean(args?.wider), + transparent: isTrueBoolean(args?.transparent), okButton: args?.okButton !== undefined && typeof args?.okButton === 'string' ? args.okButton : 'Ok', }; await delay(1);