luci-base: fix JSDoc errors in form.Flag and form.Button
authorLASER-Yi <redacted>
Tue, 20 Jan 2026 17:25:27 +0000 (01:25 +0800)
committerPaul Donald <redacted>
Fri, 23 Jan 2026 03:20:57 +0000 (04:20 +0100)
Fix incorrect @lends, @name, @class, and @classdesc annotations to match the actual
public API (LuCI.form.Flag and LuCI.form.Button).

Signed-off-by: LASER-Yi <redacted>
modules/luci-base/htdocs/luci-static/resources/form.js

index e7c68b21e0202690514a66d446631820e6d3671f..de6c12290d39c1ed06eb893817d7bcf5e32936e8 100644 (file)
@@ -4308,13 +4308,13 @@ const CBIRangeSliderValue = CBIValue.extend(/** @lends LuCI.form.RangeSliderValu
 });
 
 /**
- * @class FlagValue
+ * @class Flag
  * @memberof LuCI.form
  * @augments LuCI.form.Value
  * @hideconstructor
  * @classdesc
  *
- * The `FlagValue` element builds upon the {@link LuCI.ui.Checkbox} widget to
+ * The `Flag` element builds upon the {@link LuCI.ui.Checkbox} widget to
  * implement a simple checkbox element.
  *
  * @param {LuCI.form.Map|LuCI.form.JSONMap} form
@@ -4338,7 +4338,7 @@ const CBIRangeSliderValue = CBIValue.extend(/** @lends LuCI.form.RangeSliderValu
  * @param {string} [description]
  * The description text of the option element.
  */
-const CBIFlagValue = CBIValue.extend(/** @lends LuCI.form.FlagValue.prototype */ {
+const CBIFlagValue = CBIValue.extend(/** @lends LuCI.form.Flag.prototype */ {
        __name__: 'CBI.FlagValue',
 
        __init__(...args) {
@@ -4352,7 +4352,7 @@ const CBIFlagValue = CBIValue.extend(/** @lends LuCI.form.FlagValue.prototype */
        /**
         * Sets the input value to use for the checkbox checked state.
         *
-        * @name LuCI.form.FlagValue.prototype#enabled
+        * @name LuCI.form.Flag.prototype#enabled
         * @type string
         * @default 1
         */
@@ -4360,7 +4360,7 @@ const CBIFlagValue = CBIValue.extend(/** @lends LuCI.form.FlagValue.prototype */
        /**
         * Sets the input value to use for the checkbox unchecked state.
         *
-        * @name LuCI.form.FlagValue.prototype#disabled
+        * @name LuCI.form.Flag.prototype#disabled
         * @type string
         * @default 0
         */
@@ -4374,7 +4374,7 @@ const CBIFlagValue = CBIValue.extend(/** @lends LuCI.form.FlagValue.prototype */
         * value will be shown as a tooltip. If the return value of the function
         * is `null` no tooltip will be set.
         *
-        * @name LuCI.form.FlagValue.prototype#tooltip
+        * @name LuCI.form.Flag.prototype#tooltip
         * @type string|function
         * @default null
         */
@@ -4385,7 +4385,7 @@ const CBIFlagValue = CBIValue.extend(/** @lends LuCI.form.FlagValue.prototype */
         * If set, this icon will be shown for the default one.
         * This could also be a png icon from the resources directory.
         *
-        * @name LuCI.form.FlagValue.prototype#tooltipicon
+        * @name LuCI.form.Flag.prototype#tooltipicon
         * @type string
         * @default 'ℹ️';
         */
@@ -4743,13 +4743,13 @@ const CBIDummyValue = CBIValue.extend(/** @lends LuCI.form.DummyValue.prototype
 });
 
 /**
- * @class ButtonValue
+ * @class Button
  * @memberof LuCI.form
  * @augments LuCI.form.Value
  * @hideconstructor
  * @classdesc
  *
- * The `ButtonValue` element wraps a {@link LuCI.ui.Hiddenfield} widget and
+ * The `Button` element wraps a {@link LuCI.ui.Hiddenfield} widget and
  * renders the underlying UCI option or default value as readonly text.
  *
  * @param {LuCI.form.Map|LuCI.form.JSONMap} form
@@ -4773,7 +4773,7 @@ const CBIDummyValue = CBIValue.extend(/** @lends LuCI.form.DummyValue.prototype
  * @param {string} [description]
  * The description text of the option element.
  */
-const CBIButtonValue = CBIValue.extend(/** @lends LuCI.form.ButtonValue.prototype */ {
+const CBIButtonValue = CBIValue.extend(/** @lends LuCI.form.Button.prototype */ {
        __name__: 'CBI.ButtonValue',
 
        /**
@@ -4789,7 +4789,7 @@ const CBIButtonValue = CBIValue.extend(/** @lends LuCI.form.ButtonValue.prototyp
         *
         * The default of `null` means the option title is used as caption.
         *
-        * @name LuCI.form.ButtonValue.prototype#inputtitle
+        * @name LuCI.form.Button.prototype#inputtitle
         * @type string|function
         * @default null
         */
@@ -4805,7 +4805,7 @@ const CBIButtonValue = CBIValue.extend(/** @lends LuCI.form.ButtonValue.prototyp
         *
         * The default of `null` means a neutral button styling is used.
         *
-        * @name LuCI.form.ButtonValue.prototype#inputstyle
+        * @name LuCI.form.Button.prototype#inputstyle
         * @type string
         * @default null
         */
@@ -4822,7 +4822,7 @@ const CBIButtonValue = CBIValue.extend(/** @lends LuCI.form.ButtonValue.prototyp
         * DOM click element as the first and the underlying configuration section ID
         * as the second argument.
         *
-        * @name LuCI.form.ButtonValue.prototype#onclick
+        * @name LuCI.form.Button.prototype#onclick
         * @type function
         * @default null
         */
git clone https://git.99rst.org/PROJECT