feat: add initial application structure with configuration, UI components, and state management
This commit is contained in:
parent
fadf94002c
commit
0af6b17792
56 changed files with 6137 additions and 129 deletions
20
middleware/setup.global.ts
Normal file
20
middleware/setup.global.ts
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
export default defineNuxtRouteMiddleware((to) => {
|
||||
// Skip middleware for wizard and API routes
|
||||
if (to.path === "/wizard" || to.path.startsWith("/api/")) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Use actual store state to determine whether setup is complete
|
||||
const membersStore = useMembersStore();
|
||||
const policiesStore = usePoliciesStore();
|
||||
const streamsStore = useStreamsStore();
|
||||
|
||||
const setupComplete =
|
||||
membersStore.isValid &&
|
||||
policiesStore.isValid &&
|
||||
streamsStore.hasValidStreams;
|
||||
|
||||
if (!setupComplete) {
|
||||
return navigateTo("/wizard");
|
||||
}
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue