From a6f85e55f04fbacbe8b0874e8e6386947f237483 Mon Sep 17 00:00:00 2001 From: Teages Date: Sun, 4 Aug 2024 05:44:21 +0800 Subject: [PATCH 1/2] fix: redirect to login page with query --- pages/levels/[id]/download.vue | 4 ++-- pages/session/login.vue | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/levels/[id]/download.vue b/pages/levels/[id]/download.vue index 47b6d46e0..b09e5c13c 100644 --- a/pages/levels/[id]/download.vue +++ b/pages/levels/[id]/download.vue @@ -65,7 +65,7 @@ if (levelId && !data.value?.level) { const downloadLink = ref(null) async function getDownloadLink(verify: () => Promise) { if (!isLogin.value) { - toLogin() + toLogin(route.fullPath) return } @@ -176,7 +176,7 @@ function cancel() { - diff --git a/pages/session/login.vue b/pages/session/login.vue index 424f7c950..0a40b3248 100644 --- a/pages/session/login.vue +++ b/pages/session/login.vue @@ -95,7 +95,7 @@ function loginWithProvider(provider: string) { function loginNext() { if (route.query.origin) { - router.replace({ path: decodeURIComponent(route.query.origin.toString()) }) + navigateTo(decodeURIComponent(route.query.origin.toString())) } else { router.replace({ name: 'settings-account' }) From 70fffbcc9ebfab675f5c3f2847d3d1941d8a4911 Mon Sep 17 00:00:00 2001 From: Teages Date: Sun, 4 Aug 2024 05:47:14 +0800 Subject: [PATCH 2/2] fix: metadata in level download page --- pages/levels/[id]/download.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pages/levels/[id]/download.vue b/pages/levels/[id]/download.vue index b09e5c13c..6dfee9840 100644 --- a/pages/levels/[id]/download.vue +++ b/pages/levels/[id]/download.vue @@ -138,6 +138,10 @@ function cancel() { setTimeout(() => router.push(`/levels/${levelId}`), 1000) } } + +defineCytoidPage({ + title: data.value?.level?.title ? `${data.value?.level?.title}` : 'Level', +})