chore: Improvements to utils to load article in widget (#7859)

This commit is contained in:
Nithin David Thomas
2023-09-05 21:37:51 +05:30
committed by GitHub
parent ce4cfee8bd
commit 9322112481
5 changed files with 41 additions and 3 deletions

View File

@@ -3,6 +3,12 @@ import { mapGetters } from 'vuex';
export default {
computed: {
...mapGetters({ darkMode: 'appConfig/darkMode' }),
prefersDarkMode() {
const isOSOnDarkMode =
this.darkMode === 'auto' &&
window.matchMedia('(prefers-color-scheme: dark)').matches;
return isOSOnDarkMode || this.darkMode === 'dark';
},
},
methods: {
$dm(light, dark) {