mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-01 03:27:52 +00:00
chore: Refactor conversation info panel for RTL (#6526)
* chore: Refactor conversation info panel for RTL * chore: Adds comments * chore: Settings header icon fix * chore: Toggle layout switch * chore: Border fix in chat list
This commit is contained in:
@@ -80,8 +80,8 @@
|
|||||||
// Settings header
|
// Settings header
|
||||||
.settings-header {
|
.settings-header {
|
||||||
.header--icon {
|
.header--icon {
|
||||||
margin-left: 0;
|
margin-left: var(--space-small);
|
||||||
margin-right: var(--space-small);
|
margin-right: var(--space-smaller);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -246,8 +246,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-header--wrap .search--input {
|
.search-header--wrap {
|
||||||
text-align: right;
|
.search--input {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layout-switch__container {
|
||||||
|
transform: rotate(180deg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Card label
|
// Card label
|
||||||
|
|||||||
@@ -67,6 +67,7 @@
|
|||||||
|
|
||||||
.conversations-list-wrap {
|
.conversations-list-wrap {
|
||||||
@include flex;
|
@include flex;
|
||||||
|
border-right: 1px solid var(--s-50);
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
.load-more-conversations {
|
.load-more-conversations {
|
||||||
|
|||||||
@@ -66,7 +66,7 @@
|
|||||||
|
|
||||||
.header--icon {
|
.header--icon {
|
||||||
display: block;
|
display: block;
|
||||||
margin: 0 var(--space-normal);
|
margin: 0 var(--space-small) 0 var(--space-smaller);
|
||||||
|
|
||||||
@media screen and (max-width: 1200px) {
|
@media screen and (max-width: 1200px) {
|
||||||
display: none;
|
display: none;
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
<emoji-input
|
<emoji-input
|
||||||
v-if="showEmojiPicker"
|
v-if="showEmojiPicker"
|
||||||
v-on-clickaway="hideEmojiPicker"
|
v-on-clickaway="hideEmojiPicker"
|
||||||
:class="emojiDialogClassOnExpanedLayout"
|
:class="emojiDialogClassOnExpandedLayoutAndRTLView"
|
||||||
:on-click="emojiOnClick"
|
:on-click="emojiOnClick"
|
||||||
/>
|
/>
|
||||||
<reply-email-head
|
<reply-email-head
|
||||||
@@ -179,6 +179,7 @@ import { trimContent, debounce } from '@chatwoot/utils';
|
|||||||
import wootConstants from 'dashboard/constants';
|
import wootConstants from 'dashboard/constants';
|
||||||
import { isEditorHotKeyEnabled } from 'dashboard/mixins/uiSettings';
|
import { isEditorHotKeyEnabled } from 'dashboard/mixins/uiSettings';
|
||||||
import { CONVERSATION_EVENTS } from '../../../helper/AnalyticsHelper/events';
|
import { CONVERSATION_EVENTS } from '../../../helper/AnalyticsHelper/events';
|
||||||
|
import rtlMixin from 'shared/mixins/rtlMixin';
|
||||||
|
|
||||||
const EmojiInput = () => import('shared/components/emoji/EmojiInput');
|
const EmojiInput = () => import('shared/components/emoji/EmojiInput');
|
||||||
|
|
||||||
@@ -202,6 +203,7 @@ export default {
|
|||||||
uiSettingsMixin,
|
uiSettingsMixin,
|
||||||
alertMixin,
|
alertMixin,
|
||||||
messageFormatterMixin,
|
messageFormatterMixin,
|
||||||
|
rtlMixin,
|
||||||
],
|
],
|
||||||
props: {
|
props: {
|
||||||
selectedTweet: {
|
selectedTweet: {
|
||||||
@@ -422,10 +424,14 @@ export default {
|
|||||||
} = this.uiSettings;
|
} = this.uiSettings;
|
||||||
return conversationDisplayType !== CONDENSED;
|
return conversationDisplayType !== CONDENSED;
|
||||||
},
|
},
|
||||||
emojiDialogClassOnExpanedLayout() {
|
emojiDialogClassOnExpandedLayoutAndRTLView() {
|
||||||
return this.isOnExpandedLayout || this.popoutReplyBox
|
if (this.isOnExpandedLayout || this.popoutReplyBox) {
|
||||||
? 'emoji-dialog--expanded'
|
return 'emoji-dialog--expanded';
|
||||||
: '';
|
}
|
||||||
|
if (this.isRTLView) {
|
||||||
|
return 'emoji-dialog--rtl';
|
||||||
|
}
|
||||||
|
return '';
|
||||||
},
|
},
|
||||||
replyToUserLength() {
|
replyToUserLength() {
|
||||||
const selectedTweet = this.selectedTweet || {};
|
const selectedTweet = this.selectedTweet || {};
|
||||||
@@ -1098,7 +1104,7 @@ export default {
|
|||||||
|
|
||||||
.emoji-dialog {
|
.emoji-dialog {
|
||||||
top: unset;
|
top: unset;
|
||||||
bottom: var(--space-normal);
|
bottom: -40px;
|
||||||
left: -320px;
|
left: -320px;
|
||||||
right: unset;
|
right: unset;
|
||||||
|
|
||||||
@@ -1109,6 +1115,19 @@ export default {
|
|||||||
filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.08));
|
filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.08));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.emoji-dialog--rtl {
|
||||||
|
left: unset;
|
||||||
|
right: -320px;
|
||||||
|
&::before {
|
||||||
|
left: var(--space-minus-normal);
|
||||||
|
transform: rotate(90deg);
|
||||||
|
right: 0;
|
||||||
|
bottom: var(--space-small);
|
||||||
|
filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.08));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.emoji-dialog--expanded {
|
.emoji-dialog--expanded {
|
||||||
left: unset;
|
left: unset;
|
||||||
bottom: var(--space-jumbo);
|
bottom: var(--space-jumbo);
|
||||||
|
|||||||
@@ -184,9 +184,18 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
// For RTL direction view
|
||||||
|
.app-rtl--wrapper {
|
||||||
|
.bulk-action__actions {
|
||||||
|
::v-deep .button--only-icon:last-child {
|
||||||
|
margin-right: var(--space-smaller);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.bulk-action__container {
|
.bulk-action__container {
|
||||||
border-bottom: 1px solid var(--s-100);
|
border-bottom: 1px solid var(--s-100);
|
||||||
padding: var(--space-normal) var(--space-one);
|
padding: var(--space-normal);
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -195,7 +204,7 @@ export default {
|
|||||||
|
|
||||||
span {
|
span {
|
||||||
font-size: var(--font-size-mini);
|
font-size: var(--font-size-mini);
|
||||||
margin-left: var(--space-smaller);
|
margin: 0 var(--space-smaller);
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type='checkbox'] {
|
input[type='checkbox'] {
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ export default {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
margin-left: var(--space-small);
|
margin-left: var(--space-small);
|
||||||
|
margin-right: var(--space-small);
|
||||||
}
|
}
|
||||||
.option__body,
|
.option__body,
|
||||||
.option__title {
|
.option__title {
|
||||||
@@ -93,10 +94,6 @@ export default {
|
|||||||
color: var(--s-700);
|
color: var(--s-700);
|
||||||
}
|
}
|
||||||
|
|
||||||
.email-icon-wrap {
|
|
||||||
margin-right: var(--space-normal);
|
|
||||||
}
|
|
||||||
|
|
||||||
.option__user-data .option__body {
|
.option__user-data .option__body {
|
||||||
> .phone-icon-wrap,
|
> .phone-icon-wrap,
|
||||||
> .email-icon-wrap {
|
> .email-icon-wrap {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<div class="date-wrap">
|
<div class="date-wrap">
|
||||||
<span class="fw-medium"> {{ noteAuthorName }} </span>
|
<span class="fw-medium"> {{ noteAuthorName }} </span>
|
||||||
<span> {{ $t('NOTES.LIST.LABEL') }} </span>
|
<span> {{ $t('NOTES.LIST.LABEL') }} </span>
|
||||||
<span class="fw-medium"> {{ readableTime }} </span>
|
<span class="fw-medium time-stamp"> {{ readableTime }} </span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
@@ -105,6 +105,17 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
// For RTL direction view
|
||||||
|
.app-rtl--wrapper {
|
||||||
|
.note__content {
|
||||||
|
::v-deep {
|
||||||
|
p {
|
||||||
|
unicode-bidi: plaintext;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.note__content {
|
.note__content {
|
||||||
margin-top: var(--space-normal);
|
margin-top: var(--space-normal);
|
||||||
}
|
}
|
||||||
@@ -120,7 +131,7 @@ export default {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.date-wrap {
|
.date-wrap {
|
||||||
margin-left: var(--space-smaller);
|
margin: 0 var(--space-smaller);
|
||||||
padding: var(--space-micro);
|
padding: var(--space-micro);
|
||||||
color: var(--color-body);
|
color: var(--color-body);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,13 +3,13 @@
|
|||||||
class="small-12 medium-3 bg-white contact--panel"
|
class="small-12 medium-3 bg-white contact--panel"
|
||||||
:class="{ 'border-left': showAvatar }"
|
:class="{ 'border-left': showAvatar }"
|
||||||
>
|
>
|
||||||
<span v-if="showAvatar" class="close-button" @click="onClose">
|
|
||||||
<fluent-icon icon="dismiss" class="close-icon" />
|
|
||||||
</span>
|
|
||||||
<contact-info
|
<contact-info
|
||||||
|
:show-close-button="showCloseButton"
|
||||||
:show-avatar="showAvatar"
|
:show-avatar="showAvatar"
|
||||||
:contact="contact"
|
:contact="contact"
|
||||||
|
close-icon-name="dismiss"
|
||||||
@panel-close="onClose"
|
@panel-close="onClose"
|
||||||
|
@toggle-panel="onClose"
|
||||||
/>
|
/>
|
||||||
<draggable
|
<draggable
|
||||||
:list="contactSidebarItems"
|
:list="contactSidebarItems"
|
||||||
@@ -113,6 +113,10 @@ export default {
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true,
|
default: true,
|
||||||
},
|
},
|
||||||
|
showCloseButton: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -164,19 +168,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.close-button {
|
|
||||||
position: absolute;
|
|
||||||
right: var(--space-normal);
|
|
||||||
top: 3.6rem;
|
|
||||||
font-size: var(--font-size-big);
|
|
||||||
color: var(--s-500);
|
|
||||||
z-index: 1;
|
|
||||||
|
|
||||||
.close-icon {
|
|
||||||
margin-right: var(--space-smaller);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.conversation--details {
|
.conversation--details {
|
||||||
padding: 0 var(--space-normal);
|
padding: 0 var(--space-normal);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,11 @@
|
|||||||
class="overflow-hidden column contact--dashboard-content"
|
class="overflow-hidden column contact--dashboard-content"
|
||||||
>
|
>
|
||||||
<div class="row h-full">
|
<div class="row h-full">
|
||||||
<contact-info-panel :show-avatar="false" :contact="contact" />
|
<contact-info-panel
|
||||||
|
:show-close-button="false"
|
||||||
|
:show-avatar="false"
|
||||||
|
:contact="contact"
|
||||||
|
/>
|
||||||
<div class="small-12 medium-9 h-full">
|
<div class="small-12 medium-9 h-full">
|
||||||
<woot-tabs :index="selectedTabIndex" @change="onClickTabChange">
|
<woot-tabs :index="selectedTabIndex" @change="onClickTabChange">
|
||||||
<woot-tabs-item
|
<woot-tabs-item
|
||||||
|
|||||||
@@ -74,4 +74,11 @@ export default {
|
|||||||
margin-bottom: var(--space-normal);
|
margin-bottom: var(--space-normal);
|
||||||
color: var(--b-500);
|
color: var(--b-500);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
::v-deep .conversation {
|
||||||
|
padding-right: 0;
|
||||||
|
.conversation--details {
|
||||||
|
padding-left: var(--space-small);
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="medium-3 bg-white contact--panel">
|
<div class="medium-3 bg-white contact--panel">
|
||||||
<woot-button
|
<contact-info
|
||||||
icon="chevron-right"
|
:contact="contact"
|
||||||
class="close-button clear secondary"
|
:channel-type="channelType"
|
||||||
@click="onPanelToggle"
|
@toggle-panel="onPanelToggle"
|
||||||
/>
|
/>
|
||||||
<contact-info :contact="contact" :channel-type="channelType" />
|
|
||||||
<draggable
|
<draggable
|
||||||
:list="conversationSidebarItems"
|
:list="conversationSidebarItems"
|
||||||
:disabled="!dragEnabled"
|
:disabled="!dragEnabled"
|
||||||
@@ -295,15 +294,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.close-button {
|
|
||||||
position: absolute;
|
|
||||||
right: $space-two;
|
|
||||||
top: $space-slab;
|
|
||||||
font-size: $font-size-default;
|
|
||||||
color: $color-heading;
|
|
||||||
z-index: 9989;
|
|
||||||
}
|
|
||||||
|
|
||||||
.conversation--labels {
|
.conversation--labels {
|
||||||
padding: $space-medium;
|
padding: $space-medium;
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,21 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="contact--profile">
|
<div class="contact--profile">
|
||||||
<div class="contact--info">
|
<div class="contact--info">
|
||||||
<thumbnail
|
<div class="contact-info--header">
|
||||||
v-if="showAvatar"
|
<thumbnail
|
||||||
:src="contact.thumbnail"
|
v-if="showAvatar"
|
||||||
size="56px"
|
:src="contact.thumbnail"
|
||||||
:username="contact.name"
|
size="56px"
|
||||||
:status="contact.availability_status"
|
:username="contact.name"
|
||||||
/>
|
:status="contact.availability_status"
|
||||||
|
/>
|
||||||
|
<woot-button
|
||||||
|
v-if="showCloseButton"
|
||||||
|
:icon="closeIconName"
|
||||||
|
class="clear secondary close-button--rtl"
|
||||||
|
@click="onPanelToggle"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="contact--details">
|
<div class="contact--details">
|
||||||
<div v-if="showAvatar" class="contact--name-wrap">
|
<div v-if="showAvatar" class="contact--name-wrap">
|
||||||
@@ -194,6 +202,14 @@ export default {
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true,
|
default: true,
|
||||||
},
|
},
|
||||||
|
showCloseButton: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
|
closeIconName: {
|
||||||
|
type: String,
|
||||||
|
default: 'chevron-right',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -244,6 +260,9 @@ export default {
|
|||||||
toggleEditModal() {
|
toggleEditModal() {
|
||||||
this.showEditModal = !this.showEditModal;
|
this.showEditModal = !this.showEditModal;
|
||||||
},
|
},
|
||||||
|
onPanelToggle() {
|
||||||
|
this.$emit('toggle-panel');
|
||||||
|
},
|
||||||
toggleConversationModal() {
|
toggleConversationModal() {
|
||||||
this.showConversationModal = !this.showConversationModal;
|
this.showConversationModal = !this.showConversationModal;
|
||||||
},
|
},
|
||||||
@@ -295,10 +314,6 @@ export default {
|
|||||||
position: relative;
|
position: relative;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
padding: var(--space-normal);
|
padding: var(--space-normal);
|
||||||
|
|
||||||
.user-thumbnail-box {
|
|
||||||
margin-right: var(--space-normal);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.contact--details {
|
.contact--details {
|
||||||
@@ -310,6 +325,12 @@ export default {
|
|||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.contact-info--header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
flex-direction: row;
|
||||||
|
}
|
||||||
|
|
||||||
.contact--name-wrap {
|
.contact--name-wrap {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -319,7 +340,7 @@ export default {
|
|||||||
.contact--name {
|
.contact--name {
|
||||||
text-transform: capitalize;
|
text-transform: capitalize;
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
margin: 0 var(--space-smaller) 0 0;
|
margin: 0 var(--space-smaller) 0 var(--space-smaller);
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: var(--color-body);
|
color: var(--color-body);
|
||||||
@@ -346,9 +367,10 @@ export default {
|
|||||||
margin-right: var(--space-small);
|
margin-right: var(--space-small);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.merege-summary--card {
|
.merge-summary--card {
|
||||||
padding: var(--space-normal);
|
padding: var(--space-normal);
|
||||||
}
|
}
|
||||||
|
|
||||||
.contact--bio {
|
.contact--bio {
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -335,7 +335,6 @@ export default {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
height: 3.9rem;
|
height: 3.9rem;
|
||||||
background: var(--color-background-light);
|
background: var(--color-background-light);
|
||||||
|
|
||||||
border: 1px solid var(--color-border);
|
border: 1px solid var(--color-border);
|
||||||
padding: var(--space-smaller) var(--space-small);
|
padding: var(--space-smaller) var(--space-small);
|
||||||
border-radius: var(--border-radius-small);
|
border-radius: var(--border-radius-small);
|
||||||
@@ -343,6 +342,7 @@ export default {
|
|||||||
.contact-name {
|
.contact-name {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
margin-left: var(--space-small);
|
margin-left: var(--space-small);
|
||||||
|
margin-right: var(--space-small);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -43,6 +43,8 @@ export default {
|
|||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.social--icons {
|
.social--icons {
|
||||||
|
align-items: flex-end;
|
||||||
|
display: flex;
|
||||||
margin: var(--space-small) 0 var(--space-smaller);
|
margin: var(--space-small) 0 var(--space-smaller);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user