Skip to content

Commit

Permalink
v.3.20.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jemu75 committed May 13, 2021
1 parent f24710e commit b5edca1
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 15 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fhemapp",
"version": "3.20.1",
"version": "3.20.2",
"private": true,
"author": "jemu75",
"scripts": {
Expand Down
2 changes: 0 additions & 2 deletions public/cfg/templ_dimmer2.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
"leftBtn": "mdi-dots-vertical",
"leftMenu": ["aus:off","25 %:pct 25","50 %:pct 50","75 %:pct 75","an:on"],
"text": ["pct::%n%"],
"midBtn": "mdi-dots-vertical",
"midMenu": ["aus:off","25 %:pct 25","50 %:pct 50","75 %:pct 75","an:on"],
"rightBtn": "mdi-dots-vertical",
"rightMenu": ["aus:off","25 %:pct 25","50 %:pct 50","75 %:pct 75","an:on"]
}
Expand Down
6 changes: 3 additions & 3 deletions src/components/TemplDefault.vue
Original file line number Diff line number Diff line change
Expand Up @@ -466,8 +466,8 @@
let result = '';
if(param.match('set')) {
let parts = param.split(' ');
if(parts[1].match('Connected')) {
let parts = param.trim().split(' ');
if(parts[1] && parts[1].match('Connected')) {
let device = parts[1].replace('Connected.','');
parts[1] = this.$fhem.getEl(this.item, 'Connected', device, 'Internals', 'NAME');
Expand Down Expand Up @@ -582,7 +582,7 @@
let value = /\./.test(parts[0]) ? parts[0].split('.') : [ 'Readings', parts[0], 'Value' ];
let state = this.$fhem.getEl(this.item, ...value);
if(state.match(parts[1])) result = true;
if(state && state.match(parts[1])) result = true;
}
return result;
Expand Down
32 changes: 29 additions & 3 deletions src/components/TemplPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@
dense
color="secondary lighten-2"
>
<v-list-item-group>
<v-list-item-group
v-model="el.menuIdx"
active-class="success--text"
>
<v-list-item
v-for="(menu, i) in el.menu"
:key="i"
Expand All @@ -127,6 +130,9 @@
{{ menu.name }}
</v-list-item-title>
</v-list-item-content>
<v-list-item-icon v-if="menu.active">
<v-icon>mdi-check</v-icon>
</v-list-item-icon>
</v-list-item>
</v-list-item-group>
</v-list>
Expand Down Expand Up @@ -239,6 +245,23 @@
this.$fhem.request(cmd);
},
checkMenu(device, cmd) {
let result = false;
if(cmd) {
let parts = cmd.split(' ');
if(parts[0].match('set')) parts.splice(0, 2);
if(parts.length === 1) parts.splice(0, 0, 'state');
let value = /\./.test(parts[0]) ? parts[0].split('.') : [ 'Readings', parts[0], 'Value' ];
let state = this.$fhem.getEl(device, ...value);
if(state && state.match(parts[1])) result = true;
}
return result;
},
loadItem(obj) {
let device = this.$fhem.getEl(obj, 'Name') || '';
let alias = this.$fhem.getEl(obj, 'Attributes', 'alias') || obj.Name;
Expand All @@ -257,7 +280,9 @@
if(menu.length > 0) {
for(const el of menu) {
let parts = el.split(':');
if(parts.length == 2) menuItems.push({ name: parts[0], cmd: parts[1] })
let active = this.checkMenu(obj, parts[1]);
if(parts.length == 2) menuItems.push({ name: parts[0], cmd: parts[1], active })
}
}
Expand Down Expand Up @@ -295,7 +320,8 @@
icon: data.icon,
route: data.route,
click: data.click,
menu: data.menu
menu: data.menu,
menuIdx: data.menu.map((e) => e.active).indexOf(true)
};
if(data.color != 'success') {
Expand Down
2 changes: 0 additions & 2 deletions www/fhemapp/cfg/templ_dimmer2.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
"leftBtn": "mdi-dots-vertical",
"leftMenu": ["aus:off","25 %:pct 25","50 %:pct 50","75 %:pct 75","an:on"],
"text": ["pct::%n%"],
"midBtn": "mdi-dots-vertical",
"midMenu": ["aus:off","25 %:pct 25","50 %:pct 50","75 %:pct 75","an:on"],
"rightBtn": "mdi-dots-vertical",
"rightMenu": ["aus:off","25 %:pct 25","50 %:pct 50","75 %:pct 75","an:on"]
}
Expand Down
2 changes: 1 addition & 1 deletion www/fhemapp/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html lang="de"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"><meta name="mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-capable" content="yes"><link rel="icon" href="favicon.png"><link rel="apple-touch-icon" href="apple-touch-icon.png"><title>fhemapp</title><link href="css/chunk-00f750ae.8853dffa.css" rel="prefetch"><link href="css/chunk-03454508.55c011d2.css" rel="prefetch"><link href="css/chunk-0c34425c.11195de6.css" rel="prefetch"><link href="css/chunk-12e7f05c.803d1e0c.css" rel="prefetch"><link href="css/chunk-1444c05b.460ac60a.css" rel="prefetch"><link href="css/chunk-15fa718e.55c011d2.css" rel="prefetch"><link href="css/chunk-28c4def2.9d7b53c6.css" rel="prefetch"><link href="css/chunk-325da004.d6669d5e.css" rel="prefetch"><link href="css/chunk-369d55e6.06c548e9.css" rel="prefetch"><link href="css/chunk-3ab9f3ab.11195de6.css" rel="prefetch"><link href="css/chunk-40496c8f.55f3049e.css" rel="prefetch"><link href="css/chunk-97aef864.ab3894ae.css" rel="prefetch"><link href="css/chunk-a3bdc2ee.24ee5340.css" rel="prefetch"><link href="js/chunk-00f750ae.7fc9b0ad.js" rel="prefetch"><link href="js/chunk-03454508.9df43ef6.js" rel="prefetch"><link href="js/chunk-0c34425c.b465d2d6.js" rel="prefetch"><link href="js/chunk-12e7f05c.7899c456.js" rel="prefetch"><link href="js/chunk-1444c05b.136b534d.js" rel="prefetch"><link href="js/chunk-15fa718e.4ae3c793.js" rel="prefetch"><link href="js/chunk-28c4def2.0e1dcb12.js" rel="prefetch"><link href="js/chunk-2d212bf1.233e9bdb.js" rel="prefetch"><link href="js/chunk-2d22937e.ea39b59a.js" rel="prefetch"><link href="js/chunk-2d22d812.4e2f5162.js" rel="prefetch"><link href="js/chunk-325da004.1d5d0347.js" rel="prefetch"><link href="js/chunk-369d55e6.a6d8f7e5.js" rel="prefetch"><link href="js/chunk-3ab9f3ab.fa42960e.js" rel="prefetch"><link href="js/chunk-40496c8f.3e98a56c.js" rel="prefetch"><link href="js/chunk-97aef864.ef2d1bc6.js" rel="prefetch"><link href="js/chunk-a3bdc2ee.0de04460.js" rel="prefetch"><link href="css/app.27c949a3.css" rel="preload" as="style"><link href="css/chunk-vendors.b3e40f08.css" rel="preload" as="style"><link href="js/app.a5ce73d0.js" rel="preload" as="script"><link href="js/chunk-vendors.6738628a.js" rel="preload" as="script"><link href="css/chunk-vendors.b3e40f08.css" rel="stylesheet"><link href="css/app.27c949a3.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but fhemapp doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="js/chunk-vendors.6738628a.js"></script><script src="js/app.a5ce73d0.js"></script></body></html>
<!DOCTYPE html><html lang="de"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"><meta name="mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-capable" content="yes"><link rel="icon" href="favicon.png"><link rel="apple-touch-icon" href="apple-touch-icon.png"><title>fhemapp</title><link href="css/chunk-00f750ae.8853dffa.css" rel="prefetch"><link href="css/chunk-03454508.55c011d2.css" rel="prefetch"><link href="css/chunk-0c34425c.11195de6.css" rel="prefetch"><link href="css/chunk-12e7f05c.803d1e0c.css" rel="prefetch"><link href="css/chunk-1444c05b.460ac60a.css" rel="prefetch"><link href="css/chunk-15fa718e.55c011d2.css" rel="prefetch"><link href="css/chunk-28c4def2.9d7b53c6.css" rel="prefetch"><link href="css/chunk-325da004.d6669d5e.css" rel="prefetch"><link href="css/chunk-369d55e6.06c548e9.css" rel="prefetch"><link href="css/chunk-3ab9f3ab.11195de6.css" rel="prefetch"><link href="css/chunk-40496c8f.55f3049e.css" rel="prefetch"><link href="css/chunk-97aef864.ab3894ae.css" rel="prefetch"><link href="css/chunk-a3bdc2ee.24ee5340.css" rel="prefetch"><link href="js/chunk-00f750ae.31479edc.js" rel="prefetch"><link href="js/chunk-03454508.9df43ef6.js" rel="prefetch"><link href="js/chunk-0c34425c.b465d2d6.js" rel="prefetch"><link href="js/chunk-12e7f05c.7899c456.js" rel="prefetch"><link href="js/chunk-1444c05b.85f227c2.js" rel="prefetch"><link href="js/chunk-15fa718e.4ae3c793.js" rel="prefetch"><link href="js/chunk-28c4def2.0e1dcb12.js" rel="prefetch"><link href="js/chunk-2d212bf1.233e9bdb.js" rel="prefetch"><link href="js/chunk-2d22937e.ea39b59a.js" rel="prefetch"><link href="js/chunk-2d22d812.4e2f5162.js" rel="prefetch"><link href="js/chunk-325da004.1d5d0347.js" rel="prefetch"><link href="js/chunk-369d55e6.a6d8f7e5.js" rel="prefetch"><link href="js/chunk-3ab9f3ab.fa42960e.js" rel="prefetch"><link href="js/chunk-40496c8f.3e98a56c.js" rel="prefetch"><link href="js/chunk-97aef864.ef2d1bc6.js" rel="prefetch"><link href="js/chunk-a3bdc2ee.0de04460.js" rel="prefetch"><link href="css/app.27c949a3.css" rel="preload" as="style"><link href="css/chunk-vendors.b3e40f08.css" rel="preload" as="style"><link href="js/app.ce23e979.js" rel="preload" as="script"><link href="js/chunk-vendors.6738628a.js" rel="preload" as="script"><link href="css/chunk-vendors.b3e40f08.css" rel="stylesheet"><link href="css/app.27c949a3.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but fhemapp doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="js/chunk-vendors.6738628a.js"></script><script src="js/app.ce23e979.js"></script></body></html>

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions www/fhemapp/js/chunk-00f750ae.31479edc.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion www/fhemapp/js/chunk-00f750ae.7fc9b0ad.js

This file was deleted.

1 change: 0 additions & 1 deletion www/fhemapp/js/chunk-1444c05b.136b534d.js

This file was deleted.

1 change: 1 addition & 0 deletions www/fhemapp/js/chunk-1444c05b.85f227c2.js

Large diffs are not rendered by default.

0 comments on commit b5edca1

Please sign in to comment.