From 719a136d1eaa69daa5a67e7e047634e58af552dd Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Thu, 17 Mar 2022 22:44:47 +0800 Subject: [PATCH] [Status Page] Improved entry page --- server/server.js | 4 ++-- src/components/settings/General.vue | 18 +++++++++--------- src/pages/AddStatusPage.vue | 27 ++++++++++++++++++++------- src/pages/ManageStatusPage.vue | 4 +++- 4 files changed, 34 insertions(+), 19 deletions(-) diff --git a/server/server.js b/server/server.js index 043d85bb7..34a23c9ea 100644 --- a/server/server.js +++ b/server/server.js @@ -201,8 +201,8 @@ exports.entryPage = "dashboard"; // Entry Page app.get("/", async (_request, response) => { - if (exports.entryPage === "statusPage") { - response.redirect("/status"); + if (exports.entryPage && exports.entryPage.startsWith("statusPage-")) { + response.redirect("/status/" + exports.entryPage.replace("statusPage-", "")); } else { response.redirect("/dashboard"); } diff --git a/src/components/settings/General.vue b/src/components/settings/General.vue index 459bb8d5d..e6896945c 100644 --- a/src/components/settings/General.vue +++ b/src/components/settings/General.vue @@ -62,31 +62,31 @@
-
-
+
-
diff --git a/src/pages/AddStatusPage.vue b/src/pages/AddStatusPage.vue index 7754116fc..f14ebfa6c 100644 --- a/src/pages/AddStatusPage.vue +++ b/src/pages/AddStatusPage.vue @@ -6,14 +6,21 @@
-
- - +
+ +
-
- - +
+ +
+ /status/ + +
+
+ +
+
@@ -29,9 +36,15 @@ export default { return { statusPage: { - } + }, + processing: false, }; } }; + diff --git a/src/pages/ManageStatusPage.vue b/src/pages/ManageStatusPage.vue index 0eafb3e35..c6a8b7f50 100644 --- a/src/pages/ManageStatusPage.vue +++ b/src/pages/ManageStatusPage.vue @@ -11,7 +11,9 @@