From 6d1f34f19ff39fae2e36489b76341b873d0558dd Mon Sep 17 00:00:00 2001 From: Antoine BRYJA Date: Mon, 10 Nov 2025 13:20:30 +0100 Subject: [PATCH] ajoute de la nav bar et de route --- front-end/index.html | 4 +- front-end/package-lock.json | 24 ++++++++- front-end/package.json | 3 +- front-end/public/add.svg | 3 ++ front-end/public/addUser.svg | 3 ++ front-end/public/arrow.svg | 3 ++ front-end/public/calandar.svg | 3 ++ front-end/public/client.svg | 3 ++ front-end/public/dashboard.svg | 3 ++ front-end/public/inter.svg | 11 +++++ front-end/public/list.svg | 3 ++ front-end/public/logologoWsl.svg | 4 ++ front-end/public/ticket.svg | 10 ++++ front-end/src/App.vue | 47 +++++++++++++++--- front-end/src/components/Header.vue | 15 ++++++ front-end/src/components/NavBar.vue | 75 +++++++++++++++++++++++++++++ front-end/src/main.ts | 11 ++++- front-end/src/routes.ts | 7 +++ front-end/src/vue/Dashboard.vue | 13 +++++ front-end/src/vue/Ticket.vue | 13 +++++ 20 files changed, 245 insertions(+), 13 deletions(-) create mode 100644 front-end/public/add.svg create mode 100644 front-end/public/addUser.svg create mode 100644 front-end/public/arrow.svg create mode 100644 front-end/public/calandar.svg create mode 100644 front-end/public/client.svg create mode 100644 front-end/public/dashboard.svg create mode 100644 front-end/public/inter.svg create mode 100644 front-end/public/list.svg create mode 100644 front-end/public/logologoWsl.svg create mode 100644 front-end/public/ticket.svg create mode 100644 front-end/src/components/Header.vue create mode 100644 front-end/src/components/NavBar.vue create mode 100644 front-end/src/routes.ts create mode 100644 front-end/src/vue/Dashboard.vue create mode 100644 front-end/src/vue/Ticket.vue diff --git a/front-end/index.html b/front-end/index.html index 9e5fc8f..baf1bf7 100644 --- a/front-end/index.html +++ b/front-end/index.html @@ -6,8 +6,8 @@ Vite App - -
+ +
diff --git a/front-end/package-lock.json b/front-end/package-lock.json index 8a25197..bfa70e4 100644 --- a/front-end/package-lock.json +++ b/front-end/package-lock.json @@ -8,7 +8,8 @@ "name": "front-end", "version": "0.0.0", "dependencies": { - "vue": "^3.5.22" + "vue": "^3.5.22", + "vue-router": "^4.6.3" }, "devDependencies": { "@tsconfig/node22": "^22.0.2", @@ -1897,6 +1898,12 @@ "@vue/shared": "3.5.22" } }, + "node_modules/@vue/devtools-api": { + "version": "6.6.4", + "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.6.4.tgz", + "integrity": "sha512-sGhTPMuXqZ1rVOk32RylztWkfXTRhuS7vgAKv0zjqk8gbsHkJ7xfFf+jbySxt7tWObEJwyKaHMikV/WGDiQm8g==", + "license": "MIT" + }, "node_modules/@vue/devtools-core": { "version": "8.0.3", "resolved": "https://registry.npmjs.org/@vue/devtools-core/-/devtools-core-8.0.3.tgz", @@ -4294,6 +4301,21 @@ "dev": true, "license": "MIT" }, + "node_modules/vue-router": { + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.6.3.tgz", + "integrity": "sha512-ARBedLm9YlbvQomnmq91Os7ck6efydTSpRP3nuOKCvgJOHNrhRoJDSKtee8kcL1Vf7nz6U+PMBL+hTvR3bTVQg==", + "license": "MIT", + "dependencies": { + "@vue/devtools-api": "^6.6.4" + }, + "funding": { + "url": "https://github.com/sponsors/posva" + }, + "peerDependencies": { + "vue": "^3.5.0" + } + }, "node_modules/vue-tsc": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/vue-tsc/-/vue-tsc-3.1.3.tgz", diff --git a/front-end/package.json b/front-end/package.json index ba5ecb6..5c7abfd 100644 --- a/front-end/package.json +++ b/front-end/package.json @@ -15,7 +15,8 @@ "type-check": "vue-tsc --build" }, "dependencies": { - "vue": "^3.5.22" + "vue": "^3.5.22", + "vue-router": "^4.6.3" }, "devDependencies": { "@tsconfig/node22": "^22.0.2", diff --git a/front-end/public/add.svg b/front-end/public/add.svg new file mode 100644 index 0000000..4340721 --- /dev/null +++ b/front-end/public/add.svg @@ -0,0 +1,3 @@ + + + diff --git a/front-end/public/addUser.svg b/front-end/public/addUser.svg new file mode 100644 index 0000000..020bff2 --- /dev/null +++ b/front-end/public/addUser.svg @@ -0,0 +1,3 @@ + + + diff --git a/front-end/public/arrow.svg b/front-end/public/arrow.svg new file mode 100644 index 0000000..a2aeaf5 --- /dev/null +++ b/front-end/public/arrow.svg @@ -0,0 +1,3 @@ + + + diff --git a/front-end/public/calandar.svg b/front-end/public/calandar.svg new file mode 100644 index 0000000..59cd767 --- /dev/null +++ b/front-end/public/calandar.svg @@ -0,0 +1,3 @@ + + + diff --git a/front-end/public/client.svg b/front-end/public/client.svg new file mode 100644 index 0000000..2e22bcb --- /dev/null +++ b/front-end/public/client.svg @@ -0,0 +1,3 @@ + + + diff --git a/front-end/public/dashboard.svg b/front-end/public/dashboard.svg new file mode 100644 index 0000000..099e6af --- /dev/null +++ b/front-end/public/dashboard.svg @@ -0,0 +1,3 @@ + + + diff --git a/front-end/public/inter.svg b/front-end/public/inter.svg new file mode 100644 index 0000000..0f36a28 --- /dev/null +++ b/front-end/public/inter.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/front-end/public/list.svg b/front-end/public/list.svg new file mode 100644 index 0000000..776b8eb --- /dev/null +++ b/front-end/public/list.svg @@ -0,0 +1,3 @@ + + + diff --git a/front-end/public/logologoWsl.svg b/front-end/public/logologoWsl.svg new file mode 100644 index 0000000..955d8b8 --- /dev/null +++ b/front-end/public/logologoWsl.svg @@ -0,0 +1,4 @@ + + + + diff --git a/front-end/public/ticket.svg b/front-end/public/ticket.svg new file mode 100644 index 0000000..e9fa85f --- /dev/null +++ b/front-end/public/ticket.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/front-end/src/App.vue b/front-end/src/App.vue index abfd315..99bb3b4 100644 --- a/front-end/src/App.vue +++ b/front-end/src/App.vue @@ -1,11 +1,44 @@ - + - + diff --git a/front-end/src/components/Header.vue b/front-end/src/components/Header.vue new file mode 100644 index 0000000..7b7c991 --- /dev/null +++ b/front-end/src/components/Header.vue @@ -0,0 +1,15 @@ + + + + + \ No newline at end of file diff --git a/front-end/src/components/NavBar.vue b/front-end/src/components/NavBar.vue new file mode 100644 index 0000000..b4ab5fd --- /dev/null +++ b/front-end/src/components/NavBar.vue @@ -0,0 +1,75 @@ + + + + + diff --git a/front-end/src/main.ts b/front-end/src/main.ts index 01433bc..e7f0289 100644 --- a/front-end/src/main.ts +++ b/front-end/src/main.ts @@ -1,4 +1,11 @@ import { createApp } from 'vue' import App from './App.vue' - -createApp(App).mount('#app') +import {routes} from "./routes.ts" +import { createRouter, createWebHistory } from 'vue-router' +const app = createApp(App) +const router = createRouter({ + history: createWebHistory(), + routes +}) +app.use(router) +app.mount("#app") diff --git a/front-end/src/routes.ts b/front-end/src/routes.ts new file mode 100644 index 0000000..e5fe035 --- /dev/null +++ b/front-end/src/routes.ts @@ -0,0 +1,7 @@ +import Dashboard from './vue/Dashboard.vue' +import Ticket from './vue/ticket.vue' + +export const routes = [ + {path: '/', component: Dashboard}, + {path: '/ticket', component: Ticket}, +] \ No newline at end of file diff --git a/front-end/src/vue/Dashboard.vue b/front-end/src/vue/Dashboard.vue new file mode 100644 index 0000000..4426174 --- /dev/null +++ b/front-end/src/vue/Dashboard.vue @@ -0,0 +1,13 @@ + + + + + \ No newline at end of file diff --git a/front-end/src/vue/Ticket.vue b/front-end/src/vue/Ticket.vue new file mode 100644 index 0000000..8d5092a --- /dev/null +++ b/front-end/src/vue/Ticket.vue @@ -0,0 +1,13 @@ + + + + + \ No newline at end of file