mirror of
https://github.com/versia-pub/frontend.git
synced 2025-12-06 08:28:20 +01:00
feat: ✨ Show spinner while OIDC account linking is loading
This commit is contained in:
parent
f6153cb5fe
commit
44e6112335
|
|
@ -60,7 +60,7 @@ app.hook("page:finish", async () => {
|
|||
|
||||
if (oidcAccountLinked) {
|
||||
useEvent("notification:new", {
|
||||
type: "info",
|
||||
type: "success",
|
||||
title: "Account linked",
|
||||
message:
|
||||
"Your account has been successfully linked to your OpenID Connect provider.",
|
||||
|
|
|
|||
|
|
@ -13,10 +13,12 @@
|
|||
<div class="p-4">
|
||||
<div class="flex items-start">
|
||||
<div class="shrink-0 h-6 w-6">
|
||||
<iconify-icon v-if="notification.type === 'info'" icon="tabler:check" height="none"
|
||||
<iconify-icon v-if="notification.type === 'success'" icon="tabler:check" height="none"
|
||||
class="h-6 w-6 text-green-400" aria-hidden="true" />
|
||||
<iconify-icon v-else-if="notification.type === 'error'" icon="tabler:alert-triangle"
|
||||
height="none" class="h-6 w-6 text-red-400" aria-hidden="true" />
|
||||
<iconify-icon v-else-if="notification.type === 'progress'" icon="tabler:loader"
|
||||
height="none" class="h-6 w-6 text-pink-500 animate-spin" aria-hidden="true" />
|
||||
</div>
|
||||
<div class="ml-3 w-0 flex-1 pt-0.5">
|
||||
<p class="text-sm font-semibold text-gray-50">{{ notification.title }}</p>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import mitt from "mitt";
|
|||
import type { Status } from "~/types/mastodon/status";
|
||||
|
||||
export type NotificationEvent = {
|
||||
type: "error" | "info";
|
||||
type: "error" | "success" | "progress";
|
||||
title: string;
|
||||
message?: string;
|
||||
persistent?: boolean;
|
||||
|
|
|
|||
|
|
@ -56,6 +56,12 @@ watchEffect(async () => {
|
|||
useEvent("composer:open");
|
||||
}
|
||||
if (o_i_d_c.value) {
|
||||
useEvent("notification:new", {
|
||||
type: "progress",
|
||||
title: "Linking your account",
|
||||
persistent: true,
|
||||
});
|
||||
|
||||
const issuer = providers.value?.providers[0];
|
||||
|
||||
if (!issuer) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue