Refactor /popup to actual booleans - still supports on/off, no worries.
| @@ -1271,29 +1271,29 @@ export function initDefaultSlashCommands() { | ||
| 1271 | 1271 | name: 'large', |
| 1272 | 1272 | description: 'show large popup', |
| 1273 | 1273 | typeList: [ARGUMENT_TYPE.BOOLEAN], |
| 1274 | 1274 | enumList: commonEnumProviders.boolean('onOfftrueFalse')(), |
| 1275 | 1275 | defaultValue: 'offfalse', |
| 1276 | 1276 | }), |
| 1277 | 1277 | SlashCommandNamedArgument.fromProps({ |
| 1278 | 1278 | name: 'wide', |
| 1279 | 1279 | description: 'show wide popup', |
| 1280 | 1280 | typeList: [ARGUMENT_TYPE.BOOLEAN], |
| 1281 | 1281 | enumList: commonEnumProviders.boolean('onOfftrueFalse')(), |
| 1282 | 1282 | defaultValue: 'offfalse', |
| 1283 | 1283 | }), |
| 1284 | 1284 | SlashCommandNamedArgument.fromProps({ |
| 1285 | 1285 | name: 'wider', |
| 1286 | 1286 | description: 'show wider popup', |
| 1287 | 1287 | typeList: [ARGUMENT_TYPE.BOOLEAN], |
| 1288 | 1288 | enumList: commonEnumProviders.boolean('onOfftrueFalse')(), |
| 1289 | 1289 | defaultValue: 'offfalse', |
| 1290 | 1290 | }), |
| 1291 | 1291 | SlashCommandNamedArgument.fromProps({ |
| 1292 | 1292 | name: 'transparent', |
| 1293 | 1293 | description: 'show transparent popup', |
| 1294 | 1294 | typeList: [ARGUMENT_TYPE.BOOLEAN], |
| 1295 | 1295 | enumList: commonEnumProviders.boolean('onOfftrueFalse')(), |
| 1296 | 1296 | defaultValue: 'offfalse', |
| 1297 | 1297 | }), |
| 1298 | 1298 | SlashCommandNamedArgument.fromProps({ |
| 1299 | 1299 | name: 'okButton', |
| @@ -1310,14 +1310,16 @@ export function initDefaultSlashCommands() { | ||
| 1310 | 1310 | name: 'result', |
| 1311 | 1311 | description: 'if enabled, returns the popup result (as an integer) instead of the popup text. Resolves to 1 for OK and 0/null for cancel or exiting out.', |
| 1312 | 1312 | typeList: [ARGUMENT_TYPE.BOOLEAN], |
| 1313 | 1313 | enumList: commonEnumProviders.boolean('onOfftrueFalse')(), |
| 1314 | 1314 | defaultValue: 'offfalse', |
| 1315 | 1315 | }), |
| 1316 | 1316 | ], |
| 1317 | 1317 | unnamedArgumentList: [ |
| 1318 | 1318 | new SlashCommandArgument.fromProps({ |
| 1319 | - 'text', [ARGUMENT_TYPE.STRING], true, | |
| 1319 | + description: 'popup text', | |
| 1320 | - ), | |
| 1320 | + typeList: [ARGUMENT_TYPE.STRING], | |
| 1321 | + isRequired: true, | |
| 1322 | + }), | |
| 1321 | 1323 | ], |
| 1322 | 1324 | helpString: ` |
| 1323 | 1325 | <div> |
| @@ -1330,6 +1332,9 @@ export function initDefaultSlashCommands() { | ||
| 1330 | 1332 | <li> |
| 1331 | 1333 | <pre><code>/popup large=on wide=on okButton="Confirm" Please confirm this action.</code></pre> |
| 1332 | 1334 | </li> |
| 1335 | + <li> | |
| 1336 | + <pre><code>/popup okButton="Left" cancelButton="Right" result=true Do you want to go left or right? | /echo 0 means right, 1 means left. Choice: {{pipe}}</code></pre> | |
| 1337 | + </li> | |
| 1333 | 1338 | </ul> |
| 1334 | 1339 | </div> |
| 1335 | 1340 | `, |