mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Merge branch 'staging' into webpack
This commit is contained in:
@ -1397,6 +1397,13 @@ export function initDefaultSlashCommands() {
|
||||
callback: popupCallback,
|
||||
returns: 'popup text',
|
||||
namedArgumentList: [
|
||||
SlashCommandNamedArgument.fromProps({
|
||||
name: 'scroll',
|
||||
description: 'allows vertical scrolling of the content',
|
||||
typeList: [ARGUMENT_TYPE.BOOLEAN],
|
||||
enumList: commonEnumProviders.boolean('trueFalse')(),
|
||||
defaultValue: 'true',
|
||||
}),
|
||||
SlashCommandNamedArgument.fromProps({
|
||||
name: 'large',
|
||||
description: 'show large popup',
|
||||
@ -2093,7 +2100,7 @@ async function buttonsCallback(args, text) {
|
||||
popupContainer.innerHTML = safeValue;
|
||||
popupContainer.appendChild(buttonContainer);
|
||||
|
||||
popup = new Popup(popupContainer, POPUP_TYPE.TEXT, '', { okButton: 'Cancel' });
|
||||
popup = new Popup(popupContainer, POPUP_TYPE.TEXT, '', { okButton: 'Cancel', allowVerticalScrolling: true });
|
||||
popup.show()
|
||||
.then((result => resolve(typeof result === 'number' ? resultToButtonMap.get(result) ?? '' : '')))
|
||||
.catch(() => resolve(''));
|
||||
@ -2110,6 +2117,7 @@ async function popupCallback(args, value) {
|
||||
|
||||
/** @type {import('./popup.js').PopupOptions} */
|
||||
const popupOptions = {
|
||||
allowVerticalScrolling: !isFalseBoolean(args?.scroll),
|
||||
large: isTrueBoolean(args?.large),
|
||||
wide: isTrueBoolean(args?.wide),
|
||||
wider: isTrueBoolean(args?.wider),
|
||||
|
Reference in New Issue
Block a user