Skip to content

Commit

Permalink
Home edit: Fix model card settings drop-down not accessible
Browse files Browse the repository at this point in the history
Fixes issue mentioned in openhab#2144 (comment).

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
  • Loading branch information
florian-h05 committed Feb 5, 2024
1 parent 1e1ef59 commit 07fc558
Showing 1 changed file with 20 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,20 @@
<f7-preloader />
<div>Loading...</div>
</f7-block>
<!-- <f7-block class="block-narrow" v-if="ready && !previewMode">
<page-settings :page="page" :createMode="createMode" />
</f7-block> -->

<f7-block class="block-narrow" style="padding-bottom: 8rem" v-else-if="ready && modelReady && !previewMode">
<f7-col>
<f7-block-title>Page Configuration</f7-block-title>
<config-sheet
:parameterGroups="pageWidgetDefinition.props.parameterGroups || []"
:parameters="pageWidgetDefinition.props.parameters || []"
:configuration="page.config"
@updated="dirty = true" />
</f7-col>
<div v-else-if="!previewMode">
<f7-block class="block-narrow no-padding">
<f7-col>
<f7-block-title>Page Configuration</f7-block-title>
<config-sheet
:parameterGroups="pageWidgetDefinition.props.parameterGroups || []"
:parameters="pageWidgetDefinition.props.parameters || []"
:configuration="page.config"
@updated="dirty = true" />
</f7-col>
</f7-block>

<f7-col>
<f7-block>
<f7-segmented strong tag="p">
<f7-button v-for="tab in modelTabs" :key="tab.value" @click="showCardControls = false; currentModelTab = tab.value" :active="currentModelTab === tab.value" :text="tab.label" />
</f7-segmented>
Expand Down Expand Up @@ -83,7 +82,9 @@
</f7-list-item>
</f7-list>
</div>
</f7-block>

<f7-block style="z-index: -1">
<div v-if="currentModelTab === 'locations'">
<config-sheet
:parameterGroups="locationsTabParameters.props.parameterGroups || []"
Expand All @@ -107,9 +108,10 @@
:configuration="page.slots.properties[0].config"
@updated="dirty = true" />
</div>
</f7-col>
</f7-block>
<div v-else-if="ready && previewMode && currentTab === 'design'" :context="context" :key="pageKey">
</f7-block>
</div>

<div v-else :context="context" :key="pageKey">
<model-tab style="margin-bottom: 4rem" :context="context" :type="currentModelTab" :model="model" :page="page" />
</div>
</f7-tab>
Expand Down Expand Up @@ -152,6 +154,7 @@ import { OhHomePageDefinition, OhLocationsTabParameters, OhEquipmentTabParameter
import ConfigSheet from '@/components/config/config-sheet.vue'
import ModelTab from '@/pages/home/model-tab.vue'
import PageSettings from '@/components/pagedesigner/page-settings.vue'
const ConfigurableWidgets = {
'oh-location-card': OhLocationCardParameters,
Expand All @@ -162,6 +165,7 @@ const ConfigurableWidgets = {
export default {
mixins: [PageDesigner, HomeCards],
components: {
PageSettings,
'editor': () => import(/* webpackChunkName: "script-editor" */ '@/components/config/controls/script-editor.vue'),
ConfigSheet,
ModelTab
Expand Down

0 comments on commit 07fc558

Please sign in to comment.