mirror of
https://github.com/versia-pub/frontend.git
synced 2026-03-13 03:29:16 +01:00
style: 🎨 Format code with Biome
This commit is contained in:
parent
7ff9d2302a
commit
3627ac0ef8
296 changed files with 3257 additions and 2808 deletions
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<Dialog>
|
||||
<DialogTrigger as-child>
|
||||
<slot />
|
||||
<slot/>
|
||||
</DialogTrigger>
|
||||
<DialogContent>
|
||||
<DialogHeader>
|
||||
|
|
@ -11,16 +11,31 @@
|
|||
</DialogDescription>
|
||||
</DialogHeader>
|
||||
<div v-if="authStore.identities.length > 0" class="grid gap-4 py-2">
|
||||
<div v-for="identity of authStore.identities" :key="identity.account.id"
|
||||
class="grid grid-cols-[1fr_auto] has-[>[data-switch]]:grid-cols-[1fr_auto_auto] gap-2">
|
||||
<TinyCard :account="identity.account" :domain="identity.instance.domain" naked />
|
||||
<Button data-switch v-if="authStore.identity?.id !== identity.id"
|
||||
@click="authStore.setActiveIdentity(identity.id)" variant="outline">
|
||||
<div
|
||||
v-for="identity of authStore.identities"
|
||||
:key="identity.account.id"
|
||||
class="grid grid-cols-[1fr_auto] has-[>[data-switch]]:grid-cols-[1fr_auto_auto] gap-2"
|
||||
>
|
||||
<TinyCard
|
||||
:account="identity.account"
|
||||
:domain="identity.instance.domain"
|
||||
naked
|
||||
/>
|
||||
<Button
|
||||
data-switch
|
||||
v-if="authStore.identity?.id !== identity.id"
|
||||
@click="authStore.setActiveIdentity(identity.id)"
|
||||
variant="outline"
|
||||
>
|
||||
Switch
|
||||
</Button>
|
||||
<Button @click="signOutAction(identity.id)" variant="outline" size="icon"
|
||||
:title="m.sharp_big_mallard_reap()">
|
||||
<LogOut />
|
||||
<Button
|
||||
@click="signOutAction(identity.id)"
|
||||
variant="outline"
|
||||
size="icon"
|
||||
:title="m.sharp_big_mallard_reap()"
|
||||
>
|
||||
<LogOut/>
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -31,11 +46,11 @@
|
|||
</div>
|
||||
<DialogFooter>
|
||||
<Button :as="NuxtLink" href="/register" variant="outline">
|
||||
<UserPlus />
|
||||
<UserPlus/>
|
||||
{{ m.honest_few_baboon_pop() }}
|
||||
</Button>
|
||||
<Button @click="signInAction">
|
||||
<LogIn />
|
||||
<LogIn/>
|
||||
{{ m.sunny_pink_hyena_walk() }}
|
||||
</Button>
|
||||
</DialogFooter>
|
||||
|
|
|
|||
|
|
@ -26,32 +26,54 @@ const authStore = useAuthStore();
|
|||
<SidebarMenu class="gap-3">
|
||||
<SidebarMenuItem>
|
||||
<AccountManager>
|
||||
<SidebarMenuButton v-if="authStore.account && authStore.instance" size="lg">
|
||||
<TinyCard :account="authStore.account" :domain="authStore.instance.domain" naked />
|
||||
<ChevronsUpDown class="ml-auto size-4" />
|
||||
<SidebarMenuButton
|
||||
v-if="authStore.account && authStore.instance"
|
||||
size="lg"
|
||||
>
|
||||
<TinyCard
|
||||
:account="authStore.account"
|
||||
:domain="authStore.instance.domain"
|
||||
naked
|
||||
/>
|
||||
<ChevronsUpDown class="ml-auto size-4"/>
|
||||
</SidebarMenuButton>
|
||||
<SidebarMenuButton v-else>
|
||||
<UserPlus />
|
||||
<UserPlus/>
|
||||
{{ m.sunny_pink_hyena_walk() }}
|
||||
<ChevronsUpDown class="ml-auto size-4" />
|
||||
<ChevronsUpDown class="ml-auto size-4"/>
|
||||
</SidebarMenuButton>
|
||||
</AccountManager>
|
||||
</SidebarMenuItem>
|
||||
<SidebarMenuItem class="flex flex-col gap-2">
|
||||
<Button v-if="authStore.isSignedIn" variant="default" size="lg" class="w-full group-data-[collapsible=icon]:px-4"
|
||||
@click="useEvent('composer:open')">
|
||||
<Pen />
|
||||
<Button
|
||||
v-if="authStore.isSignedIn"
|
||||
variant="default"
|
||||
size="lg"
|
||||
class="w-full group-data-[collapsible=icon]:px-4"
|
||||
@click="useEvent('composer:open')"
|
||||
>
|
||||
<Pen/>
|
||||
<span class="group-data-[collapsible=icon]:hidden">
|
||||
{{ m.salty_aloof_turkey_nudge() }}
|
||||
</span>
|
||||
</Button>
|
||||
<Button v-if="authStore.isSignedIn" size="lg" variant="secondary" @click="useEvent('preferences:open')">
|
||||
<Cog />
|
||||
<Button
|
||||
v-if="authStore.isSignedIn"
|
||||
size="lg"
|
||||
variant="secondary"
|
||||
@click="useEvent('preferences:open')"
|
||||
>
|
||||
<Cog/>
|
||||
Preferences
|
||||
</Button>
|
||||
<Button v-if="$pwa?.needRefresh" variant="destructive" size="lg"
|
||||
class="w-full group-data-[collapsible=icon]:px-4" @click="$pwa?.updateServiceWorker(true)">
|
||||
<DownloadCloud />
|
||||
<Button
|
||||
v-if="$pwa?.needRefresh"
|
||||
variant="destructive"
|
||||
size="lg"
|
||||
class="w-full group-data-[collapsible=icon]:px-4"
|
||||
@click="$pwa?.updateServiceWorker(true)"
|
||||
>
|
||||
<DownloadCloud/>
|
||||
<span class="group-data-[collapsible=icon]:hidden">
|
||||
{{ m.quaint_low_felix_pave() }}
|
||||
</span>
|
||||
|
|
|
|||
|
|
@ -14,7 +14,10 @@ const authStore = useAuthStore();
|
|||
<SidebarMenu>
|
||||
<SidebarMenuItem>
|
||||
<NuxtLink href="/">
|
||||
<InstanceSmallCard v-if="authStore.instance" :instance="authStore.instance" />
|
||||
<InstanceSmallCard
|
||||
v-if="authStore.instance"
|
||||
:instance="authStore.instance"
|
||||
/>
|
||||
</NuxtLink>
|
||||
</SidebarMenuItem>
|
||||
</SidebarMenu>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,13 @@
|
|||
<template>
|
||||
<Sidebar collapsible="offcanvas">
|
||||
<InstanceHeader />
|
||||
<InstanceHeader/>
|
||||
<SidebarContent>
|
||||
<SidebarGroup>
|
||||
<SidebarGroupLabel>{{
|
||||
<SidebarGroupLabel>
|
||||
{{
|
||||
m.trite_real_sawfish_drum()
|
||||
}}</SidebarGroupLabel>
|
||||
}}
|
||||
</SidebarGroupLabel>
|
||||
<NavItems
|
||||
:items="
|
||||
sidebarConfig.other.filter((i) =>
|
||||
|
|
@ -15,8 +17,8 @@
|
|||
/>
|
||||
</SidebarGroup>
|
||||
</SidebarContent>
|
||||
<FooterActions />
|
||||
<SidebarRail />
|
||||
<FooterActions/>
|
||||
<SidebarRail/>
|
||||
</Sidebar>
|
||||
</template>
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ defineProps<{
|
|||
<SidebarMenuItem>
|
||||
<CollapsibleTrigger as-child>
|
||||
<SidebarMenuButton :tooltip="item.title">
|
||||
<component :is="item.icon" />
|
||||
<component :is="item.icon"/>
|
||||
{{ item.title }}
|
||||
<ChevronRight
|
||||
class="ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ defineProps<{
|
|||
<SidebarMenuItem v-for="item in items" :key="item.title">
|
||||
<SidebarMenuButton as-child>
|
||||
<NuxtLink :href="item.url">
|
||||
<component :is="item.icon" />
|
||||
<component :is="item.icon"/>
|
||||
<span>{{ item.title }}</span>
|
||||
</NuxtLink>
|
||||
</SidebarMenuButton>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
style="--sidebar-width: 24rem; --sidebar-width-mobile: 18rem"
|
||||
>
|
||||
<SidebarContent class="overflow-y-auto *:p-2 *:gap-2">
|
||||
<NotificationsTimeline />
|
||||
<NotificationsTimeline/>
|
||||
</SidebarContent>
|
||||
</Sidebar>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -14,15 +14,18 @@ const authStore = useAuthStore();
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<LeftSidebar />
|
||||
<LeftSidebar/>
|
||||
<main class="grow h-dvh overflow-y-auto">
|
||||
<header
|
||||
v-if="showTimelines"
|
||||
class="flex h-16 items-center bg-background/80 backdrop-blur-2xl sticky top-0 inset-x-0 z-10 p-4"
|
||||
>
|
||||
<Timelines />
|
||||
<Timelines/>
|
||||
</header>
|
||||
<slot />
|
||||
<slot/>
|
||||
</main>
|
||||
<RightSidebar v-if="authStore.isSignedIn" v-show="preferences.display_notifications_sidebar" />
|
||||
<RightSidebar
|
||||
v-if="authStore.isSignedIn"
|
||||
v-show="preferences.display_notifications_sidebar"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue