💄 Optimize authorize third party client loading process

This commit is contained in:
LittleSheep 2024-08-13 15:27:32 +08:00
parent 542f81d9c2
commit 2f14e3817a

View File

@ -75,18 +75,18 @@ definePageMeta({
middleware: ["auth"],
})
const config = useRuntimeConfig()
const route = useRoute()
const error = ref<string | null>(null)
const loading = ref(false)
const loading = ref(true)
const metadata = ref<any>(null)
const panel = ref("confirm")
async function tryAuthorize() {
loading.value = true
const res = await solarFetch(`/cgi/auth/auth/o/authorize${window.location.search}`)
if (res.status !== 200) {
@ -104,7 +104,7 @@ async function tryAuthorize() {
}
}
tryAuthorize()
onMounted(() => tryAuthorize())
function decline() {
if (window.history.length > 0) {