From 4f4a8d18f460fe58f9858f921171862a163b851c Mon Sep 17 00:00:00 2001 From: mi1468 Date: Sun, 4 May 2025 17:31:31 +0330 Subject: [PATCH] reset password added --- xroom-dashboard/src/api/axios.js | 12 + xroom-dashboard/src/config/index.js | 2 + xroom-dashboard/src/pages/LoginPage.vue | 36 +-- xroom-dashboard/src/pages/ResetPassword.vue | 242 ++++++++++++++++++++ xroom-dashboard/src/router/index.js | 6 + 5 files changed, 282 insertions(+), 16 deletions(-) create mode 100644 xroom-dashboard/src/api/axios.js create mode 100644 xroom-dashboard/src/config/index.js create mode 100644 xroom-dashboard/src/pages/ResetPassword.vue diff --git a/xroom-dashboard/src/api/axios.js b/xroom-dashboard/src/api/axios.js new file mode 100644 index 0000000..e4d6ab3 --- /dev/null +++ b/xroom-dashboard/src/api/axios.js @@ -0,0 +1,12 @@ +// src/api/axios.js +import axios from 'axios'; +import { API_BASE_URL } from '@/config'; // Adjust the path if needed + +const apiClient = axios.create({ + baseURL: API_BASE_URL, // All requests will prepend this URL + headers: { + 'Content-Type': 'application/json', + }, +}); + +export default apiClient; \ No newline at end of file diff --git a/xroom-dashboard/src/config/index.js b/xroom-dashboard/src/config/index.js new file mode 100644 index 0000000..693ecf6 --- /dev/null +++ b/xroom-dashboard/src/config/index.js @@ -0,0 +1,2 @@ +// src/config/index.js +export const API_BASE_URL = 'http://194.62.43.230:8000'; \ No newline at end of file diff --git a/xroom-dashboard/src/pages/LoginPage.vue b/xroom-dashboard/src/pages/LoginPage.vue index d5fa801..871ee8c 100644 --- a/xroom-dashboard/src/pages/LoginPage.vue +++ b/xroom-dashboard/src/pages/LoginPage.vue @@ -2,7 +2,7 @@
- + + diff --git a/xroom-dashboard/src/router/index.js b/xroom-dashboard/src/router/index.js index 237eb16..49088c7 100644 --- a/xroom-dashboard/src/router/index.js +++ b/xroom-dashboard/src/router/index.js @@ -1,6 +1,7 @@ import { createRouter, createWebHistory } from 'vue-router' import SignupPage from '../pages/SignupPage.vue' import LoginPage from '../pages/LoginPage.vue' +import ResetPassword from '../pages/ResetPassword.vue' import DashboardPage from '../pages/dashboard/index.vue' import FilesPage from '@/pages/dashboard/files.vue'; import axios from '@/axios'; @@ -16,6 +17,11 @@ const routes = [ name: 'LoginPage', component: LoginPage }, + { + path: '/resetPassword', + name: 'ResetPassword', + component: ResetPassword + }, { path: '/dashboard', name: 'DashboardPage',