Skip to content

Commit

Permalink
v4.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jemu75 committed Dec 9, 2024
1 parent 1785357 commit e813afa
Show file tree
Hide file tree
Showing 10 changed files with 54 additions and 32 deletions.
3 changes: 3 additions & 0 deletions public/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# v4.5.1 (09.12.2024)
## Core
- bugfix for changing darkmode
# v4.5.0 (08.12.2024)
## Core
- new settings for parameter diff into replacer %d (nozero and numeric)
Expand Down
28 changes: 22 additions & 6 deletions src/stores/fhem.js
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,9 @@ export const useFhemStore = defineStore('fhem', () => {
for(const path of stat.panelMap[idx].items) {
doUpdate(app.panelList, path, evt.value)
}
} else {
}

if(stat.panelMap[idx].task) {
handleInternalTask(stat.panelMap[idx].task, evt.value)
}

Expand Down Expand Up @@ -662,6 +664,7 @@ export const useFhemStore = defineStore('fhem', () => {
panels = JSON.parse(JSON.stringify(app.config.panels)),
templates = JSON.parse(JSON.stringify(app.config.templates)),
templateIdx,
taskIdx,
darkModeDef

if(app.config.panels.length === 0) log(3, 'No Panels defined.', null, 'noPanels')
Expand Down Expand Up @@ -708,10 +711,21 @@ export const useFhemStore = defineStore('fhem', () => {
}

//add watching for updates
stat.panelMap.push({ reading: app.fhemDevice + '-update_available', task: 'update' })
if(app.header.darkModeOverFhem) {
darkModeDef = app.header.darkModeOverFhem.split(':')
if(darkModeDef.length === 2) stat.panelMap.push({ reading: darkModeDef[0], task: 'darkMode'})
taskIdx = stat.panelMap.map((e) => e.reading).indexOf(app.fhemDevice + '-update_available')
if(taskIdx !== -1) {
stat.panelMap[taskIdx].task = 'update'
} else {
stat.panelMap.push({ reading: app.fhemDevice + '-update_available', task: 'update' })
}

darkModeDef = app.header.darkModeOverFhem.split(':')
if(darkModeDef.length === 2) {
taskIdx = stat.panelMap.map((e) => e.reading).indexOf(darkModeDef[0])
if(taskIdx !== -1) {
stat.panelMap[taskIdx].task = 'darkMode'
} else {
stat.panelMap.push({ reading: darkModeDef[0], task: 'darkMode'})
}
}

log(4, 'PanelList and PanelMapping created.', { panelList: app.panelList, panelMap: stat.panelMap })
Expand Down Expand Up @@ -772,7 +786,9 @@ export const useFhemStore = defineStore('fhem', () => {

if(item.items) {
for(const path of item.items) doUpdate(panelList, path, val)
} else {
}

if(item.task) {
handleInternalTask(item.task, val)
}
}
Expand Down
3 changes: 3 additions & 0 deletions www/fhemapp4/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# v4.5.1 (09.12.2024)
## Core
- bugfix for changing darkmode
# v4.5.0 (08.12.2024)
## Core
- new settings for parameter diff into replacer %d (nozero and numeric)
Expand Down

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.

Large diffs are not rendered by default.

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

Loading

0 comments on commit e813afa

Please sign in to comment.