Skip to content

Commit f05c369

Browse files
committed
login page removed
1 parent 5a1dd1d commit f05c369

File tree

3 files changed

+30
-29
lines changed

3 files changed

+30
-29
lines changed

vue-frontend/warehouse-frontend/src/App.vue

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,19 @@ export default {
88
mounted() {
99
this.setBackgroundColor();
1010
},
11-
watch: {
12-
$route() {
13-
this.setBackgroundColor();
14-
}
15-
},
11+
// watch: {
12+
// $route() {
13+
// this.setBackgroundColor();
14+
// }
15+
// },
1616
methods: {
1717
setBackgroundColor() {
18-
if (this.$route.path === '/') {
19-
document.body.style.backgroundColor = '#0b4c62';
20-
} else {
21-
document.body.style.backgroundColor = '#f0f2f5';
22-
}
18+
// if (this.$route.path === '/') {
19+
// document.body.style.backgroundColor = '#0b4c62';
20+
// } else {
21+
// document.body.style.backgroundColor = '#f0f2f5';
22+
// }
23+
document.body.style.backgroundColor = '#f0f2f5';
2324
}
2425
}
2526
};

vue-frontend/warehouse-frontend/src/components/AppNavbar.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ export default {
1515
name: "AppNavbar",
1616
methods: {
1717
logout() {
18-
localStorage.removeItem('isAuthenticated');
19-
localStorage.removeItem('operatorName');
20-
localStorage.removeItem('mode');
18+
// localStorage.removeItem('isAuthenticated');
19+
// localStorage.removeItem('operatorName');
20+
// localStorage.removeItem('mode');
2121
this.$router.push('/');
2222
},
2323
},
Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
import { createRouter, createWebHashHistory } from "vue-router";
22
import DefaultLayout from "../layout/DefaultLayout.vue";
3-
import LoginPage from "../views/LoginPage.vue";
3+
//import LoginPage from "../views/LoginPage.vue";
44
import HomePage from "../views/HomePage.vue";
55
import ModePage from "../views/ModePage.vue";
66
import ParentPage from "../views/ParentPage.vue";
77
import LocationPage from "../views/LocationPage.vue";
88
import TransactionPage from "../views/TransactionPage.vue";
99

1010
const routes = [
11-
{ path: "/", component: LoginPage },
11+
// { path: "/", component: LoginPage },
1212
{
1313
path: "/",
1414
component: DefaultLayout,
1515
children: [
16-
{ path: "mode", component: ModePage, meta: { requiresAuth: true } },
17-
{ path: "home", component: HomePage, meta: { requiresAuth: true } },
18-
{ path: "parent", component: ParentPage, meta: { requiresAuth: true } },
19-
{ path: "location", component: LocationPage, meta: { requiresAuth: true } },
20-
{ path: "transaction", component: TransactionPage, meta: { requiresAuth: true } },
16+
{ path: "", component: ModePage /*, meta: { requiresAuth: true }*/ },
17+
{ path: "home", component: HomePage /*, meta: { requiresAuth: true }*/ },
18+
{ path: "parent", component: ParentPage /*, meta: { requiresAuth: true }*/ },
19+
{ path: "location", component: LocationPage /*, meta: { requiresAuth: true }*/ },
20+
{ path: "transaction", component: TransactionPage /*, meta: { requiresAuth: true }*/ },
2121
],
2222
},
2323
];
@@ -27,14 +27,14 @@ const router = createRouter({
2727
routes
2828
});
2929

30-
router.beforeEach((to, from, next) => {
31-
const isAuthenticated = localStorage.getItem('isAuthenticated');
32-
33-
if (to.meta.requiresAuth && !isAuthenticated) {
34-
next('/');
35-
} else {
36-
next();
37-
}
38-
});
30+
// router.beforeEach((to, from, next) => {
31+
// const isAuthenticated = localStorage.getItem('isAuthenticated');
32+
//
33+
// if (to.meta.requiresAuth && !isAuthenticated) {
34+
// next('/');
35+
// } else {
36+
// next();
37+
// }
38+
// });
3939

4040
export default router;

0 commit comments

Comments
 (0)