2025-03-28 01:16:24 +01:00
|
|
|
<script setup lang="ts">
|
2025-05-01 01:45:46 +02:00
|
|
|
import {
|
|
|
|
|
ChevronsUpDown,
|
|
|
|
|
Cog,
|
|
|
|
|
DownloadCloud,
|
|
|
|
|
Pen,
|
|
|
|
|
UserPlus,
|
|
|
|
|
} from "lucide-vue-next";
|
2025-03-28 01:16:24 +01:00
|
|
|
import TinyCard from "~/components/profiles/tiny-card.vue";
|
|
|
|
|
import { Button } from "~/components/ui/button";
|
|
|
|
|
import {
|
|
|
|
|
SidebarFooter,
|
|
|
|
|
SidebarMenu,
|
|
|
|
|
SidebarMenuButton,
|
|
|
|
|
SidebarMenuItem,
|
|
|
|
|
} from "~/components/ui/sidebar";
|
|
|
|
|
import * as m from "~/paraglide/messages.js";
|
2025-04-10 18:44:53 +02:00
|
|
|
import AccountManager from "../account/account-manager.vue";
|
2025-03-28 01:16:24 +01:00
|
|
|
const { $pwa } = useNuxtApp();
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
<SidebarFooter>
|
|
|
|
|
<SidebarMenu class="gap-3">
|
|
|
|
|
<SidebarMenuItem>
|
2025-04-10 18:44:53 +02:00
|
|
|
<AccountManager>
|
|
|
|
|
<SidebarMenuButton v-if="identity" size="lg">
|
|
|
|
|
<TinyCard :account="identity.account" :domain="identity.instance.domain" naked />
|
2025-03-28 01:16:24 +01:00
|
|
|
<ChevronsUpDown class="ml-auto size-4" />
|
|
|
|
|
</SidebarMenuButton>
|
2025-04-10 18:44:53 +02:00
|
|
|
<SidebarMenuButton v-else>
|
|
|
|
|
<UserPlus />
|
|
|
|
|
{{ m.sunny_pink_hyena_walk() }}
|
|
|
|
|
<ChevronsUpDown class="ml-auto size-4" />
|
|
|
|
|
</SidebarMenuButton>
|
|
|
|
|
</AccountManager>
|
2025-03-28 01:16:24 +01:00
|
|
|
</SidebarMenuItem>
|
|
|
|
|
<SidebarMenuItem class="flex flex-col gap-2">
|
2025-04-10 18:44:53 +02:00
|
|
|
<Button v-if="identity" variant="default" size="lg" class="w-full group-data-[collapsible=icon]:px-4"
|
|
|
|
|
@click="useEvent('composer:open')">
|
2025-03-28 01:16:24 +01:00
|
|
|
<Pen />
|
|
|
|
|
<span class="group-data-[collapsible=icon]:hidden">
|
|
|
|
|
{{ m.salty_aloof_turkey_nudge() }}
|
|
|
|
|
</span>
|
|
|
|
|
</Button>
|
2025-05-01 01:45:46 +02:00
|
|
|
<Button v-if="identity" size="lg" variant="secondary" @click="useEvent('preferences:open')">
|
|
|
|
|
<Cog />
|
|
|
|
|
Preferences
|
|
|
|
|
</Button>
|
2025-04-10 18:44:53 +02:00
|
|
|
<Button v-if="$pwa?.needRefresh" variant="destructive" size="lg"
|
|
|
|
|
class="w-full group-data-[collapsible=icon]:px-4" @click="$pwa?.updateServiceWorker(true)">
|
2025-03-28 01:16:24 +01:00
|
|
|
<DownloadCloud />
|
|
|
|
|
<span class="group-data-[collapsible=icon]:hidden">
|
|
|
|
|
{{ m.quaint_low_felix_pave() }}
|
|
|
|
|
</span>
|
|
|
|
|
</Button>
|
|
|
|
|
</SidebarMenuItem>
|
|
|
|
|
</SidebarMenu>
|
|
|
|
|
</SidebarFooter>
|
|
|
|
|
</template>
|