diff --git a/app/javascript/dashboard/components/widgets/conversation/ConversationCard.vue b/app/javascript/dashboard/components/widgets/conversation/ConversationCard.vue index 4574c68d1..5c41b59ee 100644 --- a/app/javascript/dashboard/components/widgets/conversation/ConversationCard.vue +++ b/app/javascript/dashboard/components/widgets/conversation/ConversationCard.vue @@ -51,7 +51,7 @@ @@ -427,7 +431,8 @@ export default { }); this.showExpandLabelButton = - footer.offsetWidth - 80 < labelsWrap.scrollWidth; + footer.offsetWidth - 24 < labelsWrap.scrollWidth; + if (!this.showExpandLabelButton) return; const labelsWrapWidth = footer.scrollWidth; let currentIndex = 0; @@ -436,7 +441,7 @@ export default { do { if (labelsWidth + 80 < labelsWrapWidth) { - labelsWidth += Array.from(labels)[currentIndex].offsetWidth + 24; + labelsWidth += Array.from(labels)[currentIndex].offsetWidth + 8; currentIndex += 1; } else { break; @@ -471,11 +476,12 @@ export default { let currentIndex = 0; let labelsWidth = 0; this.showExpandLabelButton = - footer.offsetWidth - 80 < labelsWrap.scrollWidth; + footer.offsetWidth - 24 < labelsWrap.scrollWidth; + if (!this.showExpandLabelButton) return; do { if (labelsWidth + 80 < labelsWrapWidth) { - labelsWidth += Array.from(labels)[currentIndex].offsetWidth + 24; + labelsWidth += Array.from(labels)[currentIndex].offsetWidth + 8; currentIndex += 1; } else { break; @@ -680,10 +686,7 @@ export default { .footer { display: flex; align-items: center; - - .label { - margin-bottom: var(--space-smaller); - } + margin-top: var(--space-smaller); .hidden { display: none; @@ -713,6 +716,10 @@ export default { .hidden { display: inline-flex; } + + .label { + margin-bottom: var(--space-smaller); + } } } diff --git a/app/javascript/dashboard/i18n/locale/en/conversation.json b/app/javascript/dashboard/i18n/locale/en/conversation.json index cf8cd42b2..54d22710c 100644 --- a/app/javascript/dashboard/i18n/locale/en/conversation.json +++ b/app/javascript/dashboard/i18n/locale/en/conversation.json @@ -156,7 +156,10 @@ }, "CARD": { "COPY_LINK": "Copy link", - "GOTO_INBOX": "Goto inbox" + "GOTO_INBOX": "Goto inbox", + "SHOW_LABELS": "Show labels", + "HIDE_LABELS": "Hide labels", + "AGENT_TOOLTIP": "Right click to change agent" }, "VIA_TOOLTIP": { "INSTAGRAM_DM": "Via instagram DM",