mirror of
https://github.com/versia-pub/frontend.git
synced 2025-12-06 08:28:20 +01:00
feat: ✨ Add error page on login when the correct URI parameters are missing
This commit is contained in:
parent
714781bfde
commit
73ca0fb18b
|
|
@ -315,5 +315,7 @@
|
||||||
"pretty_born_jackal_dial": "Sailor's tongue",
|
"pretty_born_jackal_dial": "Sailor's tongue",
|
||||||
"tired_happy_lobster_pet": "Change the ship's language. Requires resetting yer sails to apply.",
|
"tired_happy_lobster_pet": "Change the ship's language. Requires resetting yer sails to apply.",
|
||||||
"keen_aware_goldfish_thrive": "King's English",
|
"keen_aware_goldfish_thrive": "King's English",
|
||||||
"vivid_mellow_sawfish_approve": "Fancy French"
|
"vivid_mellow_sawfish_approve": "Fancy French",
|
||||||
|
"gray_clean_shark_comfort": "The following URI parameters be required:",
|
||||||
|
"grand_spry_goldfish_embrace": "Yer URI parameters be invalid"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -316,5 +316,7 @@
|
||||||
"tired_happy_lobster_pet": "Change the language of the interface. Requires a reload to apply.",
|
"tired_happy_lobster_pet": "Change the language of the interface. Requires a reload to apply.",
|
||||||
"keen_aware_goldfish_thrive": "English",
|
"keen_aware_goldfish_thrive": "English",
|
||||||
"vivid_mellow_sawfish_approve": "French",
|
"vivid_mellow_sawfish_approve": "French",
|
||||||
"these_awful_ape_reside": "Pirate"
|
"these_awful_ape_reside": "Pirate",
|
||||||
|
"gray_clean_shark_comfort": "The following rizzy parameters are required:",
|
||||||
|
"grand_spry_goldfish_embrace": "Invalid URI parameters"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -316,5 +316,7 @@
|
||||||
"tired_happy_lobster_pet": "Change the language of the interface. Requires a reload to apply.",
|
"tired_happy_lobster_pet": "Change the language of the interface. Requires a reload to apply.",
|
||||||
"keen_aware_goldfish_thrive": "English",
|
"keen_aware_goldfish_thrive": "English",
|
||||||
"vivid_mellow_sawfish_approve": "French",
|
"vivid_mellow_sawfish_approve": "French",
|
||||||
"these_awful_ape_reside": "Pirate"
|
"these_awful_ape_reside": "Pirate",
|
||||||
|
"gray_clean_shark_comfort": "The following URI parameters are required:",
|
||||||
|
"grand_spry_goldfish_embrace": "Invalid URI parameters"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -298,6 +298,8 @@
|
||||||
"tired_happy_lobster_pet": "Changer la langue de l'interface. Nécessite un rechargement.",
|
"tired_happy_lobster_pet": "Changer la langue de l'interface. Nécessite un rechargement.",
|
||||||
"keen_aware_goldfish_thrive": "Anglais",
|
"keen_aware_goldfish_thrive": "Anglais",
|
||||||
"vivid_mellow_sawfish_approve": "Français",
|
"vivid_mellow_sawfish_approve": "Français",
|
||||||
|
"these_awful_ape_reside": "Pirate",
|
||||||
"dirty_inclusive_meerkat_nudge": "Annuler",
|
"dirty_inclusive_meerkat_nudge": "Annuler",
|
||||||
"these_awful_ape_reside": "Pirate"
|
"gray_clean_shark_comfort": "Les paramètres de l'URI suivants sont obligatoires:",
|
||||||
|
"grand_spry_goldfish_embrace": "Paramètres URI non valides"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,17 @@ useHead({
|
||||||
|
|
||||||
const host = new URL(useBaseUrl().value).host;
|
const host = new URL(useBaseUrl().value).host;
|
||||||
const instance = useInstanceFromClient(new Client(new URL(useBaseUrl().value)));
|
const instance = useInstanceFromClient(new Client(new URL(useBaseUrl().value)));
|
||||||
const { error, error_description } = useUrlSearchParams();
|
const {
|
||||||
|
error,
|
||||||
|
error_description,
|
||||||
|
redirect_uri,
|
||||||
|
response_type,
|
||||||
|
client_id,
|
||||||
|
scope,
|
||||||
|
state,
|
||||||
|
} = useUrlSearchParams();
|
||||||
|
const hasValidUrlSearchParams =
|
||||||
|
redirect_uri && response_type && client_id && scope;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -63,10 +73,23 @@ const { error, error_description } = useUrlSearchParams();
|
||||||
})">
|
})">
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<UserAuthForm v-if="instance" :instance="instance" />
|
<UserAuthForm v-if="instance && hasValidUrlSearchParams" :instance="instance" />
|
||||||
<div v-else class="p-4 flex items-center justify-center h-48">
|
<div v-else-if="hasValidUrlSearchParams" class="p-4 flex items-center justify-center h-48">
|
||||||
<Loader class="size-8 animate-spin" />
|
<Loader class="size-8 animate-spin" />
|
||||||
</div>
|
</div>
|
||||||
|
<Alert v-else variant="destructive" class="mb-4">
|
||||||
|
<AlertCircle class="size-4" />
|
||||||
|
<AlertTitle>{{ m.grand_spry_goldfish_embrace() }}</AlertTitle>
|
||||||
|
<AlertDescription>
|
||||||
|
<p>{{ m.gray_clean_shark_comfort() }}</p>
|
||||||
|
<ul class="list-disc list-inside mt-2 font-mono">
|
||||||
|
<li>redirect_uri</li>
|
||||||
|
<li>response_type</li>
|
||||||
|
<li>client_id</li>
|
||||||
|
<li>scope</li>
|
||||||
|
</ul>
|
||||||
|
</AlertDescription>
|
||||||
|
</Alert>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue