Merge pull request #217 from jamebal/recycle

perf: 优化操作提示
This commit is contained in:
jmal 2024-07-07 13:36:49 +08:00 committed by GitHub
commit d3565aacf1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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) {