Skip to content

Commit

Permalink
[F] redirect to login
Browse files Browse the repository at this point in the history
  • Loading branch information
LS-KR committed Nov 10, 2023
1 parent 4273f0c commit d3437e1
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<script setup lang="ts">
import { RouterLink, RouterView } from "vue-router";
import Sidebar from "@/components/Sidebar.vue";
</script>

Expand Down
7 changes: 5 additions & 2 deletions src/components/Navigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ export default class Navigation extends Vue {}
<template>
<div class="nav">
<div class="user">
<img src="../assets/default.png" />
<p>Admin</p>
<img src="../assets/default.png" />
</div>
</div>
</template>
Expand All @@ -18,6 +18,7 @@ export default class Navigation extends Vue {}
@import '../css/fonts.css'
.nav
display: block
width: 100vw
height: 60px
background-color: #FEFEFE
Expand All @@ -29,11 +30,13 @@ export default class Navigation extends Vue {}
width: 6vw
img
display: inline-block
max-width: 40px
max-height: 40px
border-radius: 56562px
p
font-size: normal
display: inline-block
font-size: xx-large
font-family: 'Consolas'
</style>
1 change: 1 addition & 0 deletions src/views/Admin/Book.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export default class Book extends Vue {
bookData = "";
created(): void {
if (!localStorage.getItem("login")) this.$router.push("/login");
this.bookData = JSON.stringify(rawData);
}
}
Expand Down
1 change: 1 addition & 0 deletions src/views/Admin/Manage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export default class Manage extends Vue {
adminData = "";
created(): void {
if (!localStorage.getItem("login")) this.$router.push("/login");
this.adminData = JSON.stringify(rawData);
}
}
Expand Down
1 change: 1 addition & 0 deletions src/views/Admin/User.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export default class User extends Vue {
userData = "";
created(): void {
if (!localStorage.getItem("login")) this.$router.push("/login");
this.userData = JSON.stringify(rawData);
}
}
Expand Down

0 comments on commit d3437e1

Please sign in to comment.