mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-01 19:48:08 +00:00
fix: Align delete message menu on twitter bubble correctly (#2591)
* fix: Aligns delete message menu on twitter bubble correctly * Fixes alignment issues
This commit is contained in:
committed by
GitHub
parent
38cce3c1c0
commit
efd6f735dc
@@ -43,16 +43,6 @@
|
||||
:source-id="data.source_id"
|
||||
/>
|
||||
</div>
|
||||
<context-menu
|
||||
v-if="isBubble"
|
||||
:is-open="showContextMenu"
|
||||
:show-copy="hasText"
|
||||
:menu-position="contextMenuPosition"
|
||||
@toggle="handleContextMenuClick"
|
||||
@delete="handleDelete"
|
||||
@copy="handleCopy"
|
||||
/>
|
||||
|
||||
<spinner v-if="isPending" size="tiny" />
|
||||
|
||||
<a
|
||||
@@ -72,6 +62,15 @@
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<context-menu
|
||||
v-if="isBubble"
|
||||
:is-open="showContextMenu"
|
||||
:show-copy="hasText"
|
||||
:menu-position="contextMenuPosition"
|
||||
@toggle="handleContextMenuClick"
|
||||
@delete="handleDelete"
|
||||
@copy="handleCopy"
|
||||
/>
|
||||
</li>
|
||||
</template>
|
||||
<script>
|
||||
@@ -169,11 +168,17 @@ export default {
|
||||
alignBubble() {
|
||||
const { message_type: messageType } = this.data;
|
||||
const isCentered = messageType === MESSAGE_TYPE.ACTIVITY;
|
||||
const isLeftAligned = messageType === MESSAGE_TYPE.INCOMING;
|
||||
const isRightAligned =
|
||||
messageType === MESSAGE_TYPE.OUTGOING ||
|
||||
messageType === MESSAGE_TYPE.TEMPLATE;
|
||||
|
||||
return {
|
||||
center: isCentered,
|
||||
left: !messageType,
|
||||
right: !!messageType,
|
||||
left: isLeftAligned,
|
||||
right: isRightAligned,
|
||||
'has-context-menu': this.showContextMenu,
|
||||
'has-tweet-menu': this.isATweet,
|
||||
};
|
||||
},
|
||||
readableTime() {
|
||||
@@ -350,22 +355,29 @@ export default {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.wrap {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
li.right .wrap {
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
|
||||
li.left,
|
||||
li.right {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
|
||||
&:hover .button--delete-message {
|
||||
visibility: visible;
|
||||
}
|
||||
}
|
||||
|
||||
li.left.has-tweet-menu .context-menu {
|
||||
margin-bottom: var(--space-medium);
|
||||
}
|
||||
|
||||
li.right .context-menu {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
li.right {
|
||||
flex-direction: row-reverse;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.has-context-menu {
|
||||
background: var(--color-background);
|
||||
.button--delete-message {
|
||||
|
||||
Reference in New Issue
Block a user