Breadcrumbs now show when editing property

This commit is contained in:
Stefan Zermatten
2022-08-12 19:20:23 +02:00
parent b324fb1f03
commit ecfeeaccd9
2 changed files with 24 additions and 14 deletions

View File

@@ -64,6 +64,7 @@
}, },
noLinks: Boolean, noLinks: Boolean,
noIcons: Boolean, noIcons: Boolean,
editing: Boolean,
}, },
computed:{ computed:{
props(){ props(){
@@ -95,7 +96,10 @@
store.commit('pushDialogStack', { store.commit('pushDialogStack', {
component: 'creature-property-dialog', component: 'creature-property-dialog',
elementId: `breadcrumb-${id}`, elementId: `breadcrumb-${id}`,
data: {_id: id}, data: {
_id: id,
startInEditTab: this.editing,
},
}); });
} }
}, },
@@ -120,7 +124,10 @@
store.commit('pushDialogStack', { store.commit('pushDialogStack', {
component: 'creature-root-dialog', component: 'creature-root-dialog',
elementId: 'breadcrumb-root', elementId: 'breadcrumb-root',
data: {_id: this.model.ancestors[0].id}, data: {
_id: this.model.ancestors[0].id,
startInEditTab: this.editing,
},
}); });
} }
} }

View File

@@ -14,6 +14,20 @@
/> />
</template> </template>
<template v-if="model"> <template v-if="model">
<div
class="layout mb-4"
>
<template v-if="!embedded">
<breadcrumbs
:model="model"
:editing="editing"
/>
</template>
<v-spacer />
<v-chip disabled>
{{ typeName }}
</v-chip>
</div>
<v-fade-transition <v-fade-transition
mode="out-in" mode="out-in"
> >
@@ -51,17 +65,6 @@
</component> </component>
</div> </div>
<div v-else> <div v-else>
<div
class="layout mb-4"
>
<template v-if="!embedded">
<breadcrumbs :model="model" />
</template>
<v-spacer />
<v-chip disabled>
{{ typeName }}
</v-chip>
</div>
<component <component
:is="model.type + 'Viewer'" :is="model.type + 'Viewer'"
:key="_id" :key="_id"
@@ -200,7 +203,7 @@ export default {
watch: { watch: {
_id: { _id: {
immediate: true, immediate: true,
handler(newId){ handler(newId) {
this.$nextTick(() => { this.$nextTick(() => {
this.currentId = newId; this.currentId = newId;
}); });