Closed wuschi closed 6 days ago
btw.: does anybody know why the location card has a different height than the equipment and properties cars? Is it because of the badges? The ui looks a little bit odd when having these widgets on the same page (see first screenshot).
For your reference, here is the yaml code for my tabbed page, as it is currently not yet possible to add the model tabs in the page designer:
tabs:
- component: oh-tab
config:
icon: material:home
page: page:overview
title: Übersicht
slots:
default: []
- component: oh-locations-tab
config:
title: Außen / Keller
icon: material:place
excludedCards:
- gEG_Eingang
- gEG_WC
- gEG_Flur_Altbau
- gEG_Lager
- gEG_Kueche
- gEG_Essen
- gEG_Wohnen
- gEG_Flur_Anbau
- gEG_Gaeste
- gEG_Buero
- gEG_HWR
- gOG_Flur
- gOG_Elternbad
- gOG_Kinderbad
- gOG_Ankleide
- gOG_Schlafen
- gEG_Anbau
- gEG
- gEinfahrt
- gGarten
- gInnen
- gOG
- gTerrasse
- gHof
cardOrder:
- gAussen
- gGarage
- gKG
- component: oh-locations-tab
config:
title: Erdgeschoss
icon: material:place
excludedCards:
- gOG_Flur
- gOG_Elternbad
- gOG_Kinderbad
- gOG_Ankleide
- gOG_Schlafen
- gEG_Anbau
- gEG
- gEinfahrt
- gGarten
- gInnen
- gOG
- gTerrasse
- gAussen
- gHof
- gGarage
- gKG
cardOrder:
- gEG_Eingang
- gEG_WC
- separator: Altbau
- gEG_Flur_Altbau
- gEG_Lager
- gEG_Kueche
- gEG_Essen
- gEG_Wohnen
- separator: Anbau
- gEG_Flur_Anbau
- gEG_Gaeste
- gEG_Buero
- gEG_HWR
- component: oh-locations-tab
config:
title: Obergeschoss
icon: material:place
excludedCards:
- gEinfahrt
- gAussen
- gHof
- gGarage
- gKG
- gEG_Eingang
- gEG_Flur_Altbau
- gEG_Flur_Anbau
- gEG_WC
- gEG_Lager
- gEG_Kueche
- gEG_Essen
- gEG_Wohnen
- gEG_Gaeste
- gEG_Buero
- gEG_HWR
cardOrder:
- gOG_Flur
- gOG_Ankleide
- gOG_Schlafen
- separator: Bäder
- gOG_Elternbad
- gOG_Kinderbad
- component: oh-equipment-tab
config:
title: Geräte
icon: f7:cube_box_fill
- component: oh-properties-tab
config:
title: Messwerte
icon: f7:bolt_fill
excludedCards:
- Light
slots:
Current:
- component: oh-property-card
config:
title: Stromverbrauch
Opening:
- component: oh-property-card
config:
title: Stellwerte
The problem
This feature request is created only for documentation purposes, as I already have implemented it and will create a pull request after some final testing.
Currently it is not possible to use the model cards (location / equipment / properties cards) and model tabs (locations / equipment / properties) outside of the home page.
I think it would be a great addition if usage of the model cards outside of the home page, as well as the model tabs on a custom tabbed page, would be possible.
Your suggestion
In my opinion, the main reason why this is currently not possible is that the model used for these tabs and cards is loaded by the vue components for the home page (home.vue and home-edit.vue). Loading the model on app initialization and putting it in the vuex store would allow usage of the model directly from the respective widgets.
I moved the code for loading the model to a new vuex store module and added some minor changes for avoiding circular references (parent and modelPatth properties in the model).
Below are some screenshots from my working implementation on a custom tabbed page:
Your environment
Additional information