Replace the notify store with 2fauth/ui notifier & 2fauth/stores parser

This commit is contained in:
Bubka
2025-06-23 14:53:17 +02:00
parent 6f419cfbcb
commit 16a1a9077d
39 changed files with 192 additions and 203 deletions

View File

@ -3,7 +3,8 @@ import middlewarePipeline from "@/router/middlewarePipeline";
import { useUserStore } from '@/stores/user'
import { useTwofaccounts } from '@/stores/twofaccounts'
import { useAppSettingsStore } from '@/stores/appSettings'
import { useNotifyStore } from '@/stores/notify'
import { useNotify } from '@2fauth/ui'
import { useErrorHandler } from '@2fauth/stores'
import authGuard from './middlewares/authGuard'
import adminOnly from './middlewares/adminOnly'
@ -62,8 +63,9 @@ router.beforeEach((to, from, next) => {
const user = useUserStore()
const twofaccounts = useTwofaccounts()
const appSettings = useAppSettingsStore()
const notify = useNotifyStore()
const stores = { user: user, twofaccounts: twofaccounts, appSettings: appSettings, notify: notify }
const notify = useNotify()
const errorHandler = useErrorHandler()
const stores = { user: user, twofaccounts: twofaccounts, appSettings: appSettings, notify: notify, errorHandler: errorHandler }
const nextMiddleware = {}
const context = { to, from, next, nextMiddleware, stores }