forked from open-webui/open-webui
		
	fix: default theme should be dark
This commit is contained in:
		
							parent
							
								
									73ca167d70
								
							
						
					
					
						commit
						936bad455f
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		|  | @ -12,12 +12,12 @@ | ||||||
| 				(!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: light)').matches) | 				(!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: light)').matches) | ||||||
| 			) { | 			) { | ||||||
| 				document.documentElement.classList.add('light'); | 				document.documentElement.classList.add('light'); | ||||||
| 			} else if (localStorage.theme === 'dark') { | 			} else if (localStorage.theme) { | ||||||
| 				document.documentElement.classList.add('dark'); |  | ||||||
| 			} else { |  | ||||||
| 				localStorage.theme.split(' ').forEach((e) => { | 				localStorage.theme.split(' ').forEach((e) => { | ||||||
| 					document.documentElement.classList.add(e); | 					document.documentElement.classList.add(e); | ||||||
| 				}); | 				}); | ||||||
|  | 			} else { | ||||||
|  | 				document.documentElement.classList.add('dark'); | ||||||
| 			} | 			} | ||||||
| 		</script> | 		</script> | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Timothy J. Baek
						Timothy J. Baek