Skip to content

Commit

Permalink
v4.0.41-beta
Browse files Browse the repository at this point in the history
  • Loading branch information
jemu75 committed Apr 27, 2024
1 parent 5b7ad22 commit ae0a5a4
Show file tree
Hide file tree
Showing 11 changed files with 61 additions and 38 deletions.
4 changes: 4 additions & 0 deletions public/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# v4.0.41-beta (27.04.2024)
## Panel Status
- bug fix level switch on right side
- add button for template editor on loglevel 7
# v4.0.40-beta (25.04.2024)
## Core
- loading of standard templates optimised
Expand Down
43 changes: 29 additions & 14 deletions src/components/PanelCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,23 @@
}
}
function editItem(val) {
router.push({ name: 'settings', params: { tab: 'panels', item: val }, query: router.currentRoute.value.query })
function getTemplate(val) {
let idx = fhem.app.config.panels.map((e) => e.name).indexOf(val),
templateIdx,
res
if(idx !== -1) {
res = fhem.app.config.panels[idx].template
templateIdx = fhem.app.config.templates.map((e) => e.name).indexOf(res)
if(templateIdx !== -1 && !fhem.app.config.templates[templateIdx].dist) {
return res
}
}
}
function editItem(val, tab) {
router.push({ name: 'settings', params: { tab: tab, item: val }, query: router.currentRoute.value.query })
}
function getInfo(pos) {
Expand Down Expand Up @@ -146,21 +161,21 @@
/>
</v-col>
</v-row>

<v-sheet color="primary">
<v-img :src="img.url" :gradient="img.url ? fhem.app.header.imageGradient : ''" height="48" cover>
<v-card-title>
<v-row no-gutters class="align-center">
<v-col v-if="panel.status.title" class="text-truncate">
{{ title.title }}
</v-col>
<span v-if="fhem.app.settings.loglevel > 6" class="mx-2">
{{ sortby.sortby }}
</span>
<v-btn v-if="fhem.app.settings.loglevel > 6" icon="mdi-pencil" size="small" variant="plain" density="compact" @click="editItem(panel.name)"></v-btn>
<v-toolbar color="transparent" density="compact" class="pr-1">
<v-toolbar-title class="text-truncate">{{ title.title }}</v-toolbar-title>

<template v-slot:append>
<div v-if="fhem.app.settings.loglevel > 6">
{{ sortby.sortby }}
<v-btn v-if="getTemplate(panel.name)" icon="mdi-application-edit-outline" size="small" variant="plain" @click="editItem(getTemplate(panel.name), 'templates')"></v-btn>
<v-btn icon="mdi-pencil" size="small" variant="plain" @click="editItem(panel.name, 'panels')"></v-btn>
</div>
<v-btn v-if="levelOpts.icon" :icon="levelOpts.icon" size="small" variant="plain" density="compact" @click="levelClick()"></v-btn>
</v-row>
</v-card-title>
</template>
</v-toolbar>
</v-img>
</v-sheet>

Expand Down
4 changes: 4 additions & 0 deletions www/fhemapp4/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# v4.0.41-beta (27.04.2024)
## Panel Status
- bug fix level switch on right side
- add button for template editor on loglevel 7
# v4.0.40-beta (25.04.2024)
## Core
- loading of standard templates optimised
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.

Loading

0 comments on commit ae0a5a4

Please sign in to comment.