mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: update user setting appearance (#654)
This commit is contained in:
@ -140,3 +140,11 @@ export function absolutifyLink(rel: string): string {
|
||||
anchor.setAttribute("href", rel);
|
||||
return anchor.href;
|
||||
}
|
||||
|
||||
export function getSystemColorScheme() {
|
||||
if (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches) {
|
||||
return "dark";
|
||||
} else {
|
||||
return "light";
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user