Merge branch 'develop'
This commit is contained in:
commit
a44b005f7c
2 changed files with 8 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "misskey",
|
"name": "misskey",
|
||||||
"author": "syuilo <syuilotan@yahoo.co.jp>",
|
"author": "syuilo <syuilotan@yahoo.co.jp>",
|
||||||
"version": "12.24.1",
|
"version": "12.24.2",
|
||||||
"codename": "indigo",
|
"codename": "indigo",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
|
@ -19,6 +19,7 @@ import Dialog from './components/dialog.vue';
|
||||||
import Menu from './components/menu.vue';
|
import Menu from './components/menu.vue';
|
||||||
import { router } from './router';
|
import { router } from './router';
|
||||||
import { applyTheme, lightTheme, builtinThemes } from './theme';
|
import { applyTheme, lightTheme, builtinThemes } from './theme';
|
||||||
|
import { isDeviceDarkmode } from './scripts/is-device-darkmode';
|
||||||
|
|
||||||
Vue.use(Vuex);
|
Vue.use(Vuex);
|
||||||
Vue.use(VueHotkey);
|
Vue.use(VueHotkey);
|
||||||
|
@ -144,11 +145,17 @@ os.init(async () => {
|
||||||
}
|
}
|
||||||
}, false)
|
}, false)
|
||||||
|
|
||||||
|
//#region Sync dark mode
|
||||||
|
if (os.store.state.device.syncDeviceDarkMode) {
|
||||||
|
os.store.commit('device/set', { key: 'darkMode', value: isDeviceDarkmode() });
|
||||||
|
}
|
||||||
|
|
||||||
window.matchMedia('(prefers-color-scheme: dark)').addListener(mql => {
|
window.matchMedia('(prefers-color-scheme: dark)').addListener(mql => {
|
||||||
if (os.store.state.device.syncDeviceDarkMode) {
|
if (os.store.state.device.syncDeviceDarkMode) {
|
||||||
os.store.commit('device/set', { key: 'darkMode', value: mql.matches });
|
os.store.commit('device/set', { key: 'darkMode', value: mql.matches });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
//#endregion
|
||||||
|
|
||||||
if ('Notification' in window && os.store.getters.isSignedIn) {
|
if ('Notification' in window && os.store.getters.isSignedIn) {
|
||||||
// 許可を得ていなかったらリクエスト
|
// 許可を得ていなかったらリクエスト
|
||||||
|
|
Loading…
Reference in a new issue