mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-03-02 10:57:45 +01:00
/popup: add scroll argument, allow scroll by default
This commit is contained in:
parent
e03f1b14e6
commit
b5cdb29bf3
@ -1395,6 +1395,13 @@ export function initDefaultSlashCommands() {
|
|||||||
callback: popupCallback,
|
callback: popupCallback,
|
||||||
returns: 'popup text',
|
returns: 'popup text',
|
||||||
namedArgumentList: [
|
namedArgumentList: [
|
||||||
|
SlashCommandNamedArgument.fromProps({
|
||||||
|
name: 'scroll',
|
||||||
|
description: 'allows vertical scrolling of the content',
|
||||||
|
typeList: [ARGUMENT_TYPE.BOOLEAN],
|
||||||
|
enumList: commonEnumProviders.boolean('trueFalse')(),
|
||||||
|
defaultValue: 'true',
|
||||||
|
}),
|
||||||
SlashCommandNamedArgument.fromProps({
|
SlashCommandNamedArgument.fromProps({
|
||||||
name: 'large',
|
name: 'large',
|
||||||
description: 'show large popup',
|
description: 'show large popup',
|
||||||
@ -2108,6 +2115,7 @@ async function popupCallback(args, value) {
|
|||||||
|
|
||||||
/** @type {import('./popup.js').PopupOptions} */
|
/** @type {import('./popup.js').PopupOptions} */
|
||||||
const popupOptions = {
|
const popupOptions = {
|
||||||
|
allowVerticalScrolling: !isFalseBoolean(args?.scroll),
|
||||||
large: isTrueBoolean(args?.large),
|
large: isTrueBoolean(args?.large),
|
||||||
wide: isTrueBoolean(args?.wide),
|
wide: isTrueBoolean(args?.wide),
|
||||||
wider: isTrueBoolean(args?.wider),
|
wider: isTrueBoolean(args?.wider),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user