forked from open-webui/open-webui
		
	fix: theme issue
This commit is contained in:
		
							parent
							
								
									c85a2e8cd4
								
							
						
					
					
						commit
						b93bdfb222
					
				
					 1 changed files with 2 additions and 3 deletions
				
			
		|  | @ -9,12 +9,11 @@ | |||
| 		<script> | ||||
| 			// On page load or when changing themes, best to add inline in `head` to avoid FOUC | ||||
| 			(() => { | ||||
| 				if (localStorage.theme.includes('oled')) { | ||||
| 				if (localStorage?.theme && localStorage?.theme.includes('oled')) { | ||||
| 					document.documentElement.style.setProperty('--color-gray-900', '#000000'); | ||||
| 					document.documentElement.style.setProperty('--color-gray-950', '#000000'); | ||||
| 					document.documentElement.classList.add('dark'); | ||||
| 				} | ||||
| 				else if ( | ||||
| 				} else if ( | ||||
| 					localStorage.theme === 'light' || | ||||
| 					(!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: light)').matches) | ||||
| 				) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Timothy J. Baek
						Timothy J. Baek