Skip to content

Commit

Permalink
chore: better redirect in download callback
Browse files Browse the repository at this point in the history
  • Loading branch information
Teages committed Aug 3, 2024
1 parent 3dfe8d9 commit a389c43
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions pages/levels/[id]/download.vue
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ async function sendCallback(verify: () => Promise<string>) {
callbackUrl.searchParams.append('title', data.value.level.title)
}
location.href = callbackUrl.toString()
navigateTo(callbackUrl.toString(), { external: true })
}
const downloadCytoidDialog = ref<HTMLDialogElement | null>(null)
Expand Down Expand Up @@ -157,7 +157,14 @@ function cancel() {

<Captcha v-slot="{ verify }">
<div class="flex h-full flex-col gap-2 sm:col-span-5">
<div v-if="!ready" />
<div v-if="!ready" class="flex h-full flex-wrap content-end gap-2">
<div class="flex w-full flex-col gap-2">
<button class="btn btn-primary btn-block" disabled>
<span class="loading loading-spinner" />
Loading
</button>
</div>
</div>

<div v-else-if="!isLogin" class="flex h-full flex-wrap content-between gap-2">
<div role="alert" class="alert alert-warning">
Expand All @@ -182,7 +189,7 @@ function cancel() {
</h2>
<div v-if="!isTrusted" role="alert" class="alert alert-warning">
<Icon name="mdi:alert-circle-outline" size="24" />
<span><b>{{ callbackName }}</b> wants to download this level as you. Make sure you trust the site.</span>
<span><b>{{ callbackName }}</b> wants to download this level <b>as you</b>. Make sure you trust the site.</span>
</div>
</div>

Expand Down

0 comments on commit a389c43

Please sign in to comment.