Added Notifications

Added Mentions in HistoryItems
This commit is contained in:
2024-11-08 20:17:56 +01:00
parent 928e4d0ca9
commit f69b30b5ba
6 changed files with 169 additions and 15 deletions

View File

@@ -5,7 +5,7 @@
<template #right>
<UTooltip text="Notifications" :shortcuts="['N']">
<UButton color="gray" variant="ghost" square @click="isNotificationsSlideoverOpen = true">
<UChip :show="false" color="red" inset>
<UChip :show="unreadMessages" color="primary" inset>
<UIcon name="i-heroicons-bell" class="w-5 h-5" />
</UChip>
</UButton>
@@ -88,6 +88,12 @@ const supabase = useSupabaseClient()
const user = useSupabaseUser()
const unreadMessages = ref(false)
const setup = async () => {
unreadMessages.value = (await supabase.from("notifications").select("id,read").eq("read",false)).data.length > 0
}
setup()
</script>
<style scoped>