Skip to content

Commit 8835719

Browse files
committed
mode page ui added
1 parent 698ccb6 commit 8835719

File tree

5 files changed

+37
-23
lines changed

5 files changed

+37
-23
lines changed

vue-frontend/warehouse-frontend/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
},
1010
"dependencies": {
1111
"bootstrap": "^5.3.3",
12+
"bootstrap-icons": "^1.11.3",
1213
"core-js": "^3.8.3",
1314
"vue": "^3.2.13",
1415
"vue-router": "^4.5.0"

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

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,27 @@
44

55
<script>
66
export default {
7-
name: "App"
7+
name: "App",
8+
mounted() {
9+
this.setBackgroundColor();
10+
},
11+
watch: {
12+
$route() {
13+
this.setBackgroundColor();
14+
}
15+
},
16+
methods: {
17+
setBackgroundColor() {
18+
if (this.$route.path === '/') {
19+
document.body.style.backgroundColor = '#0b4c62';
20+
} else {
21+
document.body.style.backgroundColor = '#f0f2f5';
22+
}
23+
}
24+
}
825
};
926
</script>
1027

1128
<style>
12-
body {
13-
background-color: #0b4c62 !important; /* Dark blue background */
14-
}
29+
1530
</style>

vue-frontend/warehouse-frontend/src/main.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ import router from "./router";
44

55
import "bootstrap/dist/css/bootstrap.min.css";
66
import "bootstrap/dist/js/bootstrap.bundle.min.js";
7+
import 'bootstrap-icons/font/bootstrap-icons.css';
78

89
createApp(App).use(router).mount('#app')

vue-frontend/warehouse-frontend/src/views/LoginPage.vue

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,19 @@ export default {
77
},
88
methods: {
99
login() {
10-
if (this.username) {
11-
this.$router.push("/mode"); // Navigate to Home after login
12-
} else {
13-
alert("Please enter username");
14-
}
10+
// if (this.username) {
11+
// this.$router.push("/mode"); // Navigate to Home after login
12+
// } else {
13+
// alert("Please enter username");
14+
// }
15+
this.$router.push("/mode");
1516
}
1617
}
1718
};
1819
</script>
1920

2021
<template>
22+
<div class="d-flex justify-content-center align-items-center vh-100">
2123
<div class="card shadow">
2224
<img src="../assets/logo.png" alt="Turing Trust Logo" class="logo">
2325
<p class="text-l">Welcome to the Turing Trust warehouse management application.</p>
@@ -30,14 +32,11 @@ export default {
3032

3133
<button class="btn btn-primary w-100" @click="login">Continue</button>
3234
</div>
35+
</div>
3336
</template>
3437

35-
<style>
36-
body {
37-
background-color: #0b4c62; /* Dark blue background */
38-
display: flex;
39-
justify-content: center;
40-
align-items: center;
38+
<style scoped>
39+
.vh-100 {
4140
height: 100vh;
4241
}
4342
.card {
@@ -49,12 +48,12 @@ body {
4948
border-bottom-color: #04A27D;
5049
}
5150
.btn-primary {
52-
background-color: #04A27D !important;
53-
border-color: #04A27D !important;
51+
background-color: #04A27D;
52+
border-color: #04A27D;
5453
border: none;
5554
}
5655
.btn-primary:hover {
57-
background-color: #0a6b38;
56+
background-color: #04A27D;
5857
}
5958
.logo {
6059
display: block;

vue-frontend/warehouse-frontend/src/views/ModePage.vue

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
<script>
22
export default {
33
name: 'ModePage',
4+
mounted() {
5+
import('bootstrap');
6+
}
47
};
58
</script>
69

710
<template>
8-
<div>
911
<nav class="navbar navbar-dark px-4">
1012
<a class="navbar-brand" href="#">
1113
<img src="../assets/logo_new.png" alt="Turing Trust Logo" height="30">
@@ -105,13 +107,9 @@ export default {
105107
</div>
106108
</div>
107109
</div>
108-
</div>
109110
</template>
110111

111112
<style scoped>
112-
body {
113-
background-color: #f0f2f5;
114-
}
115113
.navbar {
116114
background-color: #0b4c62;
117115
}

0 commit comments

Comments
 (0)