2024-11-16 19:41:19 +11:00
|
|
|
<template>
|
|
|
|
|
<PanelWidget class="flex-col gap-y-2">
|
|
|
|
|
<div class="border-b border-zinc-700 pb-3 p-2">
|
|
|
|
|
<div
|
|
|
|
|
class="-ml-4 -mt-2 flex flex-wrap items-center justify-between sm:flex-nowrap"
|
|
|
|
|
>
|
|
|
|
|
<div class="ml-4 mt-2">
|
|
|
|
|
<h3 class="text-base font-semibold text-zinc-100 text-sm">
|
2025-06-04 19:53:30 -04:00
|
|
|
{{ $t("account.notifications.unread") }}
|
2024-11-16 19:41:19 +11:00
|
|
|
</h3>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="ml-4 mt-2 shrink-0">
|
|
|
|
|
<NuxtLink
|
|
|
|
|
to="/account/notifications"
|
|
|
|
|
type="button"
|
2024-11-19 11:11:59 +11:00
|
|
|
class="text-sm text-zinc-400"
|
2024-11-16 19:41:19 +11:00
|
|
|
>
|
2025-06-04 19:53:30 -04:00
|
|
|
<i18n-t
|
|
|
|
|
keypath="account.notifications.all"
|
|
|
|
|
tag="span"
|
|
|
|
|
scope="global"
|
|
|
|
|
>
|
|
|
|
|
<template #arrow>
|
|
|
|
|
<span aria-hidden="true">{{ $t("chars.arrow") }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</i18n-t>
|
2024-11-16 19:41:19 +11:00
|
|
|
</NuxtLink>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="flex flex-col gap-y-2 max-h-[300px] overflow-y-scroll">
|
2025-05-07 09:54:02 +10:00
|
|
|
<NotificationItem
|
2024-11-16 19:41:19 +11:00
|
|
|
v-for="notification in props.notifications"
|
2025-04-12 16:03:35 -04:00
|
|
|
:key="notification.id"
|
2024-11-16 19:41:19 +11:00
|
|
|
:notification="notification"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
|
v-if="props.notifications.length == 0"
|
2024-11-19 11:11:59 +11:00
|
|
|
class="text-sm text-zinc-400 p-3 text-center w-full"
|
2024-11-16 19:41:19 +11:00
|
|
|
>
|
2025-06-04 19:53:30 -04:00
|
|
|
{{ $t("account.notifications.none") }}
|
2024-11-16 19:41:19 +11:00
|
|
|
</div>
|
|
|
|
|
</PanelWidget>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
2025-11-30 23:01:52 +11:00
|
|
|
import type { SerializeObject } from "nitropack";
|
2025-07-25 07:28:00 -04:00
|
|
|
import type { NotificationModel } from "~/prisma/client/models";
|
2024-11-16 19:41:19 +11:00
|
|
|
|
2025-11-30 23:01:52 +11:00
|
|
|
const props = defineProps<{
|
|
|
|
|
notifications: Array<SerializeObject<NotificationModel>>;
|
|
|
|
|
}>();
|
2024-11-16 19:41:19 +11:00
|
|
|
</script>
|