mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Merge branch 'SillyTavern:release' into enhancement-make-buttons-scrollable
This commit is contained in:
@ -1395,6 +1395,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',
|
||||
@ -2125,7 +2132,7 @@ async function buttonsCallback(args, text) {
|
||||
popupContainer.style.flexDirection = 'column';
|
||||
popupContainer.style.maxHeight = '80vh'; // Limit the overall height of the popup
|
||||
|
||||
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(''));
|
||||
@ -2142,6 +2149,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