♻️ Migrated some auth pages
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
<div v-if="provider === 'cloudflare'">
|
<div v-if="provider === 'cloudflare'">
|
||||||
<turnstile v-if="!!apiKey" :sitekey="apiKey" @callback="handleSuccess" />
|
<turnstile v-if="!!apiKey" :sitekey="apiKey" @callback="handleSuccess" />
|
||||||
<div v-else class="mx-auto">
|
<div v-else class="mx-auto">
|
||||||
<n-spin />
|
<span class="loading loading-spinner loading-md"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="provider === 'hcaptcha'">
|
<div v-else-if="provider === 'hcaptcha'">
|
||||||
@@ -11,9 +11,10 @@
|
|||||||
v-if="!!apiKey"
|
v-if="!!apiKey"
|
||||||
:sitekey="apiKey"
|
:sitekey="apiKey"
|
||||||
@verify="(tk: string) => handleSuccess(tk)"
|
@verify="(tk: string) => handleSuccess(tk)"
|
||||||
/>
|
>
|
||||||
|
</hcaptcha>
|
||||||
<div v-else class="mx-auto">
|
<div v-else class="mx-auto">
|
||||||
<n-spin />
|
<span class="loading loading-spinner loading-md"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
@@ -22,7 +23,7 @@
|
|||||||
:data-sitekey="apiKey"
|
:data-sitekey="apiKey"
|
||||||
/>
|
/>
|
||||||
<div v-else class="flex flex-col items-center justify-center gap-1">
|
<div v-else class="flex flex-col items-center justify-center gap-1">
|
||||||
<span class="mdi mdi-alert-circle-outline text-3xl"></span>
|
<n-icon :component="AlertTriangleIcon" />
|
||||||
<span>Captcha provider not configured correctly.</span>
|
<span>Captcha provider not configured correctly.</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -32,6 +33,7 @@
|
|||||||
import { ref, onMounted } from "vue"
|
import { ref, onMounted } from "vue"
|
||||||
import Turnstile from "cfturnstile-vue3"
|
import Turnstile from "cfturnstile-vue3"
|
||||||
import Hcaptcha from "@hcaptcha/vue3-hcaptcha"
|
import Hcaptcha from "@hcaptcha/vue3-hcaptcha"
|
||||||
|
import { AlertTriangleIcon } from "lucide-vue-next"
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
provider: {
|
provider: {
|
||||||
|
|||||||
@@ -28,6 +28,6 @@ definePageMeta({
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const redirectUrl = `${apiBase}/id/auth/callback/${provider}${window.location.search}`
|
const redirectUrl = `${apiBase}/id/auth/callback/${provider}${window.location.search}`
|
||||||
// window.location.href = redirectUrl
|
window.location.href = redirectUrl
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,32 +1,27 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="d-flex align-center justify-center fill-height">
|
<div class="flex flex-col items-center justify-center h-compact-layout">
|
||||||
<v-card
|
<div class="mb-4">
|
||||||
class="pa-6 text-center"
|
<client-only>
|
||||||
max-width="600"
|
<captcha-widget @verified="onCaptchaVerified" />
|
||||||
title="Captcha Verification"
|
</client-only>
|
||||||
>
|
</div>
|
||||||
<v-card-text>
|
<div class="text-center">
|
||||||
<div class="mb-8 mt-4">
|
<div class="text-sm font-bold">Solar Network Anti-Robot</div>
|
||||||
<client-only>
|
<p class="opacity-80 text-sm mb-2">
|
||||||
<captcha-widget @verified="onCaptchaVerified" />
|
You might need to wait a while before the puzzle fully loaded.
|
||||||
</client-only>
|
</p>
|
||||||
</div>
|
<div class="opacity-80 text-xs">
|
||||||
<div>
|
Hosted by
|
||||||
<div class="text-sm font-bold mb-1">Solar Network Anti-Robot</div>
|
<a
|
||||||
<div class="opacity-80 text-xs">
|
href="https://github.com/Solsynth/DysonNetwork"
|
||||||
Hosted by
|
class="text-primary"
|
||||||
<a
|
target="_blank"
|
||||||
href="https://github.com/Solsynth/DysonNetwork"
|
rel="noopener noreferrer"
|
||||||
class="text-primary"
|
>
|
||||||
target="_blank"
|
DysonNetwork.Sphere
|
||||||
rel="noopener noreferrer"
|
</a>
|
||||||
>
|
</div>
|
||||||
DysonNetwork.Sphere
|
</div>
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</v-card-text>
|
|
||||||
</v-card>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user