From d3437e11d6879f406115946860ce8c15e27a53a5 Mon Sep 17 00:00:00 2001 From: Elihuso Quigley Date: Fri, 10 Nov 2023 08:04:58 +0800 Subject: [PATCH] [F] redirect to login --- src/App.vue | 1 - src/components/Navigation.vue | 7 +++++-- src/views/Admin/Book.vue | 1 + src/views/Admin/Manage.vue | 1 + src/views/Admin/User.vue | 1 + 5 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/App.vue b/src/App.vue index ce31044..ba953dc 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,5 +1,4 @@ diff --git a/src/components/Navigation.vue b/src/components/Navigation.vue index 060c543..2563319 100644 --- a/src/components/Navigation.vue +++ b/src/components/Navigation.vue @@ -7,8 +7,8 @@ export default class Navigation extends Vue {} @@ -18,6 +18,7 @@ export default class Navigation extends Vue {} @import '../css/fonts.css' .nav + display: block width: 100vw height: 60px background-color: #FEFEFE @@ -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' diff --git a/src/views/Admin/Book.vue b/src/views/Admin/Book.vue index 487b6ed..12a2516 100644 --- a/src/views/Admin/Book.vue +++ b/src/views/Admin/Book.vue @@ -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); } } diff --git a/src/views/Admin/Manage.vue b/src/views/Admin/Manage.vue index b007d7a..1d296a6 100644 --- a/src/views/Admin/Manage.vue +++ b/src/views/Admin/Manage.vue @@ -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); } } diff --git a/src/views/Admin/User.vue b/src/views/Admin/User.vue index b48e279..eb22db9 100644 --- a/src/views/Admin/User.vue +++ b/src/views/Admin/User.vue @@ -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); } }