nanka iroiro
This commit is contained in:
@@ -45,15 +45,17 @@ import { router } from '@/router';
|
||||
import { applyTheme } from '@/scripts/theme';
|
||||
import { isDeviceDarkmode } from '@/scripts/is-device-darkmode';
|
||||
import { i18n } from '@/i18n';
|
||||
import { stream, isMobile, dialog } from '@/os';
|
||||
import { stream, isMobile, dialog, post } from '@/os';
|
||||
import * as sound from '@/scripts/sound';
|
||||
import { $i, refreshAccount, login, updateAccount, signout } from '@/account';
|
||||
import { defaultStore, ColdDeviceStorage } from '@/store';
|
||||
import { fetchInstance, instance } from '@/instance';
|
||||
import { makeHotkey } from './scripts/hotkey';
|
||||
import { search } from './scripts/search';
|
||||
|
||||
console.info(`Misskey v${version}`);
|
||||
|
||||
window.clearTimeout(window.mkBootTimer);
|
||||
window.clearTimeout((window as any).mkBootTimer);
|
||||
|
||||
if (_DEV_) {
|
||||
console.warn('Development mode!!!');
|
||||
@@ -214,6 +216,16 @@ window.matchMedia('(prefers-color-scheme: dark)').addListener(mql => {
|
||||
});
|
||||
//#endregion
|
||||
|
||||
// shortcut
|
||||
document.addEventListener('keydown', makeHotkey({
|
||||
'd': () => {
|
||||
defaultStore.set('darkMode', !defaultStore.state.darkMode);
|
||||
},
|
||||
'p|n': post,
|
||||
's': search,
|
||||
//TODO: 'h|/': help
|
||||
}));
|
||||
|
||||
watch(defaultStore.reactiveState.useBlurEffectForModal, v => {
|
||||
document.documentElement.style.setProperty('--modalBgFilter', v ? 'blur(4px)' : 'none');
|
||||
}, { immediate: true });
|
||||
|
Reference in New Issue
Block a user