mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2025-01-26 17:36:28 -07:00
複数タブで開いてるときに動作がおかしい問題を修正
This commit is contained in:
parent
797e4c439a
commit
bcc20eab9d
1 changed files with 8 additions and 0 deletions
|
@ -136,6 +136,14 @@ document.body.innerHTML = '<div id="app"></div>';
|
||||||
const os = new MiOS();
|
const os = new MiOS();
|
||||||
|
|
||||||
os.init(async () => {
|
os.init(async () => {
|
||||||
|
window.addEventListener('storage', e => {
|
||||||
|
if (e.key === 'vuex') {
|
||||||
|
os.store.replaceState(JSON.parse(localStorage['vuex']));
|
||||||
|
} else if (e.key === 'i') {
|
||||||
|
location.reload();
|
||||||
|
}
|
||||||
|
}, false)
|
||||||
|
|
||||||
if ('Notification' in window && os.store.getters.isSignedIn) {
|
if ('Notification' in window && os.store.getters.isSignedIn) {
|
||||||
// 許可を得ていなかったらリクエスト
|
// 許可を得ていなかったらリクエスト
|
||||||
if (Notification.permission === 'default') {
|
if (Notification.permission === 'default') {
|
||||||
|
|
Loading…
Reference in a new issue