Sync color schemes across tabs

This commit is contained in:
root
2022-08-26 04:25:32 +05:30
parent 83382109d2
commit f9a4b313dc
+2
View File
@@ -113,6 +113,8 @@ function initializePrefEvents (store) {
window.addEventListener('storage', (storageEv) => {
if (storageEv.key === 'PREFERENCES') {
store.commit('prefs/replacePrefs', JSON.parse(storageEv.newValue))
} else if (storageEv.key === 'COLOR_SCHEME') {
store.commit('prefs/setColorScheme', JSON.parse(storageEv.newValue))
}
})
}