Merge pull request #547 from directus/fix-545

Fix back button opening modal
This commit is contained in:
Rijk van Zanten
2020-10-06 13:09:16 -04:00
committed by GitHub
4 changed files with 10 additions and 4 deletions

View File

@@ -33,7 +33,7 @@
secondary
exact
v-tooltip.bottom="$t('back')"
@click="$router.go(-1)"
:to="'/collections/' + collection"
>
<v-icon name="arrow_back" />
</v-button>

View File

@@ -2,7 +2,7 @@
<files-not-found v-if="!loading && !item" />
<private-view v-else :title="loading || !item ? $t('loading') : item.title">
<template #title-outer:prepend>
<v-button class="header-icon" rounded icon secondary exact @click="$router.go(-1)">
<v-button class="header-icon" rounded icon secondary exact :to="to">
<v-icon name="arrow_back" />
</v-button>
</template>
@@ -286,6 +286,11 @@ export default defineComponent({
.filter((field: Field) => fieldsDenyList.includes(field.field) === false);
});
const to = computed(() => {
if(item.value?.folder !== undefined) return `/files?folder=${item.value.folder}`
else return '/files'
})
const { formFields } = useFormFields(fieldsFiltered);
const confirmLeave = ref(false);
@@ -327,6 +332,7 @@ export default defineComponent({
selectedFolder,
fileSrc,
form,
to
};
function changeCacheBuster() {

View File

@@ -2,7 +2,7 @@
<private-view :title="collectionInfo && collectionInfo.name">
<template #headline>{{ $t('settings_data_model') }}</template>
<template #title-outer:prepend>
<v-button class="header-icon" rounded icon exact @click="$router.go(-1)">
<v-button class="header-icon" rounded icon exact to="/settings/data-model">
<v-icon name="arrow_back" />
</v-button>
</template>

View File

@@ -1,7 +1,7 @@
<template>
<private-view :title="title">
<template #title-outer:prepend>
<v-button class="header-icon" rounded icon secondary exact @click="$router.go(-1)">
<v-button class="header-icon" rounded icon secondary exact to="/users">
<v-icon name="arrow_back" />
</v-button>
</template>