From 122e77b67ce798b7020ab57d3c856d5da343699f Mon Sep 17 00:00:00 2001 From: Guamss Date: Fri, 5 Dec 2025 16:04:01 +0100 Subject: [PATCH] ajout d'une interface de connexion --- src/App.vue | 8 +- src/components/Authenticate.vue | 141 ++++++++++++++----------- src/main.ts | 1 + src/services/authentication.service.ts | 4 +- src/styles.css | 13 +++ 5 files changed, 100 insertions(+), 67 deletions(-) create mode 100644 src/styles.css diff --git a/src/App.vue b/src/App.vue index a91f9c4..c11901d 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,10 +1,14 @@ - diff --git a/src/components/Authenticate.vue b/src/components/Authenticate.vue index fa1613e..317af9f 100644 --- a/src/components/Authenticate.vue +++ b/src/components/Authenticate.vue @@ -1,94 +1,109 @@ diff --git a/src/main.ts b/src/main.ts index ac08098..0fc9d66 100644 --- a/src/main.ts +++ b/src/main.ts @@ -2,5 +2,6 @@ import { createApp } from 'vue' import App from './App.vue' import ToastPlugin from 'vue-toast-notification' import { router } from './routes' +import 'vue-toast-notification/dist/theme-sugar.css' createApp(App).use(router).use(ToastPlugin).mount('#app') diff --git a/src/services/authentication.service.ts b/src/services/authentication.service.ts index 950317b..32ebf34 100644 --- a/src/services/authentication.service.ts +++ b/src/services/authentication.service.ts @@ -5,7 +5,7 @@ export const MBL_API_URL = "http://localhost:8000/api/"; export class AuthenticationService { constructor() { - axios.defaults.baseURL = `${MBL_API_URL}/auth` + axios.defaults.baseURL = `${MBL_API_URL}` } async findUsers() { @@ -16,7 +16,7 @@ export class AuthenticationService { async authenticate(username: string, password: string) { return await axios - .post('token', { + .post('token/', { username: username, password: password, }) diff --git a/src/styles.css b/src/styles.css new file mode 100644 index 0000000..5c44195 --- /dev/null +++ b/src/styles.css @@ -0,0 +1,13 @@ +:root { + color-scheme: light dark; +} + +* { + font-family: "Roboto", sans-serif; +} + +body { + color: light-dark(#121212, #efefec); + background-color: light-dark(#efedea, #121212); + min-height: 100vh; +}