From 464ff5fa38de5947cf013c800fab1bdfe3b2cfe7 Mon Sep 17 00:00:00 2001 From: simatec <39792461+simatec@users.noreply.github.com> Date: Sun, 3 Nov 2024 21:55:07 +0100 Subject: [PATCH] (simatec) Responsive Design added --- .vscode/settings.json | 5 ++- README.md | 3 ++ admin/jsonConfig.json | 83 ++++++++++++++++++++++++++++++++----------- admin/jsonCustom.json | 78 +++++++++++++++++++++++++++++++++------- 4 files changed, 134 insertions(+), 35 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index c5b9da3..c285d63 100755 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -23,5 +23,8 @@ ], "url": "https://raw.githubusercontent.com/ioBroker/adapter-react-v5/main/schemas/jsonConfig.json" } - ] + ], + "[json]": { + "editor.defaultFormatter": "vscode.json-language-features" + } } \ No newline at end of file diff --git a/README.md b/README.md index f916f0e..8a191c8 100755 --- a/README.md +++ b/README.md @@ -87,6 +87,9 @@ default: state-ID converted to a mqtt topic. ### __WORK IN PROGRESS__ --> ## Changelog +### __WORK IN PROGRESS__ +* (simatec) Responsive Design added + ### 2.0.1 (2024-09-23) * (@klein0r) Added missing information in configuration dialog * (@klein0r) Fixed type of port configuration to avoid conflicts diff --git a/admin/jsonConfig.json b/admin/jsonConfig.json index 1ebd0f7..c7442bf 100644 --- a/admin/jsonConfig.json +++ b/admin/jsonConfig.json @@ -1,6 +1,9 @@ { "i18n": true, "type": "tabs", + "tabsStyle": { + "width": "calc(100% - 100px)" + }, "iconPosition": "top", "items": { "_general": { @@ -11,9 +14,11 @@ "host": { "newLine": true, "type": "text", - "sm": 10, - "md": 4, + "xs": 12, + "sm": 12, + "md": 6, "lg": 4, + "xl": 4, "label": "host" }, "port": { @@ -21,9 +26,11 @@ "min": 1, "max": 65535, "step": 1, - "sm": 2, - "md": 4, + "xs": 12, + "sm": 12, + "md": 6, "lg": 4, + "xl": 4, "label": "port" }, "mqttVersion": { @@ -42,74 +49,92 @@ "value": 5 } ], + "xs": 12, "sm": 12, - "md": 4, + "md": 6, "lg": 4, + "xl": 4, "label": "MQTT Version" }, "websocket": { "newLine": true, "type": "checkbox", - "sm": 4, - "md": 4, + "xs": 12, + "sm": 12, + "md": 6, "lg": 4, + "xl": 4, "label": "Use websockets" }, "ssl": { "type": "checkbox", + "xs": 12, "sm": 12, - "md": 4, + "md": 6, "lg": 4, + "xl": 4, "label": "ssl" }, "rejectUnauthorized": { "hidden": "!data.ssl", "type": "checkbox", + "xs": 12, "sm": 12, - "md": 4, + "md": 6, "lg": 4, + "xl": 4, "label": "rejectUnauthorized" }, "clientId": { "newLine": true, "type": "text", + "xs": 12, "sm": 12, - "md": 4, + "md": 6, "lg": 4, + "xl": 4, "label": "Client ID" }, "username": { "newLine": true, "type": "text", + "xs": 12, "sm": 12, - "md": 4, + "md": 6, "lg": 4, + "xl": 4, "label": "username" }, "password": { "type": "password", "repeat": false, "visible": true, + "xs": 12, "sm": 12, - "md": 4, + "md": 6, "lg": 4, + "xl": 4, "label": "password" }, "_headerCustomOptions": { "newLine": true, "type": "header", "size": 2, + "xs": 12, "sm": 12, "md": 12, "lg": 12, + "xl": 12, "text": "Custom options" }, "onConnectTopic": { "newLine": true, "type": "text", + "xs": 12, "sm": 12, - "md": 4, + "md": 6, "lg": 4, + "xl": 4, "label": "on connect topic", "validator": "!data.onConnectTopic.startsWith('/')", "validatorErrorText": "Topic must not start with /", @@ -117,17 +142,21 @@ }, "onConnectMessage": { "type": "text", + "xs": 12, "sm": 12, - "md": 4, + "md": 6, "lg": 4, + "xl": 4, "label": "on connect message" }, "onDisconnectTopic": { "newLine": true, "type": "text", + "xs": 12, "sm": 12, - "md": 4, + "md": 6, "lg": 4, + "xl": 4, "label": "on disconnect topic", "validator": "!data.onDisconnectTopic.startsWith('/')", "validatorErrorText": "Topic must not start with /", @@ -135,17 +164,21 @@ }, "onDisconnectMessage": { "type": "text", + "xs": 12, "sm": 12, - "md": 4, + "md": 6, "lg": 4, + "xl": 4, "label": "on disconnect message" }, "lastWillTopic": { "newLine": true, "type": "text", + "xs": 12, "sm": 12, - "md": 4, + "md": 6, "lg": 4, + "xl": 4, "label": "last will topic", "validator": "!data.lastWillTopic.startsWith('/')", "validatorErrorText": "Topic must not start with /", @@ -153,17 +186,21 @@ }, "lastWillMessage": { "type": "text", + "xs": 12, "sm": 12, - "md": 4, + "md": 6, "lg": 4, + "xl": 4, "label": "last will message" }, "inbox": { "newLine": true, "type": "text", + "xs": 12, "sm": 12, - "md": 4, + "md": 6, "lg": 4, + "xl": 4, "label": "prefix for subscribing topics", "validator": "!data.inbox.endsWith('/')", "validatorErrorText": "Topic must not end with /", @@ -171,9 +208,11 @@ }, "outbox": { "type": "text", + "xs": 12, "sm": 12, - "md": 4, + "md": 6, "lg": 4, + "xl": 4, "label": "prefix for publishing topics", "validator": "!data.outbox.endsWith('/')", "validatorErrorText": "Topic must not end with /", @@ -183,9 +222,11 @@ "type": "chips", "label": "additional subscriptions", "delimiter": ",", + "xs": 12, "sm": 12, "md": 12, - "lg": 12 + "lg": 12, + "xl": 12 } } } diff --git a/admin/jsonCustom.json b/admin/jsonCustom.json index a138c77..e7c18b8 100644 --- a/admin/jsonCustom.json +++ b/admin/jsonCustom.json @@ -4,35 +4,55 @@ "type": "text", "label": "Topic", "help": "(without prefix)", - "sm": 12 + "xs": 12, + "sm": 12, + "md": 6, + "lg": 4, + "xl": 4 }, "_publish": { "newLine": true, "type": "header", "size": 2, "text": "publish", - "sm": 12 + "xs": 12, + "sm": 12, + "md": 6, + "lg": 4, + "xl": 4 }, "publish": { "newLine": true, "label": "enabled", "type": "checkbox", "default": false, - "sm": 2 + "xs": 12, + "sm": 12, + "md": 6, + "lg": 4, + "xl": 4 }, "pubChangesOnly": { "disabled": "!data.publish", "label": "changes only", "type": "checkbox", "default": false, - "sm": 3 + "xs": 12, + "sm": 12, + "md": 6, + "lg": 4, + "xl": 4 }, "pubAsObject": { "disabled": "!data.publish", "label": "as object", "type": "checkbox", "default": false, - "sm": 2 + "xs": 12, + "sm": 12, + "md": 6, + "lg": 4, + "xl": 4 }, "qos": { "disabled": "!data.publish", @@ -53,42 +73,66 @@ "value": 2 } ], - "sm": 3 + "xs": 12, + "sm": 12, + "md": 6, + "lg": 4, + "xl": 4 }, "retain": { "disabled": "!data.publish", "label": "retain", "type": "checkbox", "default": false, - "sm": 2 + "xs": 12, + "sm": 12, + "md": 6, + "lg": 4, + "xl": 4 }, "_subscribe": { "newLine": true, "type": "header", "size": 2, "text": "subscribe", - "sm": 12 + "xs": 12, + "sm": 12, + "md": 6, + "lg": 4, + "xl": 4 }, "subscribe": { "newLine": true, "label": "enabled", "type": "checkbox", "default": false, - "sm": 2 + "xs": 12, + "sm": 12, + "md": 6, + "lg": 4, + "xl": 4 }, "subChangesOnly": { "disabled": "!data.subscribe", "label": "changes only", "type": "checkbox", "default": false, - "sm": 3 + "xs": 12, + "sm": 12, + "md": 6, + "lg": 4, + "xl": 4 }, "subAsObject": { "disabled": "!data.subscribe", "label": "as object", "type": "checkbox", "default": false, - "sm": 2 + "xs": 12, + "sm": 12, + "md": 6, + "lg": 4, + "xl": 4 }, "subQos": { "disabled": "!data.subscribe", @@ -109,14 +153,22 @@ "value": 2 } ], - "sm": 3 + "xs": 12, + "sm": 12, + "md": 6, + "lg": 4, + "xl": 4 }, "setAck": { "disabled": "!data.subscribe", "label": "ack", "type": "checkbox", "default": false, - "sm": 2 + "xs": 12, + "sm": 12, + "md": 6, + "lg": 4, + "xl": 4 } } } \ No newline at end of file