Skip to content

Commit

Permalink
* (bluefox) Improved the color of icons in the admin interface
Browse files Browse the repository at this point in the history
Updated packages
  • Loading branch information
GermanBluefox committed Aug 25, 2024
1 parent 6fae3ec commit 7ca113d
Show file tree
Hide file tree
Showing 10 changed files with 133 additions and 67 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ Adapter version >= v6.8.0 required!

## Troubleshooting after installation

### TypeError: xmlserializer.Builder is not a constructor
### TypeError: `xmlserializer.Builder is not a constructor`

execute

Expand All @@ -158,6 +158,7 @@ execute
* (klein0r) Added Shelly Plus Uni
* (klein0r) Added Shelly H&T (Gen3)
* (klein0r) Improved structure of ble events (receivedBy) - see documentation for details
* (bluefox) Improved the color of icons in the admin interface

### 7.0.0 (2024-04-29)

Expand Down
12 changes: 6 additions & 6 deletions admin/jsonConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"_general": {
"type": "panel",
"label": "General settings",
"icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIj48IS0tISBGb250IEF3ZXNvbWUgUHJvIDYuNC4yIGJ5IEBmb250YXdlc29tZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tIExpY2Vuc2UgLSBodHRwczovL2ZvbnRhd2Vzb21lLmNvbS9saWNlbnNlIChDb21tZXJjaWFsIExpY2Vuc2UpIENvcHlyaWdodCAyMDIzIEZvbnRpY29ucywgSW5jLiAtLT48cGF0aCBkPSJNNDk1LjkgMTY2LjZjMy4yIDguNyAuNSAxOC40LTYuNCAyNC42bC00My4zIDM5LjRjMS4xIDguMyAxLjcgMTYuOCAxLjcgMjUuNHMtLjYgMTcuMS0xLjcgMjUuNGw0My4zIDM5LjRjNi45IDYuMiA5LjYgMTUuOSA2LjQgMjQuNmMtNC40IDExLjktOS43IDIzLjMtMTUuOCAz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OS02LjQtMjQuNmM0LjQtMTEuOSA5LjctMjMuMyAxNS44LTM0LjNsNC43LTguMWM2LjYtMTEgMTQtMjEuNCAyMi4xLTMxLjJjNS45LTcuMiAxNS43LTkuNiAyNC41LTYuOGw1NS43IDE3LjdjMTMuNC0xMC4zIDI4LjItMTguOSA0NC0yNS40bDEyLjUtNTcuMWMyLTkuMSA5LTE2LjMgMTguMi0xNy44QzIyNy4zIDEuMiAyNDEuNSAwIDI1NiAwczI4LjcgMS4yIDQyLjUgMy41YzkuMiAxLjUgMTYuMiA4LjcgMTguMiAxNy44bDEyLjUgNTcuMWMxNS44IDYuNSAzMC42IDE1LjEgNDQgMjUuNGw1NS43LTE3LjdjOC44LTIuOCAxOC42LS4zIDI0LjUgNi44YzguMSA5LjggMTUuNSAyMC4yIDIyLjEgMzEuMmw0LjcgOC4xYzYuMSAxMSAxMS40IDIyLjQgMTUuOCAzNC4zek0yNTYgMzM2YTgwIDgwIDAgMSAwIDAtMTYwIDgwIDgwIDAgMSAwIDAgMTYweiIvPg0KPC9zdmc+DQo=",
"items": {
"_documentationLink": {
"type": "staticLink",
Expand All @@ -26,7 +26,7 @@
},
"button": true,
"variant": "contained",
"icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0NDggNTEyIj48IS0tISBGb250IEF3ZXNvbWUgUHJvIDYuNC4wIGJ5IEBmb250YXdlc29tZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tIExpY2Vuc2UgLSBodHRwczovL2ZvbnRhd2Vzb21lLmNvbS9saWNlbnNlIChDb21tZXJjaWFsIExpY2Vuc2UpIENvcHlyaWdodCAyMDIzIEZvbnRpY29ucywgSW5jLiAtLT48cGF0aCBkPSJNOTYgMEM0MyAwIDAgNDMgMCA5NlY0MTZjMCA1MyA0MyA5NiA5NiA5NkgzODRoMzJjMTcuNyAwIDMyLTE0LjMgMzItMzJzLTE0Lj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 12,
"lg": 12
Expand Down Expand Up @@ -120,7 +120,7 @@
},
"button": true,
"variant": "contained",
"icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0NDggNTEyIj48IS0tISBGb250IEF3ZXNvbWUgUHJvIDYuNC4wIGJ5IEBmb250YXdlc29tZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tIExpY2Vuc2UgLSBodHRwczovL2ZvbnRhd2Vzb21lLmNvbS9saWNlbnNlIChDb21tZXJjaWFsIExpY2Vuc2UpIENvcHlyaWdodCAyMDIzIEZvbnRpY29ucywgSW5jLiAtLT48cGF0aCBkPSJNOTYgMEM0MyAwIDAgNDMgMCA5NlY0MTZjMCA1MyA0MyA5NiA5NiA5NkgzODRoMzJjMTcuNyAwIDMyLTE0LjMgMzItMzJzLTE0LjMtMzItMzItMzJWMzg0YzE3LjcgMCAzMi0xNC4zIDMyLTMyVjMyYzAtMTcuNy0xNC4zLTMyLTMyLTMySDM4NCA5NnptMCAzODRIMzUydjY0SDk2Yy0xNy43IDAtMzItMTQuMy0zMi0zMnMxNC4zLTMyIDMyLTMyem0zMi0yNDBjMC04LjggNy4yLTE2IDE2LTE2SDMzNmM4LjggMCAxNiA3LjIgMTYgMTZzLTcuMiAxNi0xNiAxNkgxNDRjLTguOCAwLTE2LTcuMi0xNi0xNnptMTYgNDhIMzM2YzguOCAwIDE2IDcuMiAxNiAxNnMtNy4yIDE2LTE2IDE2SDE0NGMtOC44IDAtMTYtNy4yLTE2LTE2czcuMi0xNiAxNi0xNnoiLz48L3N2Zz4=",
"icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0NDggNTEyIj4NCiAgICA8cGF0aCBmaWxsPSJjdXJyZW50Q29sb3IiIGQ9Ik05NiAwQzQzIDAgMCA0MyAwIDk2VjQxNmMwIDUzIDQzIDk2IDk2IDk2SDM4NGgzMmMxNy43IDAgMzItMTQuMyAzMi0zMnMtMTQuMy0zMi0zMi0zMlYzODRjMTcuNyAwIDMyLTE0LjMgMzItMzJWMzJjMC0xNy43LTE0LjMtMzItMzItMzJIMzg0IDk2em0wIDM4NEgzNTJ2NjRIOTZjLTE3LjcgMC0zMi0xNC4zLTMyLTMyczE0LjMtMzIgMzItMzJ6bTMyLTI0MGMwLTguOCA3LjItMTYgMTYtMTZIMzM2YzguOCAwIDE2IDcuMiAxNiAxNnMtNy4yIDE2LTE2IDE2SDE0NGMtOC44IDAtMTYtNy4yLTE2LTE2em0xNiA0OEgzMzZjOC44IDAgMTYgNy4yIDE2IDE2cy03LjIgMTYtMTYgMTZIMTQ0Yy04LjggMC0xNi03LjItMTYtMTZzNy4yLTE2IDE2LTE2eiIvPg0KPC9zdmc+DQo=",
"sm": 12,
"md": 4,
"lg": 4
Expand Down Expand Up @@ -209,7 +209,7 @@
"hidden": "data.protocol !== 'mqtt'",
"type": "panel",
"label": "MQTT settings",
"icon": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2aWV3Qm94PSIwIDAgNDQ4IDUxMiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyBpZD0iYmxhY2tfYmciIGRpc3BsYXk9Im5vbmUiIHRyYW5zZm9ybT0ibWF0cml4KDEsIDAsIDAsIDEsIDEsIDApIi8+CiAgPGcgaWQ9ImxvZ29zIiB0cmFuc2Zvcm09Im1hdHJpeCgyLjA0Njg0NiwgMCwgMCwgMi4wNDY4NDYsIC03OS4xMzYzMjIsIC0zNy41NTM3MykiIHN0eWxlPSIiPgogICAgPHBhdGggZD0iTTQ2LDY0LjJ2MzFjMC4yLDAsMC40LDAsMC42LDBjODQuNCwwLDE1My4yLDY4LDE1My45LDE1MS44aDMwLjFDMjI5LjgsMTQ2Lj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ik00Ni41LDE1OS4yYy0wLjIsMC0wLjQsMC0wLjYsMHY3Ny42YzAsNS42LDQuNiwxMC4yLDEwLjIsMTAuMkgxMzZDMTM1LjMsMTk4LjUsOTUuNSwxNTkuMiw0Ni41LDE1OS4yeiIgc3R5bGU9IiIvPg0KICAgICAgICA8cGF0aCBkPSJNNDYuNSw5NS4yYy0wLjIsMC0wLjQsMC0wLjYsMHYzM2M2NS45LDAuMywxMTkuNSw1My4zLDEyMC4yLDExOC44aDM0LjJDMTk5LjcsMTYzLjIsMTMxLDk1LjIsNDYuNSw5NS4yeiIgc3R5bGU9IiIvPg0KICAgICAgICA8cGF0aCBkPSJNMjQ4LjgsMjM2Ljl2LTcwLjFjLTIzLjItNTYuOC02OS45LTEwMS43LTEyOC0xMjIuNkg1Ni4xYy01LjYsMC0xMC4yLDQuNi0xMC4yLDEwLjJ2OS45IGMxMDEuNCwwLjMsMTgzLjksODIsMTg0LjUsMTgyLjhoOC4yQzI0NC4zLDI0NywyNDguOCwyNDIuNSwyNDguOCwyMzYuOXoiIHN0eWxlPSIiLz4NCiAgICAgICAgPHBhdGggZD0iTTIyMi4xLDcyLjVjOS40LDkuNCwxOSwyMS4zLDI2LjcsMzEuOHYtNTBjMC01LjYtNC41LTEwLjEtMTAuMS0xMC4xaC01MS41QzE5OS4yLDUyLjUsMjExLjYsNjIsMjIyLjEsNzIuNSB6IiBzdHlsZT0iIi8+DQogICAgPC9nPg0KPC9zdmc+DQo=",
"items": {
"bind": {
"newLine": true,
Expand Down Expand Up @@ -275,7 +275,7 @@
},
"button": true,
"variant": "contained",
"icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0NDggNTEyIj48IS0tISBGb250IEF3ZXNvbWUgUHJvIDYuNC4wIGJ5IEBmb250YXdlc29tZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tIExpY2Vuc2UgLSBodHRwczovL2Z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AwIDE2IDcuMiAxNiAxNnMtNy4yIDE2LTE2IDE2SDE0NGMtOC44IDAtMTYtNy4yLTE2LTE2em0xNiA0OEgzMzZjOC44IDAgMTYgNy4yIDE2IDE2cy03LjIgMTYtMTYgMTZIMTQ0Yy04LjggMC0xNi03LjItMTYtMTZzNy4yLTE2IDE2LTE2eiIvPg0KPC9zdmc+DQo=",
"sm": 12,
"md": 4,
"lg": 4
Expand Down Expand Up @@ -372,7 +372,7 @@
"hidden": "data.protocol !== 'coap'",
"type": "panel",
"label": "CoAP settings",
"icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NDAgNTEyIj48IS0tISBGb250IEF3ZXNvbWUgUHJvIDYuNC4yIGJ5IEBmb250YXdlc29tZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tIExpY2Vuc2UgLSBodHRwczovL2ZvbnRhd2Vzb21lLmNvbS9saWNlbnNlIChDb21tZXJjaWFsIExpY2Vuc2UpIENvcHlyaWdodCAyMDIzIEZvbnRpY29ucywgSW5jLiAtLT48cGF0aCBkPSJNNTQuMiAyMDIuOUMxMjMuMiAxMzYuNyAyMTYuOCA5NiAzMjAgOTZzMTk2LjggNDAuNyAyNjUuOCAxMDYuOWMxMi44IDEyLjIgMzMgMTEuOCA0NS4yLS45czExLjgtMzMtLjktNDUuMkM1NDkuNyA3OS41IDQ0MC40IDMyIDMyMCAzMlM5MC4zIDc5LjUgOS44IDE1Ni43Qy0yLjkgMTY5LTMuMyAxODkuMiA4LjkgMjAyczMyLjUgMTMuMiA0NS4yIC45ek0zMjAgMjU2YzU2LjggMCAxMDguNiAyMS4xIDE0OC4yIDU2YzEzLjMgMTEuNyAzMy41IDEwLjQgNDUuMi0yLjhzMTAuNC0zMy41LTIuOC00NS4yQzQ1OS44IDIxOS4yIDM5MyAxOTIgMzIwIDE5MnMtMTM5LjggMjcuMi0xOTAuNSA3MmMtMTMuMyAxMS43LTE0LjUgMzEuOS0yLjggNDUuMnMzMS45IDE0LjUgNDUuMiAyLjhjMzkuNS0zNC45IDkxLjMtNTYgMTQ4LjItNTZ6bTY0IDE2MGE2NCA2NCAwIDEgMCAtMTI4IDAgNjQgNjQgMCAxIDAgMTI4IDB6Ii8+PC9zdmc+",
"icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NDAgNTEyIj4NCiAgICA8cGF0aCBmaWxsPSJjdXJyZW50Q29sb3IiIGQ9Ik01NC4yIDIwMi45QzEyMy4yIDEzNi43IDIxNi44IDk2IDMyMCA5NnMxOTYuOCA0MC43IDI2NS44IDEwNi45YzEyLjggMTIuMiAzMyAxMS44IDQ1LjItLjlzMTEuOC0zMy0uOS00NS4yQzU0OS43IDc5LjUgNDQwLjQgMzIgMzIwIDMyUzkwLjMgNzkuNSA5LjggMTU2LjdDLTIuOSAxNjktMy4zIDE4OS4yIDguOSAyMDJzMzIuNSAxMy4yIDQ1LjIgLjl6TTMyMCAyNTZjNTYuOCAwIDEwOC42IDIxLjEgMTQ4LjIgNTZjMTMuMyAxMS43IDMzLjUgMTAuNCA0NS4yLTIuOHMxMC40LTMzLjUtMi44LTQ1LjJDNDU5LjggMjE5LjIgMzkzIDE5MiAzMjAgMTkycy0xMzkuOCAyNy4yLTE5MC41IDcyYy0xMy4zIDExLjctMTQuNSAzMS45LTIuOCA0NS4yczMxLjkgMTQuNSA0NS4yIDIuOGMzOS41LTM0LjkgOTEuMy01NiAxNDguMi01NnptNjQgMTYwYTY0IDY0IDAgMSAwIC0xMjggMCA2NCA2NCAwIDEgMCAxMjggMHoiLz4NCjwvc3ZnPg0K",
"items": {
"coapbind": {
"newLine": true,
Expand Down
3 changes: 3 additions & 0 deletions icons/coap.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions icons/documentationLink.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions icons/documentationLinkRestrictedLogin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions icons/general.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions icons/mqtt.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions lib/jsonConfigSvg.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// convert SVG to base64 and store it in admin/jsonConfig.json
const fs = require('node:fs');
const jsonConfig = require('../admin/jsonConfig.json');
let changed = false;

function updateConfig(config, name, base64icon, changed) {
changed = changed || false;
for (const key in config) {
if (typeof config[key] === 'object') {
if (key === name || key === `_${name}` && config[key].icon && config[key].icon !== base64icon) {
changed = true;
config[key].icon = base64icon;
}
changed = updateConfig(config[key], name, base64icon, changed) || changed;
}
}
return changed;
}

fs.readdirSync('../icons').forEach(file => {
if (file.endsWith('.svg')) {
const svg = fs.readFileSync(`../icons/${file}`, 'utf8');
const base64 = `data:image/svg+xml;base64,${Buffer.from(svg).toString('base64')}`;
if (updateConfig(jsonConfig, file.replace('.svg', ''), base64)) {
changed = true;
}
}
});

if (changed) {
fs.writeFileSync('../admin/jsonConfig.json', JSON.stringify(jsonConfig, null, 4));
}
Loading

0 comments on commit 7ca113d

Please sign in to comment.