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,
noIcons: Boolean,
editing: Boolean,
},
computed:{
props(){
@@ -95,7 +96,10 @@
store.commit('pushDialogStack', {
component: 'creature-property-dialog',
elementId: `breadcrumb-${id}`,
data: {_id: id},
data: {
_id: id,
startInEditTab: this.editing,
},
});
}
},
@@ -120,7 +124,10 @@
store.commit('pushDialogStack', {
component: 'creature-root-dialog',
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 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
mode="out-in"
>
@@ -51,17 +65,6 @@
</component>
</div>
<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
:is="model.type + 'Viewer'"
:key="_id"
@@ -200,7 +203,7 @@ export default {
watch: {
_id: {
immediate: true,
handler(newId){
handler(newId) {
this.$nextTick(() => {
this.currentId = newId;
});