完善会话草稿恢复与附件保留,统一人工服务时区

This commit is contained in:
2026-10-30 15:32:31 +08:00
parent 78797d8eca
commit b764fcb33c
20 changed files with 446 additions and 34 deletions
+12
View File
@@ -1,5 +1,17 @@
// Shared controls for the customer page and service workspace.
var SupportUI = {
initAttachments(container, label){
container.addEventListener('error', function(event){
const image = event.target;
if(!image || image.tagName !== 'IMG' || !image.classList.contains('message-image') || image.dataset.unavailable) return;
image.dataset.unavailable = '1';
image.hidden = true;
const hint = document.createElement('span');
hint.className = 'attachment-unavailable';
hint.textContent = typeof label === 'function' ? label() : label;
image.after(hint);
}, true);
},
async enableNotifications(button){
if(!('Notification' in window)) return;
try{