* [perf bug #50934] click message to close.

This commit is contained in:
wangyidong
2024-06-18 10:01:16 +08:00
committed by 田淑杰
parent bab3e4da14
commit 60ac185a2b
3 changed files with 10 additions and 1 deletions
+1 -1
View File
@@ -70,7 +70,7 @@
.messagers > .messager-holder {max-width: 35%;}
.messager-notice, .score-notice {align-items: flex-start;}
.messager-notice > .icon-envelope-o, .score-notice > .icon-diamond {margin-top: 2px;}
.messager-notice > .alert-close {position: fixed; top: 10px; right: 30px; width: 20px; height: 20px;}
.messager-notice > .alert-close {position: fixed; top: 10px; right: 15px; width: 20px; height: 20px;}
.messager-notice .browser-message-content {color: rgba(30,168,254); max-height: calc(100vh - 14rem); overflow-y: auto;}
.messager-notice .browser-message-content > span {width: 94%; display: inline-block;}
.messager-notice .browser-message-content > a {color: rgba(49,60,82)}
+8
View File
@@ -953,6 +953,14 @@ window.browserNotify = function()
}, pollTime * 1000);
};
window.clickMessage = function(obj)
{
let $obj = $(obj);
let url = $obj.data('url');
openApp(url);
$(obj).closest('.alert.messager').find('.alert-close').trigger('click');
}
window.ping = function()
{
setInterval(function(){$.get($.createLink('misc', 'ping'));}, pollTime * 1000);
+1
View File
@@ -134,6 +134,7 @@ class message extends control
}
else
{
$messages = preg_replace("/<a href='([^\']+)'/", "<a data-url='$1' href='###' onclick='clickMessage(this)'", $messages);
echo html_entity_decode("<div class='browser-message-content'><span class='text-secondary-500'>{$messages}</span></div>");
}