merge unison-reload

This commit is contained in:
tamaina
2021-02-14 23:11:05 +09:00
12 changed files with 89 additions and 12 deletions

View File

@@ -65,6 +65,7 @@ import { makeHotkey } from './scripts/hotkey';
import { search } from './scripts/search';
import { getThemes } from './theme-store';
import { initializeSw } from './scripts/initialize-sw';
import { reloadChannel } from './scripts/unison-reload';
console.info(`Misskey v${version}`);
@@ -112,6 +113,9 @@ if (defaultStore.state.reportError && !_DEV_) {
// タッチデバイスでCSSの:hoverを機能させる
document.addEventListener('touchend', () => {}, { passive: true });
// 一斉リロード
reloadChannel.addEventListener('message', () => location.reload());
//#region SEE: https://css-tricks.com/the-trick-to-viewport-units-on-mobile/
// TODO: いつの日にか消したい
const vh = window.innerHeight * 0.01;