diff --git a/structures-frontend-next/.config/structures.config.json b/structures-frontend-next/.config/structures.config.json new file mode 100644 index 000000000..dc458d2c5 --- /dev/null +++ b/structures-frontend-next/.config/structures.config.json @@ -0,0 +1,5 @@ +{ + "applicationId": "ecommerce", + "entityDirectory": "src/domain", + "serverUrl": "http://127.0.0.1:9090" +} diff --git a/structures-frontend-next/src/IContinuumUI.ts b/structures-frontend-next/src/IContinuumUI.ts index b2e22a570..290b33879 100644 --- a/structures-frontend-next/src/IContinuumUI.ts +++ b/structures-frontend-next/src/IContinuumUI.ts @@ -2,13 +2,11 @@ import { type Router } from 'vue-router'; import { reactive } from 'vue'; import { StructuresStates } from './states'; -// Interface for ContinuumUI export interface IContinuumUI { initialize(router: Router): void; navigate(path: string): Promise; } -// Class for ContinuumUI class ContinuumUI implements IContinuumUI { private router!: Router; @@ -17,20 +15,6 @@ class ContinuumUI implements IContinuumUI { public initialize(router: Router): void { this.router = router; - - // Add navigation guard to the existing router - this.router.beforeEach((to, _from, next) => { - const { authenticationRequired } = to.meta as { authenticationRequired?: boolean }; - - if ((authenticationRequired === undefined || authenticationRequired) - && !StructuresStates.getUserState().isAuthenticated()) { - - next({ path: '/login', query: { referer: to.path } }); - - } else { - next(); - } - }); } public navigate(path: string): Promise { @@ -39,5 +23,4 @@ class ContinuumUI implements IContinuumUI { } } -// Export a reactive singleton export const CONTINUUM_UI: IContinuumUI = reactive(new ContinuumUI()); \ No newline at end of file diff --git a/structures-frontend-next/src/layouts/Header.vue b/structures-frontend-next/src/layouts/Header.vue index 286371e10..a1a00eaca 100644 --- a/structures-frontend-next/src/layouts/Header.vue +++ b/structures-frontend-next/src/layouts/Header.vue @@ -2,11 +2,11 @@
- + -