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

@ -12,13 +12,17 @@
:bottom-avatar-bar="true"
:content-under-username="true"
/>
<Note v-if="note" :note="note" :top-avatar-bar="(context?.ancestors.length ?? 0) > 0" />
<Note
v-if="note"
:note="note"
:top-avatar-bar="(context?.ancestors.length ?? 0) > 0"
/>
</div>
<Note v-for="note of context?.descendants" :note="note" />
<Note v-for="note of context?.descendants" :note="note"/>
</div>
<div v-else class="p-4 flex items-center justify-center h-48">
<Spinner />
<Spinner/>
</div>
</template>

View file

@ -1,19 +1,15 @@
<template>
<div class="mx-auto max-w-2xl w-full space-y-2">
<div v-if="isLoading" class="p-4 flex items-center justify-center h-48">
<Loader class="size-8 animate-spin" />
<Loader class="size-8 animate-spin"/>
</div>
<TimelineScroller v-else-if="account">
<div class="p-4 pb-0">
<AccountProfile :account="account" />
<AccountProfile :account="account"/>
</div>
<AccountTimeline
v-if="accountId"
:id="accountId"
:key="accountId"
/>
<AccountTimeline v-if="accountId" :id="accountId" :key="accountId"/>
</TimelineScroller>
<NotFound v-else />
<NotFound v-else/>
</div>
</template>

View file

@ -2,9 +2,7 @@
<Card v-if="code && domain" class="w-full max-w-md *:w-full">
<CardHeader>
<CardTitle>Signing in...</CardTitle>
<CardDescription>
You will be redirected shortly.
</CardDescription>
<CardDescription>You will be redirected shortly.</CardDescription>
</CardHeader>
</Card>
<Card v-else class="w-full max-w-md *:w-full">

View file

@ -1,6 +1,6 @@
<template>
<TimelineScroller>
<Global />
<Global/>
</TimelineScroller>
</template>

View file

@ -1,6 +1,6 @@
<template>
<TimelineScroller>
<Home />
<Home/>
</TimelineScroller>
</template>

View file

@ -1,7 +1,7 @@
<template>
<TimelineScroller>
<Home v-if="authStore.isSignedIn" />
<Public v-else />
<Home v-if="authStore.isSignedIn"/>
<Public v-else/>
</TimelineScroller>
</template>

View file

@ -1,7 +1,7 @@
<template>
<div class="p-6 flex items-center justify-center h-dvh w-dvw">
<div class="flex flex-col items-center justify-center gap-4">
<Loader class="animate-spin size-8" />
<Loader class="animate-spin size-8"/>
<!-- <p class="text-xl font-semibold tracking-tight">Versia Frontend</p> -->
</div>
</div>
@ -9,4 +9,4 @@
<script lang="ts" setup>
import { Loader } from "lucide-vue-next";
</script>
</script>

View file

@ -1,6 +1,6 @@
<template>
<TimelineScroller>
<Local />
<Local/>
</TimelineScroller>
</template>

View file

@ -1,7 +1,7 @@
<template>
<TimelineScroller>
<div class="rounded overflow-hidden">
<Notifications />
<Notifications/>
</div>
</TimelineScroller>
</template>

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>

View file

@ -1,6 +1,6 @@
<template>
<TimelineScroller>
<Public />
<Public/>
</TimelineScroller>
</template>

View file

@ -1,30 +1,42 @@
<template>
<div class="flex h-svh items-center justify-center px-6 py-12 lg:px-8 bg-center bg-no-repeat bg-cover" :style="{
<div
class="flex h-svh items-center justify-center px-6 py-12 lg:px-8 bg-center bg-no-repeat bg-cover"
:style="{
backgroundImage: 'url(/images/banner.webp)'
}">
<Card v-if="instance?.registrations.enabled ?? true" class="w-full max-w-md" as="form" @submit="handleSubmit">
}"
>
<Card
v-if="instance?.registrations.enabled ?? true"
class="w-full max-w-md"
as="form"
@submit="handleSubmit"
>
<CardHeader>
<Alert v-if="errors.error" variant="destructive" class="mb-4">
<AlertCircle class="size-4" />
<AlertCircle class="size-4"/>
<AlertTitle>{{ m.vexed_each_falcon_enjoy() }}</AlertTitle>
<AlertDescription>
{{ errors.error }}
</AlertDescription>
<AlertDescription>{{ errors.error }}</AlertDescription>
</Alert>
<CardTitle as="h1" class="text-2xl wrap-break-word">{{ m.wide_topical_vole_walk() }}</CardTitle>
<CardTitle as="h1" class="text-2xl wrap-break-word">
{{ m.wide_topical_vole_walk() }}
</CardTitle>
</CardHeader>
<CardContent v-if="instance && tos" class="grid gap-6">
<FormField v-slot="{ componentField }" name="username">
<FormItem>
<FormLabel>
{{ m.keen_clean_nils_slurp() }}
</FormLabel>
<FormLabel>{{ m.keen_clean_nils_slurp() }}</FormLabel>
<FormControl>
<Input placeholder="petergriffin" type="text" auto-capitalize="none"
auto-complete="idenfifier" auto-correct="off" :disabled="isLoading"
v-bind="componentField" />
<Input
placeholder="petergriffin"
type="text"
auto-capitalize="none"
auto-complete="idenfifier"
auto-correct="off"
:disabled="isLoading"
v-bind="componentField"
/>
</FormControl>
<FormMessage />
<FormMessage/>
</FormItem>
</FormField>
<FormField v-slot="{ componentField }" name="email">
@ -33,11 +45,17 @@
{{ m.top_inclusive_wallaby_hack() }}
</FormLabel>
<FormControl>
<Input placeholder="peter.griffin@fox.com" type="email" auto-capitalize="none"
auto-complete="email" auto-correct="off" :disabled="isLoading"
v-bind="componentField" />
<Input
placeholder="peter.griffin@fox.com"
type="email"
auto-capitalize="none"
auto-complete="email"
auto-correct="off"
:disabled="isLoading"
v-bind="componentField"
/>
</FormControl>
<FormMessage />
<FormMessage/>
</FormItem>
</FormField>
<FormField v-slot="{ componentField }" name="password">
@ -46,56 +64,93 @@
{{ m.livid_bright_wallaby_quiz() }}
</FormLabel>
<FormControl>
<Input placeholder="hunter2" type="password" auto-capitalize="none" auto-complete="password"
auto-correct="off" :disabled="isLoading" v-bind="componentField" />
<Input
placeholder="hunter2"
type="password"
auto-capitalize="none"
auto-complete="password"
auto-correct="off"
:disabled="isLoading"
v-bind="componentField"
/>
</FormControl>
<FormMessage />
<FormMessage/>
</FormItem>
</FormField>
<FormField v-slot="{ componentField }" name="password-confirm">
<FormItem>
<FormLabel>
{{ m.awful_cozy_jannes_rise() }}
</FormLabel>
<FormLabel>{{ m.awful_cozy_jannes_rise() }}</FormLabel>
<FormControl>
<Input placeholder="hunter2" type="password" auto-capitalize="none" auto-complete="password"
auto-correct="off" :disabled="isLoading" v-bind="componentField" />
<Input
placeholder="hunter2"
type="password"
auto-capitalize="none"
auto-complete="password"
auto-correct="off"
:disabled="isLoading"
v-bind="componentField"
/>
</FormControl>
<FormMessage />
<FormMessage/>
</FormItem>
</FormField>
<FormField v-slot="{ componentField, value, handleChange }" name="tos">
<FormField
v-slot="{ componentField, value, handleChange }"
name="tos"
>
<FormItem class="space-y-0">
<div class="flex flex-row gap-x-2 items-center ">
<FormControl>
<Checkbox v-bind="componentField" :checked="value" @update:checked="handleChange" />
<Checkbox
v-bind="componentField"
:checked="value"
@update:checked="handleChange"
/>
</FormControl>
<FormLabel>
<Dialog>
{{ m.plane_quick_chipmunk_rush() }} <DialogTrigger :as-child="true"><Button variant="link"
class="px-0 underline">{{ m.glad_last_crow_dine() }}</Button>.</DialogTrigger>
<DialogContent class="max-h-[90vh]! overflow-auto">
{{ m.plane_quick_chipmunk_rush() }}
<DialogTrigger :as-child="true">
<Button
variant="link"
class="px-0 underline"
>
{{ m.glad_last_crow_dine() }}
</Button>
.
</DialogTrigger>
<DialogContent
class="max-h-[90vh]! overflow-auto"
>
<DialogHeader>
<DialogTitle>{{ instance.title }}
<DialogTitle>
{{ instance.title }}
</DialogTitle>
</DialogHeader>
<div v-html="tos.content" class="prose prose-sm dark:prose-invert"></div>
<div
v-html="tos.content"
class="prose prose-sm dark:prose-invert"
></div>
</DialogContent>
</Dialog>
</FormLabel>
</div>
<FormMessage />
<FormMessage/>
</FormItem>
</FormField>
<div class="flex-col flex gap-y-1 text-sm text-muted-foreground">
<div
class="flex-col flex gap-y-1 text-sm text-muted-foreground"
>
<p>{{ m.happy_house_dragonfly_clap() }}</p>
</div>
</CardContent>
<CardFooter v-if="instance && tos" class="grid gap-2">
<Button variant="default" type="submit">{{ m.early_last_ocelot_praise() }}</Button>
<Button variant="default" type="submit">
{{ m.early_last_ocelot_praise() }}
</Button>
</CardFooter>
<div v-else class="p-4 flex items-center justify-center h-48">
<Loader class="size-8 animate-spin" />
<Loader class="size-8 animate-spin"/>
</div>
</Card>
<Card v-else class="w-full max-w-md">

View file

@ -1,7 +1,10 @@
<template>
<div class="flex h-svh items-center justify-center px-6 py-12 lg:px-8 bg-center bg-no-repeat bg-cover" :style="{
<div
class="flex h-svh items-center justify-center px-6 py-12 lg:px-8 bg-center bg-no-repeat bg-cover"
:style="{
backgroundImage: 'url(/images/banner.webp)'
}">
}"
>
<Card class="w-full max-w-md">
<CardHeader>
<CardTitle>{{ m.late_mean_capybara_fade() }}</CardTitle>