mirror of
				https://github.com/louislam/uptime-kuma.git
				synced 2025-02-25 18:55:21 -06:00 
			
		
		
		
	Fix theme color that do not apply to status page with a custom domain
This commit is contained in:
		@@ -6,6 +6,7 @@ export default {
 | 
			
		||||
            userTheme: localStorage.theme,
 | 
			
		||||
            userHeartbeatBar: localStorage.heartbeatBarTheme,
 | 
			
		||||
            statusPageTheme: "light",
 | 
			
		||||
            forceStatusPageTheme: false,
 | 
			
		||||
            path: "",
 | 
			
		||||
        };
 | 
			
		||||
    },
 | 
			
		||||
@@ -27,6 +28,10 @@ export default {
 | 
			
		||||
 | 
			
		||||
    computed: {
 | 
			
		||||
        theme() {
 | 
			
		||||
            // As entry can be status page now, set forceStatusPageTheme to true to use status page theme
 | 
			
		||||
            if (this.forceStatusPageTheme) {
 | 
			
		||||
                return this.statusPageTheme;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            // Entry no need dark
 | 
			
		||||
            if (this.path === "") {
 | 
			
		||||
 
 | 
			
		||||
@@ -26,6 +26,7 @@ export default {
 | 
			
		||||
 | 
			
		||||
        if (res.type === "statusPageMatchedDomain") {
 | 
			
		||||
            this.statusPageSlug = res.statusPageSlug;
 | 
			
		||||
            this.$root.forceStatusPageTheme = true;
 | 
			
		||||
 | 
			
		||||
        } else if (res.type === "entryPage") {          // Dev only. For production, the logic is in the server side
 | 
			
		||||
            const entryPage = res.entryPage;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user