brutalism design

This commit is contained in:
2026-05-14 01:05:01 +06:00
parent 6a2111092b
commit edef0a70d2
42 changed files with 1114 additions and 316 deletions

View File

@@ -1,4 +1,5 @@
import type { Component, FunctionPlugin } from 'vue'
import { useAuth } from '@shared/composables/use-auth'
import { createRouter, createWebHistory } from 'vue-router'
import { routes } from 'vue-router/auto-routes'
@@ -13,6 +14,23 @@ export const router = createRouter({
history: createWebHistory(),
routes,
})
router.onError((e) => {
console.log('wtf', e)
})
router.isReady().then(() => {
router.beforeEach((to) => {
const { authorized } = useAuth()
if (authorized.value && to.meta.auth === 'guest') {
return { name: '/', replace: true }
}
if (!authorized.value && to.meta.auth === undefined) {
return { name: '/auth/login', replace: true }
}
})
})
export default {
install(app) {