From 894ee3d0c2e30288358eeaaf9a3db8e96b420a15 Mon Sep 17 00:00:00 2001 From: Chris Angelico Date: Fri, 23 Jun 2023 21:40:29 +1000 Subject: [PATCH] commands: Give a brief mnemonic of variable name annotations --- httpstatic/command_gui.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/httpstatic/command_gui.js b/httpstatic/command_gui.js index be119bd2..55c4ead9 100644 --- a/httpstatic/command_gui.js +++ b/httpstatic/command_gui.js @@ -375,23 +375,27 @@ const types = { color: "#dd7777", label: el => `Add ${el.message} to $${el.target}$`, params: [{attr: "dest", values: "/set"}, {attr: "destcfg", values: "add"}, {attr: "target", label: "Variable name"}, {attr: "message", label: "Increment by"}], - typedesc: "Update a variable. Can be accessed as $varname$ in this or any other command.", + typedesc: ["Update a variable. Can be accessed as $varname$ in this or any other command.", BR(), + "Use ", CODE("*varname"), " for a per-user variable, and/or ", CODE("varname?"), " for ephemeral."], }, incr_variable_complex: { color: "#dd7777", children: ["message"], label: el => `Add onto $${el.target}$`, params: [{attr: "dest", values: "/set"}, {attr: "destcfg", values: "add"}, {attr: "target", label: "Variable name"},], - typedesc: "Capture message as a variable update. Can be accessed as $varname$ in this or any other command.", + typedesc: ["Capture message as a variable update. Can be accessed as $varname$ in this or any other command.", BR(), + "Use ", CODE("*varname"), " for a per-user variable, and/or ", CODE("varname?"), " for ephemeral."], }, set_variable: { color: "#dd7777", label: el => el.message ? `Set $${el.target}$ to ${el.message}` : `Empty out $${el.target}$`, params: [{attr: "dest", values: "/set"}, {attr: "target", label: "Variable name"}, {attr: "message", label: "New value"}], - typedesc: "Change a variable. Can be accessed as $varname$ in this or any other command.", + typedesc: ["Change a variable. Can be accessed as $varname$ in this or any other command.", BR(), + "Use ", CODE("*varname"), " for a per-user variable, and/or ", CODE("varname?"), " for ephemeral."], }, set_variable_complex: { color: "#dd7777", children: ["message"], label: el => `Change variable $${el.target}$`, params: [{attr: "dest", values: "/set"}, {attr: "target", label: "Variable name"},], - typedesc: "Capture message into a variable. Can be accessed as $varname$ in this or any other command.", + typedesc: ["Capture message into a variable. Can be accessed as $varname$ in this or any other command.", BR(), + "Use ", CODE("*varname"), " for a per-user variable, and/or ", CODE("varname?"), " for ephemeral."], }, ...builtin_types(), handle_errors: {