You've already forked agentic-coding-workflow
feat(web): auth/ui/notifications pinia stores + theme composable
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { ref } from 'vue'
|
||||
|
||||
export interface Notification {
|
||||
id: string
|
||||
topic: string
|
||||
severity: 'info' | 'warning' | 'error'
|
||||
title: string
|
||||
body: string
|
||||
link?: string
|
||||
read_at?: string
|
||||
created_at: string
|
||||
}
|
||||
|
||||
export const useNotificationsStore = defineStore('notifications', () => {
|
||||
const items = ref<Notification[]>([])
|
||||
const unreadCount = ref(0)
|
||||
|
||||
function setItems(list: Notification[]) {
|
||||
items.value = list
|
||||
}
|
||||
function setUnreadCount(n: number) {
|
||||
unreadCount.value = n
|
||||
}
|
||||
|
||||
return { items, unreadCount, setItems, setUnreadCount }
|
||||
})
|
||||
Reference in New Issue
Block a user