Use router.go(-1) instead of backlink on detail

This commit is contained in:
rijkvanzanten
2020-09-08 10:56:43 -04:00
parent ebd5d3e70d
commit 53ed9bc0f8
3 changed files with 5 additions and 14 deletions

View File

@@ -33,7 +33,7 @@
secondary
exact
v-tooltip.bottom="$t('back')"
:to="backLink"
@click="$router.go(-1)"
>
<v-icon name="arrow_back" />
</v-button>
@@ -257,8 +257,6 @@ export default defineComponent({
const confirmLeave = ref(false);
const leaveTo = ref<string | null>(null);
const backLink = computed(() => `/collections/${collection.value}/`);
const templateValues = computed(() => {
return {
...(item.value || {}),
@@ -303,7 +301,6 @@ export default defineComponent({
return {
item,
loading,
backLink,
error,
isNew,
edits,

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 :to="breadcrumb[0].to">
<v-button class="header-icon" rounded icon secondary exact @click="$router.go(-1)">
<v-icon name="arrow_back" />
</v-button>
</template>
@@ -72,13 +72,7 @@
</v-card>
</v-dialog>
<v-button
rounded
icon
@click="downloadFile"
class="download"
v-tooltip.bottom="$t('download')"
>
<v-button rounded icon @click="downloadFile" class="download" v-tooltip.bottom="$t('download')">
<v-icon name="save_alt" />
</v-button>
@@ -391,7 +385,7 @@ export default defineComponent({
function downloadFile() {
const filePath = getRootPath() + `assets/${props.primaryKey}`;
window.open(filePath, "_blank");
window.open(filePath, '_blank');
}
function useMovetoFolder() {

View File

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