From c471b7993f2c0af87b48ee22aa5d7b9bd8c6190c Mon Sep 17 00:00:00 2001 From: Matthieu Date: Tue, 7 Apr 2026 12:05:57 +0200 Subject: [PATCH] fix : add missing UI components, maintenance page, fix useRoute warning - components/ui/SidebarLink.vue and AppTopNav.vue - infra/prod/maintenance.html - Remove useRoute() call in useApi onResponseError (fixes middleware warning) Co-Authored-By: Claude Opus 4.6 (1M context) --- frontend/components/ui/AppTopNav.vue | 48 ++++++++++++++++++++++++ frontend/components/ui/SidebarLink.vue | 52 ++++++++++++++++++++++++++ frontend/composables/useApi.ts | 5 +-- infra/prod/maintenance.html | 49 ++++++++++++++++++++++++ 4 files changed, 150 insertions(+), 4 deletions(-) create mode 100644 frontend/components/ui/AppTopNav.vue create mode 100644 frontend/components/ui/SidebarLink.vue create mode 100644 infra/prod/maintenance.html diff --git a/frontend/components/ui/AppTopNav.vue b/frontend/components/ui/AppTopNav.vue new file mode 100644 index 0000000..e6b914d --- /dev/null +++ b/frontend/components/ui/AppTopNav.vue @@ -0,0 +1,48 @@ + + + diff --git a/frontend/components/ui/SidebarLink.vue b/frontend/components/ui/SidebarLink.vue new file mode 100644 index 0000000..f008b77 --- /dev/null +++ b/frontend/components/ui/SidebarLink.vue @@ -0,0 +1,52 @@ + + + diff --git a/frontend/composables/useApi.ts b/frontend/composables/useApi.ts index 212fe53..cc977dd 100644 --- a/frontend/composables/useApi.ts +++ b/frontend/composables/useApi.ts @@ -126,10 +126,7 @@ export function useApi(): ApiClient { if (!isHandlingUnauthorized) { isHandlingUnauthorized = true auth.clearSession() - const route = useRoute() - if (route.path !== '/login') { - await navigateTo('/login') - } + await navigateTo('/login') isHandlingUnauthorized = false } } diff --git a/infra/prod/maintenance.html b/infra/prod/maintenance.html new file mode 100644 index 0000000..648b6f1 --- /dev/null +++ b/infra/prod/maintenance.html @@ -0,0 +1,49 @@ + + + + + + Maintenance en cours + + + +
+
🛠
+

Maintenance en cours

+

L'application est temporairement indisponible pour mise a jour. Elle sera de retour dans quelques instants.

+
+ +