Increased button label length to 80 characters

This commit is contained in:
DJj123dj
2024-12-08 18:28:49 +01:00
parent b7f5c7191d
commit 4e7d45ea07
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -398,7 +398,7 @@ export interface ODCheckerMessage {
* This interface has the basic options for the `ODCheckerStructure`! * This interface has the basic options for the `ODCheckerStructure`!
*/ */
export interface ODCheckerStructureOptions { export interface ODCheckerStructureOptions {
/**Add a custom checker function */ /**Add a custom checker function. Returns `true` when valid. */
custom?:(checker:ODChecker, value:ODValidJsonType, locationTrace:ODCheckerLocationTrace, locationId:ODId, locationDocs:string|null) => boolean, custom?:(checker:ODChecker, value:ODValidJsonType, locationTrace:ODCheckerLocationTrace, locationId:ODId, locationDocs:string|null) => boolean,
/**Set the url to the documentation of this variable. */ /**Set the url to the documentation of this variable. */
docs?:string docs?:string
+3 -3
View File
@@ -301,7 +301,7 @@ export const defaultOptionsStructure = new api.ODCheckerArrayStructure("opentick
//TICKET BUTTON //TICKET BUTTON
{key:"button",optional:false,priority:0,checker:new api.ODCheckerObjectStructure("openticket:ticket-button",{children:[ {key:"button",optional:false,priority:0,checker:new api.ODCheckerObjectStructure("openticket:ticket-button",{children:[
{key:"emoji",optional:false,priority:0,checker:new api.ODCheckerCustomStructure_EmojiString("openticket:ticket-button-emoji",0,1,true)}, {key:"emoji",optional:false,priority:0,checker:new api.ODCheckerCustomStructure_EmojiString("openticket:ticket-button-emoji",0,1,true)},
{key:"label",optional:false,priority:0,checker:new api.ODCheckerStringStructure("openticket:ticket-button-label",{maxLength:50})}, {key:"label",optional:false,priority:0,checker:new api.ODCheckerStringStructure("openticket:ticket-button-label",{maxLength:80})},
{key:"color",optional:false,priority:0,checker:new api.ODCheckerStringStructure("openticket:ticket-button-color",{choices:["gray","red","green","blue"]})}, {key:"color",optional:false,priority:0,checker:new api.ODCheckerStringStructure("openticket:ticket-button-color",{choices:["gray","red","green","blue"]})},
],custom:(checker,value,locationTrace,locationId,locationDocs) => { ],custom:(checker,value,locationTrace,locationId,locationDocs) => {
const lt = checker.locationTraceDeref(locationTrace) const lt = checker.locationTraceDeref(locationTrace)
@@ -385,7 +385,7 @@ export const defaultOptionsStructure = new api.ODCheckerArrayStructure("opentick
//WEBSITE BUTTON //WEBSITE BUTTON
{key:"button",optional:false,priority:0,checker:new api.ODCheckerObjectStructure("openticket:ticket-button",{children:[ {key:"button",optional:false,priority:0,checker:new api.ODCheckerObjectStructure("openticket:ticket-button",{children:[
{key:"emoji",optional:false,priority:0,checker:new api.ODCheckerCustomStructure_EmojiString("openticket:ticket-button-emoji",0,1,true)}, {key:"emoji",optional:false,priority:0,checker:new api.ODCheckerCustomStructure_EmojiString("openticket:ticket-button-emoji",0,1,true)},
{key:"label",optional:false,priority:0,checker:new api.ODCheckerStringStructure("openticket:ticket-button-label",{maxLength:50})}, {key:"label",optional:false,priority:0,checker:new api.ODCheckerStringStructure("openticket:ticket-button-label",{maxLength:80})},
],custom:(checker,value,locationTrace,locationId,locationDocs) => { ],custom:(checker,value,locationTrace,locationId,locationDocs) => {
const lt = checker.locationTraceDeref(locationTrace) const lt = checker.locationTraceDeref(locationTrace)
//check if emoji & label exists //check if emoji & label exists
@@ -410,7 +410,7 @@ export const defaultOptionsStructure = new api.ODCheckerArrayStructure("opentick
//ROLE BUTTON //ROLE BUTTON
{key:"button",optional:false,priority:0,checker:new api.ODCheckerObjectStructure("openticket:ticket-button",{children:[ {key:"button",optional:false,priority:0,checker:new api.ODCheckerObjectStructure("openticket:ticket-button",{children:[
{key:"emoji",optional:false,priority:0,checker:new api.ODCheckerCustomStructure_EmojiString("openticket:ticket-button-emoji",0,1,true)}, {key:"emoji",optional:false,priority:0,checker:new api.ODCheckerCustomStructure_EmojiString("openticket:ticket-button-emoji",0,1,true)},
{key:"label",optional:false,priority:0,checker:new api.ODCheckerStringStructure("openticket:ticket-button-label",{maxLength:50})}, {key:"label",optional:false,priority:0,checker:new api.ODCheckerStringStructure("openticket:ticket-button-label",{maxLength:80})},
{key:"color",optional:false,priority:0,checker:new api.ODCheckerStringStructure("openticket:ticket-button-color",{choices:["gray","red","green","blue"]})}, {key:"color",optional:false,priority:0,checker:new api.ODCheckerStringStructure("openticket:ticket-button-color",{choices:["gray","red","green","blue"]})},
],custom:(checker,value,locationTrace,locationId,locationDocs) => { ],custom:(checker,value,locationTrace,locationId,locationDocs) => {
const lt = checker.locationTraceDeref(locationTrace) const lt = checker.locationTraceDeref(locationTrace)