mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-10 04:22:09 +10:00
* fix: release workflow * feat: move mostly to internal tasks system * feat: migrate object clean to new task system * fix: release not getting good base version * chore: set version v0.3.0 * chore: style * feat: basic task concurrency * feat: temp pages to fill in page links * feat: inital i18n support * feat: localize store page * chore: style * fix: weblate doesn't like multifile thing * fix: update nuxt * feat: improved error logging * fix: using old task api * feat: basic translation docs * feat: add i18n eslint plugin * feat: translate store and auth pages * feat: more translation progress * feat: admin dash i18n progress * feat: enable update check by default in prod * fix: using wrong i18n keys * fix: crash in library sources page * feat: finish i18n work * fix: missing i18n translations * feat: use twemoji for emojis * feat: sanatize object ids * fix: EmojiText's alt text * fix: UserWidget not using links * feat: cache and auth for emoji api * fix: add more missing translations
86 lines
2.6 KiB
Vue
86 lines
2.6 KiB
Vue
<template>
|
|
<div class="flex grow flex-col gap-y-5 overflow-y-auto px-6 py-4">
|
|
<span class="inline-flex items-center gap-x-2 font-semibold text-zinc-100">
|
|
<UserIcon class="size-5" /> {{ $t("account.settings") }}
|
|
</span>
|
|
<nav class="flex flex-1 flex-col">
|
|
<ul role="list" class="flex flex-1 flex-col gap-y-7">
|
|
<li>
|
|
<ul role="list" class="-mx-2 space-y-1">
|
|
<li v-for="(item, itemIdx) in navigation" :key="item.route">
|
|
<NuxtLink
|
|
:href="item.route"
|
|
:class="[
|
|
itemIdx == currentPageIndex
|
|
? 'bg-zinc-800 text-white'
|
|
: 'text-zinc-400 hover:bg-zinc-800 hover:text-white',
|
|
'group flex gap-x-3 rounded-md p-2 text-sm/6 font-semibold',
|
|
]"
|
|
>
|
|
<component
|
|
:is="item.icon"
|
|
class="size-6 shrink-0"
|
|
aria-hidden="true"
|
|
/>
|
|
{{ item.label }}
|
|
<span
|
|
v-if="item.count !== undefined"
|
|
class="ml-auto w-9 min-w-max whitespace-nowrap rounded-full bg-zinc-900 px-2.5 py-0.5 text-center text-xs/5 font-medium text-white ring-1 ring-inset ring-zinc-700"
|
|
aria-hidden="true"
|
|
>{{ item.count }}</span
|
|
>
|
|
</NuxtLink>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import {
|
|
BellIcon,
|
|
HomeIcon,
|
|
LockClosedIcon,
|
|
DevicePhoneMobileIcon,
|
|
WrenchScrewdriverIcon,
|
|
} from "@heroicons/vue/24/outline";
|
|
import { UserIcon } from "@heroicons/vue/24/solid";
|
|
import type { Component } from "vue";
|
|
|
|
const notifications = useNotifications();
|
|
const { t } = useI18n();
|
|
|
|
const navigation: (NavigationItem & { icon: Component; count?: number })[] = [
|
|
{ label: t("home"), route: "/account", icon: HomeIcon, prefix: "/account" },
|
|
{
|
|
label: t("security"),
|
|
route: "/account/security",
|
|
prefix: "/account/security",
|
|
icon: LockClosedIcon,
|
|
},
|
|
{
|
|
label: t("account.devices.title"),
|
|
route: "/account/devices",
|
|
prefix: "/account/devices",
|
|
icon: DevicePhoneMobileIcon,
|
|
},
|
|
{
|
|
label: t("account.notifications.notifications"),
|
|
route: "/account/notifications",
|
|
prefix: "/account/notifications",
|
|
icon: BellIcon,
|
|
count: notifications.value.length,
|
|
},
|
|
{
|
|
label: t("settings"),
|
|
route: "/account/settings",
|
|
prefix: "/account/settings",
|
|
icon: WrenchScrewdriverIcon,
|
|
},
|
|
];
|
|
|
|
const currentPageIndex = useCurrentNavigationIndex(navigation);
|
|
</script>
|