zigbee2mqtt-frontend 0.6.27 → 0.6.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.html CHANGED
@@ -1 +1 @@
1
- <!doctype html><html><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width,initial-scale=1"><title>Zigbee2MQTT</title><link rel="shortcut icon" type="image/x-icon" href="favicon.ico"/><link rel="subresource" href="./css/light.css"/><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.2/css/all.min.css" integrity="sha512-HK5fgLBL+xu6dm/Ii3z4xhlSUyZgTT9tuc/hSrtw6uzJOvgRr2a9jyxxT1ely+B+xFAmJKVSTbpM/CuL7qxO8w==" crossorigin="anonymous"/><link rel="apple-touch-icon" href="apple-touch-icon.png" sizes="150x150"><script defer="defer" src="runtime.3296ac9a5caef629c7d6.js"></script><script defer="defer" src="scripts/vendor.ea7989ca51c5d50873f3.js"></script><script defer="defer" src="main.698ad679870ad5f70246.js"></script><link href="scripts/vendor.109be7bda8112bf971cc.css" rel="stylesheet"><link href="main.3d1da3b8dbc50333ee92.css" rel="stylesheet"></head><body><div id="root" class="wrapper"></div></body></html>
1
+ <!doctype html><html><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width,initial-scale=1"><title>Zigbee2MQTT</title><link rel="shortcut icon" type="image/x-icon" href="favicon.ico"/><link rel="subresource" href="./css/light.css"/><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.2/css/all.min.css" integrity="sha512-HK5fgLBL+xu6dm/Ii3z4xhlSUyZgTT9tuc/hSrtw6uzJOvgRr2a9jyxxT1ely+B+xFAmJKVSTbpM/CuL7qxO8w==" crossorigin="anonymous"/><link rel="apple-touch-icon" href="apple-touch-icon.png" sizes="150x150"><script defer="defer" src="runtime.3296ac9a5caef629c7d6.js"></script><script defer="defer" src="scripts/vendor.ea7989ca51c5d50873f3.js"></script><script defer="defer" src="main.45a8af9708ddef58a776.js"></script><link href="scripts/vendor.109be7bda8112bf971cc.css" rel="stylesheet"><link href="main.3d1da3b8dbc50333ee92.css" rel="stylesheet"></head><body><div id="root" class="wrapper"></div></body></html>
@@ -1363,14 +1363,15 @@ const OTALink = (props) => {
1363
1363
 
1364
1364
 
1365
1365
 
1366
- const PowerSource = ({ source = "", battery, batteryLow, showLevel, ...rest }) => {
1366
+ const powerSourceTypeToTranslationKey = (source) => {
1367
+ return source.toLowerCase().replace(/\s/g, '_').replace(/[^a-z0-9_]/g, '');
1368
+ };
1369
+ const PowerSource = ({ source, battery, batteryLow, showLevel, ...rest }) => {
1367
1370
  const { t } = (0,useTranslation/* useTranslation */.$)("zigbee");
1368
1371
  let batteryClass = "";
1369
- let title = "";
1370
- let translationKey = source === null || source === void 0 ? void 0 : source.toLowerCase().replace(/\s/g, '_').replace(/[^a-z0-9_]/g, '');
1371
1372
  switch (source) {
1372
1373
  case "Battery":
1373
- title = t(translationKey);
1374
+ let title = t(powerSourceTypeToTranslationKey(source));
1374
1375
  if (batteryLow !== undefined) {
1375
1376
  batteryClass = batteryLow ? `fa-battery-empty animation-blinking text-danger` : 'fa-battery-full text-success';
1376
1377
  title += batteryLow ? ' LOW' : ' OK';
@@ -1409,8 +1410,7 @@ const PowerSource = ({ source = "", battery, batteryLow, showLevel, ...rest }) =
1409
1410
  react.createElement("i", { className: `fa ${batteryClass}`, title: title, ...rest }));
1410
1411
  case "Mains (single phase)":
1411
1412
  case "DC Source":
1412
- title = t(translationKey);
1413
- return react.createElement("i", { className: `fa fa-plug ${power_source_style.plug}`, title: title, ...rest });
1413
+ return react.createElement("i", { className: `fa fa-plug ${power_source_style.plug}`, title: t(powerSourceTypeToTranslationKey(source)), ...rest });
1414
1414
  default:
1415
1415
  return react.createElement("i", { className: `fa fa-question`, title: source, ...rest });
1416
1416
  }
@@ -3635,7 +3635,7 @@ class SettingsPage extends react.Component {
3635
3635
  zigbee2mqttCommit) },
3636
3636
  { translationKey: 'coordinator_type', content: react.createElement(react.Fragment, null, (_c = (_b = bridgeInfo.coordinator) === null || _b === void 0 ? void 0 : _b.type) !== null && _c !== void 0 ? _c : t('common:unknown')) },
3637
3637
  { translationKey: 'coordinator_revision', content: react.createElement(react.Fragment, null, (_f = (_e = (_d = bridgeInfo.coordinator) === null || _d === void 0 ? void 0 : _d.meta) === null || _e === void 0 ? void 0 : _e.revision) !== null && _f !== void 0 ? _f : t('common:unknown')) },
3638
- { translationKey: 'frontend_version', content: "0.6.27" },
3638
+ { translationKey: 'frontend_version', content: "0.6.28" },
3639
3639
  ];
3640
3640
  return react.createElement("div", { className: "p-3" }, rows.map(row => react.createElement("dl", { key: row.translationKey, className: "row" },
3641
3641
  react.createElement("dt", { className: "col-sm-3" }, t(row.translationKey)),
@@ -5209,4 +5209,4 @@ module.exports = "class MyExampleExtension_TS_ {\n constructor(zigbee, mqtt,
5209
5209
  /******/ var __webpack_exports__ = __webpack_require__.O();
5210
5210
  /******/ }
5211
5211
  ]);
5212
- //# sourceMappingURL=main.698ad679870ad5f70246.js.map
5212
+ //# sourceMappingURL=main.45a8af9708ddef58a776.js.map
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "*.css"
9
9
  ],
10
10
  "name": "zigbee2mqtt-frontend",
11
- "version": "0.6.27",
11
+ "version": "0.6.28",
12
12
  "license": "GPL-3.0",
13
13
  "scripts": {
14
14
  "build": "npm run clean && webpack --config ./webpack.config.js --mode production",