Skip to content

Commit

Permalink
v.3.31.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jemu75 committed Mar 20, 2022
1 parent c091d7c commit 0002a2f
Show file tree
Hide file tree
Showing 17 changed files with 406 additions and 308 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ Wenn ihr in **FHEMApp** Daten aus FHEM-Logs in Charts darstellt, ist es ggf. sin
```

### Anzeigeeinstellungen für FHEMApp (optional)
Wenn ihr in **FHEMApp** bei der mobilen Ansicht (1-spaltiges Layout) im Header sehen wollt, in welcher Bereich bzw. in welche Gruppe euch gerade befindet, dann könnt ihr unter Options den Parameter `mobileHeader` setzen. Ebenfalls in der mobilen Ansicht könnt ihr über den Parameter `homeBtn` einen Home-Button auf der rechten Seite im Header einblenden. Weiterhin könnt ihr über den Parameter `reloadBtn` einen Button für einen kompletten Browser-Refresh im Header aktivieren. Über die Parameter `expandGroups` bzw. `expandRooms` könnt ihr festlegen, ob die Gruppen bzw. Räume in der Navigationsleiste beim Starten von **FHEMApp** geöffnet oder geschlossen sein sollen. Über den Parameter `lang` kann die Sprache der App umgestellt werden. Aktuell stehen `de` (deutsch) und `en` (englisch) zur Verfügung. Über den Parameter `clockFormat` kann die Anzeige der Uhrzeit im Header verändert werden.
Wenn ihr **FHEMApp** in der mobilen Ansicht (1-spaltiges Layout) verwendet, könnt ihr optional im Header unterschiedliche Informationen über den Parameter `mobileHeaderContent` anzeigen. Hierfür stehen die Werte `page` oder `clock` oder `date` zur Verfügung. Ebenfalls in der mobilen Ansicht könnt ihr über den Parameter `homeBtn` einen Home-Button auf der rechten Seite im Header einblenden. Weiterhin könnt ihr über den Parameter `reloadBtn` einen Button für einen kompletten Browser-Refresh im Header aktivieren. Über die Parameter `expandGroups` bzw. `expandRooms` könnt ihr festlegen, ob die Gruppen bzw. Räume in der Navigationsleiste beim Starten von **FHEMApp** geöffnet oder geschlossen sein sollen. Über den Parameter `lang` kann die Sprache der App umgestellt werden. Aktuell stehen `de` (deutsch) und `en` (englisch) zur Verfügung. Über den Parameter `clockFormat` kann die Anzeige der Uhrzeit im Header verändert werden.
```
"options": {
"mobileHeader": true,
"mobileHeaderContent": "page",
"reloadBtn": true,
"homeBtn": true,
"expandGroups": false,
Expand Down
599 changes: 314 additions & 285 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fhemapp",
"version": "3.30.3",
"version": "3.31.0",
"private": true,
"author": "jemu75",
"scripts": {
Expand All @@ -18,15 +18,15 @@
"vue-i18n": "^8.26.3",
"vue-json-pretty": "^1.8.2",
"vue-router": "^3.5.1",
"vuetify": "^2.6.3"
"vuetify": "^2.6.3"
},
"devDependencies": {
"@babel/core": "^7.12.16",
"@babel/eslint-parser": "^7.12.16",
"@vue/cli-plugin-babel": "~5.0.0",
"@vue/cli-plugin-eslint": "~5.0.0",
"@vue/cli-plugin-router": "~5.0.0",
"@vue/cli-service": "~5.0.0",
"@vue/cli-service": "^5.0.3",
"eslint": "^7.32.0",
"eslint-plugin-vue": "^8.0.3",
"sass": "^1.32.7",
Expand Down
32 changes: 32 additions & 0 deletions public/cfg/templ_shellyrgb_mqtt.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "shellyrgb_mqtt",
"author": "jemu75",
"date": "2022-03-19",
"expand": true,
"status": {
"bar": ["state:on:100:success","state:off:0:success"],
"error": ["network:^(?!<html>connected):100:error:keine Verbindung"]
},
"main": [
{
"leftBtn": "mdi-power-off",
"leftClick": ["state::off"],
"text": ["state:on:an","state:off:aus"],
"rightBtn": "mdi-power-on",
"rightClick": ["state::on"]
},
{
"leftBtn": "mdi-lightbulb-outline",
"leftClick": ["gain::gain 0"],
"slider": ["gain::gain %v:%n:0:100"],
"rightBtn": "mdi-lightbulb-on-outline",
"rightClick": ["gain::gain 100"]
}
],
"info": {
"left1": ["state:on::mdi-lightbulb","state:off::mdi-lightbulb-off"],
"left2": ["color_0_power:0.1:%n.2w"],
"right1": ["new_fw:true::mdi-cloud-download"],
"right2": ["wifi_sta_connected:true::mdi-wifi","network:::mdi-wifi-off"]
}
}
13 changes: 7 additions & 6 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@
</div>
<v-spacer />
<div
v-if="app.options.mobileHeader"
class="text-h5"
v-if="app.options.mobileHeader || app.options.mobileHeaderContent"
class="text-h5 hidden-lg-and-up"
>
{{ appBar.header }}
{{ appBar.mobileHeader }}
</div>

<div
v-if="!app.options.mobileHeader"
class="hidden-md-and-down text-h5"
class="text-h5 hidden-md-and-down"
>
{{ appBar.header }}
</div>

<v-spacer />
<v-btn
v-if="app.options.debugMode"
Expand Down Expand Up @@ -220,7 +220,8 @@
loading: false,
reloadBtn: false,
expandGroups: false,
expandRooms: false
expandRooms: false,
mobileHeaderContent: false
},
session: {
connect: false,
Expand Down
7 changes: 5 additions & 2 deletions src/plugins/fhem.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ class Fhem extends EventEmitter {
color: 'primary',
drawer: false,
clock: null,
header: null
header: null,
mobileHeader: null
},
templates: [],
componentMap: [
Expand Down Expand Up @@ -854,8 +855,10 @@ class Fhem extends EventEmitter {
let timestamp = new Date();

this.app.appBar.clock = timestamp.toLocaleString(this.app.options.lang, this.app.options.clockFormat)
this.app.appBar.header = timestamp.toLocaleString(this.app.options.lang, { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' })

if(!this.app.options.mobileHeader) this.app.appBar.header = timestamp.toLocaleString(this.app.options.lang, { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' })
if(this.app.options.mobileHeaderContent === 'clock') this.app.appBar.mobileHeader = timestamp.toLocaleString(this.app.options.lang, this.app.options.clockFormat)
if(this.app.options.mobileHeaderContent === 'date') this.app.appBar.mobileHeader = timestamp.toLocaleString(this.app.options.lang, { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' })
}

// mainFunction: Initializing FHEM App
Expand Down
9 changes: 5 additions & 4 deletions src/views/Devices.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,16 @@ export default {
methods: {
setHeader() {
if(this.app.options.mobileHeader) {
// this.app.options.mobileHeader can be deprecated because of new param mobileHeaderContent
if(this.app.options.mobileHeader || this.app.options.mobileHeaderContent === 'page') {
if(this.$route.name === 'Devices') {
if(this.$route.params.filter.match('device=')) {
this.$fhem.app.appBar.header = '';
this.$fhem.app.appBar.mobileHeader = '';
} else {
this.$fhem.app.appBar.header = this.$route.params.filter.split('=')[1];
this.$fhem.app.appBar.mobileHeader = this.$route.params.filter.split('=')[1];
}
} else {
this.$fhem.app.appBar.header = this.$route.name;
this.$fhem.app.appBar.mobileHeader = this.$route.name;
}
}
},
Expand Down
32 changes: 32 additions & 0 deletions www/fhemapp/cfg/templ_shellyrgb_mqtt.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "shellyrgb_mqtt",
"author": "jemu75",
"date": "2022-03-19",
"expand": true,
"status": {
"bar": ["state:on:100:success","state:off:0:success"],
"error": ["network:^(?!<html>connected):100:error:keine Verbindung"]
},
"main": [
{
"leftBtn": "mdi-power-off",
"leftClick": ["state::off"],
"text": ["state:on:an","state:off:aus"],
"rightBtn": "mdi-power-on",
"rightClick": ["state::on"]
},
{
"leftBtn": "mdi-lightbulb-outline",
"leftClick": ["gain::gain 0"],
"slider": ["gain::gain %v:%n:0:100"],
"rightBtn": "mdi-lightbulb-on-outline",
"rightClick": ["gain::gain 100"]
}
],
"info": {
"left1": ["state:on::mdi-lightbulb","state:off::mdi-lightbulb-off"],
"left2": ["color_0_power:0.1:%n.2w"],
"right1": ["new_fw:true::mdi-cloud-download"],
"right2": ["wifi_sta_connected:true::mdi-wifi","network:::mdi-wifi-off"]
}
}
1 change: 0 additions & 1 deletion www/fhemapp/css/app.3de6559d.css

This file was deleted.

1 change: 1 addition & 0 deletions www/fhemapp/css/app.eb6c420f.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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><script defer="defer" type="module" src="js/chunk-vendors.38de9a7d.js"></script><script defer="defer" type="module" src="js/app.027d1bd1.js"></script><link href="css/chunk-vendors.9d4b34aa.css" rel="stylesheet"><link href="css/app.3de6559d.css" rel="stylesheet"><script defer="defer" src="js/chunk-vendors-legacy.bb1050dc.js" nomodule></script><script defer="defer" src="js/app-legacy.b6a92ef8.js" nomodule></script></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></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><script defer="defer" type="module" src="js/chunk-vendors.38de9a7d.js"></script><script defer="defer" type="module" src="js/app.be88ff05.js"></script><link href="css/chunk-vendors.9d4b34aa.css" rel="stylesheet"><link href="css/app.eb6c420f.css" rel="stylesheet"><script defer="defer" src="js/chunk-vendors-legacy.bb1050dc.js" nomodule></script><script defer="defer" src="js/app-legacy.9b866fe4.js" nomodule></script></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></body></html>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions www/fhemapp/js/app-legacy.9b866fe4.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion www/fhemapp/js/app-legacy.b6a92ef8.js

This file was deleted.

1 change: 0 additions & 1 deletion www/fhemapp/js/app.027d1bd1.js

This file was deleted.

1 change: 1 addition & 0 deletions www/fhemapp/js/app.be88ff05.js

Large diffs are not rendered by default.

0 comments on commit 0002a2f

Please sign in to comment.