invert color shades (#13940)

* invert color shades

* Fix input glow

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
This commit is contained in:
Ben Haynes
2022-06-16 17:26:18 -04:00
committed by GitHub
parent 37ec41794f
commit 42cb679fed
3 changed files with 19 additions and 17 deletions

View File

@@ -3,9 +3,7 @@ import { useUserStore } from '@/stores';
export function getTheme(): 'light' | 'dark' {
const userStore = useUserStore();
if (!userStore.currentUser) return 'light';
if (userStore.currentUser.theme === 'auto') {
if (!userStore.currentUser || !('theme' in userStore.currentUser) || userStore.currentUser.theme === 'auto') {
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
return 'dark';
}