Switch /input command definition to fromProps

fa03443fe7c7fceb545dfa19ce224f4786260986

Wolfsblvt <wolfsblvt@gmail.com>

1 files changed, +34 -18Showing whitespace changes
public/scripts/slash-commands.js+34 -18
@@ -1287,26 +1287,42 @@ export function initDefaultSlashCommands() {
12871287 callback: inputCallback,
12881288 returns: 'user input',
12891289 namedArgumentList: [
12901290 new SlashCommandNamedArgument.fromProps({
1291- 'default', 'default value of the input field', [ARGUMENT_TYPE.STRING], false, false, '"string"',
1291+ name: 'default',
1292- ),
1292+ description: 'default value of the input field',
1293- new SlashCommandNamedArgument(
1293+ typeList: [ARGUMENT_TYPE.STRING],
1294- 'large', 'show large input field', [ARGUMENT_TYPE.BOOLEAN], false, false, 'off', commonEnumProviders.boolean('onOff')(),
1294+ }),
1295- ),
1295+ SlashCommandNamedArgument.fromProps({
1296- new SlashCommandNamedArgument(
1296+ name: 'large',
1297- 'wide', 'show wide input field', [ARGUMENT_TYPE.BOOLEAN], false, false, 'off', commonEnumProviders.boolean('onOff')(),
1297+ description: 'show large input field',
1298- ),
1298+ typeList: [ARGUMENT_TYPE.BOOLEAN],
1299- new SlashCommandNamedArgument(
1299+ defaultValue: 'off',
1300- 'okButton', 'text for the ok button', [ARGUMENT_TYPE.STRING], false,
1300+ enumList: commonEnumProviders.boolean('onOff')(),
13011301 }),
13021302 new SlashCommandNamedArgument.fromProps({
1303- 'rows', 'number of rows for the input field', [ARGUMENT_TYPE.NUMBER], false,
1303+ name: 'wide',
1304- ),
1304+ description: 'show wide input field',
1305+ typeList: [ARGUMENT_TYPE.BOOLEAN],
1306+ defaultValue: 'off',
1307+ enumList: commonEnumProviders.boolean('onOff')(),
1308+ }),
1309+ SlashCommandNamedArgument.fromProps({
1310+ name: 'okButton',
1311+ description: 'text for the ok button',
1312+ typeList: [ARGUMENT_TYPE.STRING],
1313+ defaultValue: 'Ok',
1314+ }),
1315+ SlashCommandNamedArgument.fromProps({
1316+ name: 'rows',
1317+ description: 'number of rows for the input field',
1318+ typeList: [ARGUMENT_TYPE.NUMBER],
1319+ }),
13051320 ],
13061321 unnamedArgumentList: [
13071322 new SlashCommandArgument.fromProps({
13081323 description: 'text to display', [ARGUMENT_TYPE.STRING], false,
1309- ),
1324+ typeList: [ARGUMENT_TYPE.STRING],
1325+ }),
13101326 ],
13111327 helpString: `
13121328 <div>