mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-02 03:57:52 +00:00
feat: Add cmd/ctrl click open on the conversation cards (#7100)
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
}"
|
}"
|
||||||
@mouseenter="onCardHover"
|
@mouseenter="onCardHover"
|
||||||
@mouseleave="onCardLeave"
|
@mouseleave="onCardLeave"
|
||||||
@click="cardClick(chat)"
|
@click="onCardClick"
|
||||||
@contextmenu="openContextMenu($event)"
|
@contextmenu="openContextMenu($event)"
|
||||||
>
|
>
|
||||||
<label v-if="hovered || selected" class="checkbox-wrapper" @click.stop>
|
<label v-if="hovered || selected" class="checkbox-wrapper" @click.stop>
|
||||||
@@ -313,21 +313,33 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
cardClick(chat) {
|
onCardClick(e) {
|
||||||
const { activeInbox } = this;
|
const { activeInbox, chat } = this;
|
||||||
const path = conversationUrl({
|
const path = frontendURL(
|
||||||
accountId: this.accountId,
|
conversationUrl({
|
||||||
activeInbox,
|
accountId: this.accountId,
|
||||||
id: chat.id,
|
activeInbox,
|
||||||
label: this.activeLabel,
|
id: chat.id,
|
||||||
teamId: this.teamId,
|
label: this.activeLabel,
|
||||||
foldersId: this.foldersId,
|
teamId: this.teamId,
|
||||||
conversationType: this.conversationType,
|
foldersId: this.foldersId,
|
||||||
});
|
conversationType: this.conversationType,
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
if (e.metaKey || e.ctrlKey) {
|
||||||
|
window.open(
|
||||||
|
window.chatwootConfig.hostURL + path,
|
||||||
|
'_blank',
|
||||||
|
'noopener noreferrer nofollow'
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (this.isActiveChat) {
|
if (this.isActiveChat) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
router.push({ path: frontendURL(path) });
|
|
||||||
|
router.push({ path });
|
||||||
},
|
},
|
||||||
onCardHover() {
|
onCardHover() {
|
||||||
this.hovered = !this.hideThumbnail;
|
this.hovered = !this.hideThumbnail;
|
||||||
|
|||||||
Reference in New Issue
Block a user