-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
81 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<script setup lang="ts"> | ||
import {VBtn} from '@gits-id/ui'; | ||
const appConfig = useAppConfig(); | ||
</script> | ||
|
||
<template> | ||
<VDropdown | ||
:label="appConfig.notification.label" | ||
right | ||
panel-class="!w-80 !p-0" | ||
> | ||
<template #activator> | ||
<VDropdownButton | ||
:as="VBtn" | ||
fab | ||
text | ||
prefix-icon="ic:round-notifications" | ||
class="relative" | ||
> | ||
<span | ||
v-if="appConfig.notification.items.length > 0" | ||
class="absolute top-2 right-2 w-2 h-2 bg-red-500 rounded-full" | ||
/> | ||
</VDropdownButton> | ||
</template> | ||
<VList hover> | ||
<VListItemHeader class="!font-semibold">Notification</VListItemHeader> | ||
<VListItemDivider /> | ||
<template | ||
v-for="notif in appConfig.notification.items" | ||
:key="notif.title" | ||
> | ||
<VListItem prepend-icon="ic:round-verified-user"> | ||
<div> | ||
<h3 class="font-medium"> | ||
{{ notif.title }} | ||
</h3> | ||
<p class="text-gray-600 text-sm truncate" :title="notif.message"> | ||
{{ notif.message }} | ||
</p> | ||
</div> | ||
</VListItem> | ||
</template> | ||
<VListItemDivider /> | ||
<VBtn block text color="primary">View all notifications</VBtn> | ||
</VList> | ||
</VDropdown> | ||
</template> |