()
| 25 | const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)"); |
| 26 | |
| 27 | const resolve = () => { |
| 28 | if (settings.theme === "system") { |
| 29 | return mediaQuery.matches ? "dark" : "light"; |
| 30 | } |
| 31 | return settings.theme; |
| 32 | }; |
| 33 | |
| 34 | const apply = () => { |
| 35 | const resolved = resolve(); |