style: 🎨 Format code with Biome

This commit is contained in:
Jesse Wierzbinski 2025-12-09 22:32:22 +01:00
parent 7ff9d2302a
commit 3627ac0ef8
No known key found for this signature in database
296 changed files with 3257 additions and 2808 deletions

View file

@ -60,7 +60,7 @@ const getProviderUrl = (providerId: string) =>
"
alt="Versia logo"
class="size-10 mr-4"
/>
>
{{ instance?.title }}
</div>
</div>
@ -69,11 +69,9 @@ const getProviderUrl = (providerId: string) =>
class="mx-auto flex w-full flex-col justify-center space-y-10 sm:w-[350px]"
>
<Alert v-if="error" variant="destructive" class="mb-4">
<AlertCircle class="size-4" />
<AlertCircle class="size-4"/>
<AlertTitle>{{ error }}</AlertTitle>
<AlertDescription>
{{ error_description }}
</AlertDescription>
<AlertDescription>{{ error_description }}</AlertDescription>
</Alert>
<div class="flex flex-col space-y-2 text-center">
<h1 class="text-2xl font-semibold tracking-tight">
@ -88,56 +86,82 @@ const getProviderUrl = (providerId: string) =>
"
></p>
</div>
<div v-if="instance && hasValidUrlSearchParams" class="grid gap-6">
<div
v-if="instance.sso.providers.length > 0"
class="flex flex-col gap-2"
<div
v-if="instance && hasValidUrlSearchParams"
class="grid gap-6"
>
<div
v-if="instance.sso.providers.length > 0"
class="flex flex-col gap-2"
>
<form
v-for="provider of instance.sso.providers"
:key="provider.id"
method="POST"
:action="getProviderUrl(provider.id)"
>
<form v-for="provider of instance.sso.providers" :key="provider.id" method="POST" :action="getProviderUrl(provider.id)">
<input type="hidden" name="redirect_uri" :value="redirect_uri" />
<input type="hidden" name="client_id" :value="client_id" />
<input v-for="(scopePart, index) of (scope as string).split(' ')" type="hidden" :name="`scope[${index}]`" :value="scopePart" />
<Button
variant="outline"
type="submit"
:disabled="isLoading"
class="w-full"
<input
type="hidden"
name="redirect_uri"
:value="redirect_uri"
>
<input
type="hidden"
name="client_id"
:value="client_id"
>
<input
v-for="(scopePart, index) of (scope as string).split(' ')"
type="hidden"
:name="`scope[${index}]`"
:value="scopePart"
>
<Button
variant="outline"
type="submit"
:disabled="isLoading"
class="w-full"
>
<Loader
v-if="isLoading"
class="mr-2 animate-spin"
/>
<img
crossorigin="anonymous"
:src="provider.icon"
:alt="`${provider.name}'s logo`"
class="size-4 mr-2"
>
<Loader v-if="isLoading" class="mr-2 animate-spin" />
<img
crossorigin="anonymous"
:src="provider.icon"
:alt="`${provider.name}'s logo`"
class="size-4 mr-2"
/>
{{ provider.name }}
</Button>
</form>
</div>
<Alert v-else variant="destructive" class="mb-4">
<AlertCircle class="size-4" />
<AlertTitle>
No SSO providers are configured.
</AlertTitle>
<AlertDescription>
<p>
Please ask the administrator of
{{ instance.domain }} to set up SSO providers.
</p>
</AlertDescription>
</Alert>
{{ provider.name }}
</Button>
</form>
</div>
<Alert v-else variant="destructive" class="mb-4">
<AlertCircle class="size-4"/>
<AlertTitle>
No SSO providers are configured.
</AlertTitle>
<AlertDescription>
<p>
Please ask the administrator of
{{ instance.domain }}to set up SSO providers.
</p>
</AlertDescription>
</Alert>
</div>
<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>
<Alert v-else variant="destructive" class="mb-4">
<AlertCircle class="size-4" />
<AlertTitle>{{
<AlertCircle class="size-4"/>
<AlertTitle>
{{
m.grand_spry_goldfish_embrace()
}}</AlertTitle>
}}
</AlertTitle>
<AlertDescription>
<p>{{ m.gray_clean_shark_comfort() }}</p>
<ul class="list-disc list-inside mt-2 font-mono">

View file

@ -8,8 +8,10 @@
<Card class="w-full max-w-md *:w-full p-6">
<CardHeader>
<CardTitle>{{ m.aware_awful_crow_spur() }}</CardTitle>
<CardDescription
>{{ m.mushy_soft_lizard_propel() }}<br />{{
<CardDescription>
{{ m.mushy_soft_lizard_propel() }}
<br>
{{
m.short_arable_leopard_zap()
}}
</CardDescription>
@ -17,8 +19,7 @@
<CardContent class="grid">
<pre
class="rounded bg-muted px-4 py-2 border text-center w-full font-mono text-sm font-semibold select-all"
>{{ code }}</pre
>
>{{ code }}</pre>
</CardContent>
</Card>
</div>

View file

@ -1,31 +1,57 @@
<template>
<div class="flex h-svh items-center justify-center px-4 py-6 lg:px-8 bg-center bg-no-repeat bg-cover" :style="{
<div
class="flex h-svh items-center justify-center px-4 py-6 lg:px-8 bg-center bg-no-repeat bg-cover"
:style="{
backgroundImage: 'url(/images/banner.webp)',
}">
<form method="POST" :action="url.pathname.replace('/oauth/consent', '/oauth/authorize')" class="w-full max-w-md">
}"
>
<form
method="POST"
:action="url.pathname.replace('/oauth/consent', '/oauth/authorize')"
class="w-full max-w-md"
>
<Card class="*:w-full p-6">
<input type="hidden" v-for="[key, value] in url.searchParams" :key="key" :name="key" :value="value" />
<input
type="hidden"
v-for="[key, value] in url.searchParams"
:key="key"
:name="key"
:value="value"
>
<CardHeader>
<CardTitle as="h1" class="text-2xl break-words">{{
<CardTitle as="h1" class="text-2xl break-words">
{{
m.fresh_broad_cockroach_radiate({
application: application ?? "",
})
}}</CardTitle>
}}
</CardTitle>
</CardHeader>
<CardContent>
<Card class="p-2 gap-1">
<CardContent class="flex flex-col px-4 py-2 w-full">
<CardTitle as="h2" class="text-lg">{{
<CardTitle as="h2" class="text-lg">
{{
application
}}</CardTitle>
<a v-if="website" :href="website" target="_blank" rel="noopener noreferrer"
class="underline">{{ website }}</a>
}}
</CardTitle>
<a
v-if="website"
:href="website"
target="_blank"
rel="noopener noreferrer"
class="underline"
>{{ website }}</a
>
</CardContent>
</Card>
<ul class="list-none my-6 [&>li]:mt-2">
<li v-for="text in getScopeText(scopes)" :key="text[1]"
class="flex flex-row gap-1 items-center">
<Check class="size-4" />
<li
v-for="text in getScopeText(scopes)"
:key="text[1]"
class="flex flex-row gap-1 items-center"
>
<Check class="size-4"/>
<h2 class="text-sm">
<strong class="font-bold">{{ text[0] }}</strong>
{{ text[1] }}
@ -33,23 +59,31 @@
</li>
</ul>
<div class="flex-col flex gap-y-1 text-sm">
<p v-html="m.gross_antsy_kangaroo_succeed({
<p
v-html="m.gross_antsy_kangaroo_succeed({
application: application ?? '',
})
"></p>
<p v-html="m.hour_close_giraffe_mop({
"
></p>
<p
v-html="m.hour_close_giraffe_mop({
application: application ?? '',
})
"></p>
"
></p>
</div>
</CardContent>
<CardFooter class="grid gap-2">
<Button variant="default" type="submit">{{
<Button variant="default" type="submit">
{{
m.last_spare_polecat_reside()
}}</Button>
<Button :as="NuxtLink" href="/" variant="secondary">{{
}}
</Button>
<Button :as="NuxtLink" href="/" variant="secondary">
{{
m.soft_bold_ant_attend()
}}</Button>
}}
</Button>
</CardFooter>
</Card>
</form>