mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-27 11:53:09 +02:00
fix(client): Fix #6540
This commit is contained in:
parent
b6c3399abe
commit
9d3beb3174
1 changed files with 5 additions and 1 deletions
|
@ -103,9 +103,13 @@ document.body.innerHTML = '<div id="app"></div>';
|
||||||
|
|
||||||
const store = createStore();
|
const store = createStore();
|
||||||
|
|
||||||
|
// 他のタブと永続化されたstateを同期
|
||||||
window.addEventListener('storage', e => {
|
window.addEventListener('storage', e => {
|
||||||
if (e.key === 'vuex') {
|
if (e.key === 'vuex') {
|
||||||
store.replaceState(JSON.parse(localStorage['vuex']));
|
store.replaceState({
|
||||||
|
...store.state,
|
||||||
|
...JSON.parse(e.newValue)
|
||||||
|
});
|
||||||
} else if (e.key === 'i') {
|
} else if (e.key === 'i') {
|
||||||
location.reload();
|
location.reload();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue