diff --git a/src/pages/StatusPage.vue b/src/pages/StatusPage.vue index 67b3de9d4..f75cfb2da 100644 --- a/src/pages/StatusPage.vue +++ b/src/pages/StatusPage.vue @@ -3,10 +3,10 @@

-
- + + -
+ @@ -241,10 +241,19 @@ export default { imgDataUrl: "/icon.svg", loadedTheme: false, loadedData: false, + baseURL: "", }; }, computed: { + logoURL() { + if (this.imgDataUrl.startsWith("data:")) { + return this.imgDataUrl; + } else { + return this.baseURL + this.imgDataUrl; + } + }, + /** * If the monitor is added to public list, which will not be in this list. */ @@ -379,6 +388,12 @@ export default { return null; } }); + + // Special handle for dev + const env = process.env.NODE_ENV; + if (env === "development" || localStorage.dev === "dev") { + this.baseURL = location.protocol + "//" + location.hostname + ":3001"; + } }, async mounted() { axios.get("/api/status-page/config").then((res) => { @@ -386,13 +401,6 @@ export default { if (this.config.logo) { this.imgDataUrl = this.config.logo; - - // Special handle for dev - const env = process.env.NODE_ENV; - if (env === "development" || localStorage.dev === "dev") { - let baseURL = location.protocol + "//" + location.hostname + ":3001"; - this.imgDataUrl = baseURL + this.imgDataUrl; - } } });