From 27fedf9d6e46a0c7795853f89cd5e3cdbefd4728 Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Sun, 19 Mar 2023 20:28:19 +0900 Subject: [PATCH] fix: don't show smartphone UI when settings icon is double-clicked --- packages/client/src/pages/admin/index.vue | 8 +++++++- packages/client/src/pages/settings/index.vue | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/packages/client/src/pages/admin/index.vue b/packages/client/src/pages/admin/index.vue index 8eb5e0987a..81a27cf38d 100644 --- a/packages/client/src/pages/admin/index.vue +++ b/packages/client/src/pages/admin/index.vue @@ -13,7 +13,7 @@ {{ i18n.ts.noEmailServerWarning }} {{ i18n.ts.configure }} {{ i18n.ts.updateAvailable }} {{ i18n.ts.check }} - + @@ -219,6 +219,12 @@ onUnmounted(() => { ro.disconnect(); }); +watch(router.currentRef, (to) => { + if (to.route.path === "/admin" && to.child?.route.name == null && !narrow) { + router.replace('/admin/overview'); + } +}); + provideMetadataReceiver((info) => { if (info == null) { childInfo = null; diff --git a/packages/client/src/pages/settings/index.vue b/packages/client/src/pages/settings/index.vue index b03140ff26..ef9ae91b92 100644 --- a/packages/client/src/pages/settings/index.vue +++ b/packages/client/src/pages/settings/index.vue @@ -7,7 +7,7 @@
@@ -230,6 +230,12 @@ onUnmounted(() => { ro.disconnect(); }); +watch(router.currentRef, (to) => { + if (to.route.name === "settings" && to.child?.route.name == null && !narrow) { + router.replace('/settings/profile'); + } +}); + const emailNotConfigured = computed(() => instance.enableEmail && ($i.email == null || !$i.emailVerified)); provideMetadataReceiver((info) => {