mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: fix message.FLAG_ALERT display
This commit is contained in:
1 parent
13c9e86bd9
commit
71f5f5d8fb
3 files changed
+24
-8
No files matched your search
@@ -8,7 +8,6 @@ import { i18n, tpl } from 'vj/utils';
|
||||
|
||||
const onmessage = (msg) => {
|
||||
console.log('Received message', msg);
|
||||
if (document.hidden) return false;
|
||||
if (msg.mdoc.flag & FLAG_ALERT) {
|
||||
// Is alert
|
||||
new InfoDialog({
|
||||
@@ -21,6 +20,7 @@ const onmessage = (msg) => {
|
||||
}).open();
|
||||
return true;
|
||||
}
|
||||
if (document.hidden) return false;
|
||||
// Is message
|
||||
new VjNotification({
|
||||
...(msg.udoc._id === 1 && msg.mdoc.flag & 4)
|
||||
|
||||
Reference in new issue
Block a user