feat: add local fallback for S3 writes

This commit is contained in:
237899745
2026-07-25 16:29:05 +08:00
parent 63744c6d2f
commit 0fe3d4ce8e
11 changed files with 169 additions and 58 deletions

View File

@@ -81,7 +81,7 @@ export function createAppRouter(pinia: Pinia) {
}
if ((to.name === 'login' || to.name === 'register') && auth.isLoggedIn) {
return { name: 'dashboard' }
return { name: auth.user?.role === 'admin' ? 'admin' : 'dashboard' }
}
if (to.meta?.requiresAdmin && auth.user?.role !== 'admin') {