format new fields + styling

This commit is contained in:
Smith
2023-08-05 16:48:12 +02:00
parent 046c946df0
commit c106c307a1
3 changed files with 110 additions and 83 deletions

View File

@@ -11,6 +11,7 @@
"name": {
"title": "Name",
"type": "string",
"minLength": 1,
"options": {
"grid_columns": 12
}
@@ -19,6 +20,7 @@
"title": "Gamedig type",
"description": "Look for the <i>GameDig Type ID</i> in the <a href=\"https://github.com/gamedig/node-gamedig#games-list\">games list</a>.",
"type": "string",
"minLength": 1,
"options": {
"grid_columns": 6
}
@@ -27,6 +29,7 @@
"title": "Steam App ID",
"description": "Look for the <i>AppID</i> in the <a href=\"https://steamdb.info/apps/\">apps list</a>.",
"type": "integer",
"minimum": 1,
"format": "number",
"options": {
"grid_columns": 6
@@ -35,13 +38,20 @@
"host": {
"title": "Host name or IP",
"type": "string",
"pattern": "^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$|^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)+([A-Za-z]|[A-Za-z][A-Za-z0-9\\-]*[A-Za-z0-9])$",
"options": {
"grid_columns": 6
"grid_columns": 6,
"error_messages": {
"en": {
"error_pattern": "Value must be a valid host name or IP"
}
}
}
},
"port": {
"title": "Port number",
"type": "integer",
"default": 1,
"minimum": 1,
"maximum": 65535,
"format": "number",
@@ -49,81 +59,6 @@
"grid_columns": 6
}
},
"givenPortOnly": {
"title": "givenPortOnly",
"description": "Only attempt to query server on given port.",
"type": "boolean",
"format": "checkbox",
"options": {
"grid_columns": 6
}
},
"requestRules": {
"title": "requestRules (Valve)",
"description": "Additional 'rules' may be fetched into the <code>raw</code> field.",
"type": "boolean",
"format": "checkbox",
"options": {
"grid_columns": 6
}
},
"teamspeakQueryPort": {
"title": "teamspeakQueryPort (TeamSpeak 3)",
"type": "integer",
"options": {
"grid_columns": 6
}
},
"guildId": {
"title": "guildId (Discord)",
"type": "string",
"options": {
"grid_columns": 6
}
},
"login": {
"title": "login (Nadeo)",
"type": "string",
"options": {
"grid_columns": 6
}
},
"password": {
"title": "password (Nadeo)",
"type": "string",
"options": {
"grid_columns": 6
}
},
"token": {
"title": "token (Terraria)",
"type": "string",
"options": {
"grid_columns": 6
}
},
"graphHistoryHours": {
"title": "Graph history time span (hours)",
"type": "integer",
"default": 12,
"minimum": 1,
"maximum": 24,
"format": "range",
"options": {
"grid_columns": 12
}
},
"timezoneOffset": {
"title": "Time zone offset of the server",
"default": 0,
"type": "number",
"minimum": -12,
"maximum": 14,
"format": "range",
"options": {
"grid_columns": 6
}
},
"discord": {
"type": "array",
"title": "Discord channels",
@@ -171,6 +106,82 @@
"options": {
"grid_columns": 12
}
},
"graphHistoryHours": {
"title": "Graph history time span (hours)",
"type": "integer",
"default": 12,
"minimum": 1,
"maximum": 24,
"format": "range",
"options": {
"grid_columns": 12
}
},
"timezoneOffset": {
"title": "Time zone offset of the server",
"default": 0,
"type": "number",
"minimum": -12,
"maximum": 14,
"format": "range",
"options": {
"grid_columns": 6
}
},
"givenPortOnly": {
"title": "givenPortOnly",
"description": "Only attempt to query server on given port.",
"type": "boolean",
"options": {
"grid_columns": 6
}
},
"requestRules": {
"title": "requestRules (Valve)",
"description": "Additional server info may be fetched into the <code>raw</code> field.",
"type": "boolean",
"options": {
"grid_columns": 6
}
},
"teamspeakQueryPort": {
"title": "teamspeakQueryPort (TeamSpeak 3)",
"type": "integer",
"minimum": 1,
"maximum": 65535,
"format": "number",
"options": {
"grid_columns": 6
}
},
"guildId": {
"title": "guildId (Discord)",
"type": "string",
"options": {
"grid_columns": 6
}
},
"login": {
"title": "login (Nadeo)",
"type": "string",
"options": {
"grid_columns": 6
}
},
"password": {
"title": "password (Nadeo)",
"type": "string",
"options": {
"grid_columns": 6
}
},
"token": {
"title": "token (Terraria)",
"type": "string",
"options": {
"grid_columns": 6
}
}
},
"format": "grid",

View File

@@ -89,11 +89,26 @@ body>nav {
#config-form .json-editor-btn-add {
background-color: darkgreen;
}
#config-form .json-editor-btn-add span {
display: none;
}
#config-form .json-editor-btn-delete {
background-color: darkred;
}
#config-form .json-editor-btn-delete span {
display: none;
}
#config-form .json-editor-btn-copy {
background-color: darkblue;
}
#config-form .json-editor-btn-copy span {
display: none;
}
footer>a>svg {
fill: #c6cbd1;
}

View File

@@ -33,21 +33,22 @@ $(async () => {
"iconlib": "fontawesome5",
"object_layout": "normal",
"template": "mustache",
"compact": 0,
"show_errors": "always",
"required_by_default": 0,
"no_additional_properties": 1,
"display_required_only": 1,//debug
"show_opt_in": 0,//debug
"remove_empty_properties": 0,//DEBUG2
"keep_oneof_values": 0,
"ajax": 1,//debug
"display_required_only": 1,
"show_opt_in": 0,
"remove_empty_properties": 0,
"use_default_values": 1,
"ajax": 1,
"ajaxCredentials": 0,
"disable_edit_json": 0,
"disable_collapse": 1,
"disable_properties": 0,//debug
"disable_properties": 0,
"disable_array_add": 0,
"disable_array_reorder": 1,
"disable_array_delete": 0,
"disable_array_reorder": 1,
"enable_array_copy": 1,
"array_controls_top": 0,
"disable_array_delete_all_rows": 1,