mirror of
https://github.com/directus/directus.git
synced 2026-02-11 11:35:53 -05:00
invert color shades (#13940)
* invert color shades * Fix input glow Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
This commit is contained in:
@@ -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';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user