mirror of
				https://github.com/TeamPiped/Piped.git
				synced 2024-08-14 23:57:27 +00:00 
			
		
		
		
	fix: make title bar reactive on auto mode
This commit is contained in:
		
							parent
							
								
									68c904e170
								
							
						
					
					
						commit
						951dbec462
					
				
					 1 changed files with 4 additions and 2 deletions
				
			
		| 
						 | 
					@ -34,10 +34,12 @@ export default {
 | 
				
			||||||
            if (themePref == "auto") this.theme = darkModePreference.matches ? "dark" : "light";
 | 
					            if (themePref == "auto") this.theme = darkModePreference.matches ? "dark" : "light";
 | 
				
			||||||
            else this.theme = themePref;
 | 
					            else this.theme = themePref;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            // Change title bar color to white
 | 
					            // Change title bar color based on user's theme
 | 
				
			||||||
            if (this.theme === "light") {
 | 
					 | 
				
			||||||
            const themeColor = document.querySelector("meta[name='theme-color']");
 | 
					            const themeColor = document.querySelector("meta[name='theme-color']");
 | 
				
			||||||
 | 
					            if (this.theme === "light") {
 | 
				
			||||||
                themeColor.setAttribute("content", "#FFF");
 | 
					                themeColor.setAttribute("content", "#FFF");
 | 
				
			||||||
 | 
					            } else {
 | 
				
			||||||
 | 
					                themeColor.setAttribute("content", "#0F0F0F");
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            // Used for the scrollbar
 | 
					            // Used for the scrollbar
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue