From 6a78b62f726a0a1c0ae5c89f0ca6dc0de3cfb575 Mon Sep 17 00:00:00 2001 From: John Cowen Date: Wed, 1 Nov 2023 10:00:14 +0000 Subject: [PATCH] Use two buttons Signed-off-by: John Cowen --- .../components/route-view/RouteView.vue | 15 +------------- src/app/zones/views/CreateView.vue | 20 ++++++++++--------- 2 files changed, 12 insertions(+), 23 deletions(-) diff --git a/src/app/application/components/route-view/RouteView.vue b/src/app/application/components/route-view/RouteView.vue index 3efc5a9104..dd6abc6c19 100644 --- a/src/app/application/components/route-view/RouteView.vue +++ b/src/app/application/components/route-view/RouteView.vue @@ -20,17 +20,6 @@ update: routeUpdate, replace: routeReplace, params: routeParams, - back: (...args: RouteReplaceParams) => { - try { - if(win.history.state.back !== null) { - win.history.back() - return - } - } catch(_) { - // passthrough - } - routeReplace(...args) - }, }" /> @@ -61,7 +50,6 @@ const can = useCan() const { t } = useI18n() const route = useRoute() const router = useRouter() -const win = window const sym = Symbol('route-view') const props = withDefaults(defineProps<{ @@ -152,8 +140,7 @@ const routeUpdate = (params: Record) => { } routerPush(newParams) } -type RouteReplaceParams = Parameters -const routeReplace = (...args: RouteReplaceParams) => { +const routeReplace = (...args: Parameters) => { router.push(...args) } watch(() => props.name, () => { diff --git a/src/app/zones/views/CreateView.vue b/src/app/zones/views/CreateView.vue index f3d55938f1..906a1ca8e4 100644 --- a/src/app/zones/views/CreateView.vue +++ b/src/app/zones/views/CreateView.vue @@ -21,17 +21,19 @@