perf: 优化操作提示

This commit is contained in:
jmal 2024-07-07 00:05:06 +08:00
parent c1b6b1b689
commit 186d6b6937

View File

@ -93,6 +93,18 @@ function handleFileChangeMessage(msg, url, body) {
store.dispatch('updateMessage', { event: 'msg/file/operation/fault', data: msg });
}
}
if (url === 'operationTips') {
const { operation, success, msg: message } = body
const notificationOptions = {
title: `${operation} ${success ? '成功' : '失败'}`,
dangerouslyUseHTMLString: true,
message: success ? '' : message ? `<span style="font-size: 12px;">${message}</span>` : '',
type: success ? 'success' : 'error',
}
Bus.notify(notificationOptions)
}
}
export function initiateSSE(username) {