Skip to content

Commit

Permalink
Merge pull request #158 from Cytoid/dev
Browse files Browse the repository at this point in the history
fix: download page callback and metadata
  • Loading branch information
Teages authored Aug 3, 2024
2 parents 26b47e9 + 70fffbc commit 60a6696
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions pages/levels/[id]/download.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ if (levelId && !data.value?.level) {
const downloadLink = ref<string | null>(null)
async function getDownloadLink(verify: () => Promise<string>) {
if (!isLogin.value) {
toLogin()
toLogin(route.fullPath)
return
}
Expand Down Expand Up @@ -138,6 +138,10 @@ function cancel() {
setTimeout(() => router.push(`/levels/${levelId}`), 1000)
}
}
defineCytoidPage({
title: data.value?.level?.title ? `${data.value?.level?.title}` : 'Level',
})
</script>

<template>
Expand Down Expand Up @@ -176,7 +180,7 @@ function cancel() {
<button v-if="callback" class="btn btn-neutral btn-block" @click="cancel()">
Cancel
</button>
<button class="btn btn-primary btn-block" @click="toLogin()">
<button class="btn btn-primary btn-block" @click="toLogin(route.fullPath)">
Login
</button>
</div>
Expand Down
2 changes: 1 addition & 1 deletion pages/session/login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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' })
Expand Down

0 comments on commit 60a6696

Please sign in to comment.