perf: 优化消息窗口

This commit is contained in:
kuaifan 2025-03-30 09:12:38 +08:00
parent a57740e14e
commit 8af33ea66a
4 changed files with 15 additions and 6 deletions

View File

@ -284,7 +284,7 @@ export default {
this.getDialogUser();
} else {
this.$store.dispatch("forgetDialog", {id: this.dialogId});
this.goForward({name: 'manage-messenger'});
this.$emit("on-close")
}
}).catch(({msg}) => {
reject(msg);

View File

@ -2800,7 +2800,6 @@ export default {
}).then(({msg}) => {
resolve(msg);
this.$store.dispatch("forgetDialog", {id: this.dialogId});
this.goForward({name: 'manage-messenger'});
}).catch(({msg}) => {
reject(msg);
});
@ -2823,7 +2822,6 @@ export default {
}).then(({msg}) => {
resolve(msg);
this.$store.dispatch("forgetDialog", {id: this.dialogId});
this.goForward({name: 'manage-messenger'});
}).catch(({msg}) => {
reject(msg);
});

View File

@ -3026,11 +3026,11 @@ export default {
*/
openDialog({state, dispatch}, dialog_id) {
return new Promise(async (resolve, reject) => {
let single_window = false
let single_window = $A.isSubElectron || (state.isModKey && $A.Electron)
let search_msg_id;
let dialog_msg_id;
if ($A.isJson(dialog_id)) {
single_window = (dialog_id.single || dialog_id.single_window) && $A.Electron;
single_window = single_window || (dialog_id.single && $A.Electron);
search_msg_id = dialog_id.search_msg_id;
dialog_msg_id = dialog_id.dialog_msg_id;
dialog_id = dialog_id.dialog_id;
@ -3051,7 +3051,7 @@ export default {
}
}
//
if (single_window || $A.isSubElectron) {
if (single_window) {
dispatch('openDialogNewWindow', dialog_id);
resolve()
return
@ -3139,6 +3139,9 @@ export default {
//
const ids = $A.isArray(data.id) ? data.id : [data.id];
ids.some(id => {
if ($A.isJson(id)) {
id = id.id
}
const index = state.cacheDialogs.findIndex(dialog => dialog.id == id);
if (index > -1) {
dispatch("forgetDialogMsg", {id: state.dialogMsgs.filter(item => item.dialog_id == data.id).map(item => item.id)})

View File

@ -142,6 +142,11 @@
margin-right: 14px;
opacity: 0.9;
height: 30px;
.ivu-checkbox-wrapper {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.ivu-checkbox-focus {
box-shadow: none;
}
@ -164,6 +169,9 @@
align-items: center;
justify-content: center;
cursor: pointer;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
&.start {
background-color: rgba($flow-status-start-color, 0.1);
border-color: rgba($flow-status-start-color, 0.1);