Merge branch 'develop' into vue3
This commit is contained in:
@@ -217,6 +217,25 @@ store.watch(state => state.device.useBlurEffectForModal, v => {
|
||||
document.documentElement.style.setProperty('--modalBgFilter', v ? 'blur(4px)' : 'none');
|
||||
}, { immediate: true });
|
||||
|
||||
let reloadDialogShowing = false;
|
||||
stream.on('_disconnected_', async () => {
|
||||
if (store.state.device.serverDisconnectedBehavior === 'reload') {
|
||||
location.reload();
|
||||
} else if (store.state.device.serverDisconnectedBehavior === 'dialog') {
|
||||
if (reloadDialogShowing) return;
|
||||
reloadDialogShowing = true;
|
||||
const { canceled } = await app.dialog({
|
||||
type: 'warning',
|
||||
title: app.$t('disconnectedFromServer'),
|
||||
text: app.$t('reloadConfirm'),
|
||||
showCancelButton: true
|
||||
});
|
||||
reloadDialogShowing = false;
|
||||
if (!canceled) {
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
stream.on('emojiAdded', data => {
|
||||
// TODO
|
||||
@@ -337,6 +356,26 @@ if (store.getters.isSignedIn) {
|
||||
});
|
||||
});
|
||||
|
||||
main.on('readAllChannels', () => {
|
||||
store.dispatch('mergeMe', {
|
||||
hasUnreadChannel: false
|
||||
});
|
||||
});
|
||||
|
||||
main.on('unreadChannel', () => {
|
||||
store.dispatch('mergeMe', {
|
||||
hasUnreadChannel: true
|
||||
});
|
||||
|
||||
app.sound('channel');
|
||||
});
|
||||
|
||||
main.on('readAllAnnouncements', () => {
|
||||
store.dispatch('mergeMe', {
|
||||
hasUnreadAnnouncement: false
|
||||
});
|
||||
});
|
||||
|
||||
main.on('clientSettingUpdated', x => {
|
||||
store.commit('settings/set', {
|
||||
key: x.key,
|
||||
|
Reference in New Issue
Block a user