chore: Improves styling for conversation header (#1167)
Co-authored-by: Pranav Raj S <pranav@thoughtwoot.com>
This commit is contained in:
parent
dfb533db8d
commit
9b23a11c5b
7 changed files with 77 additions and 39 deletions
|
@ -69,3 +69,11 @@ select {
|
||||||
border-top-left-radius: 0 !important;
|
border-top-left-radius: 0 !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.justify-space-between {
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.w-100 {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
@import '~dashboard/assets/scss/variables';
|
||||||
@import '~widget/assets/scss/mixins';
|
@import '~widget/assets/scss/mixins';
|
||||||
|
|
||||||
$spinner-before-border-color: rgba(255, 255, 255, 0.7);
|
$spinner-before-border-color: rgba(255, 255, 255, 0.7);
|
||||||
|
@ -235,12 +236,3 @@ $spinner-before-border-color: rgba(255, 255, 255, 0.7);
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.justify-space-between {
|
|
||||||
justify-content: space-between;
|
|
||||||
}
|
|
||||||
|
|
||||||
.w-100 {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
|
@ -41,6 +41,10 @@
|
||||||
@include flex;
|
@include flex;
|
||||||
@include flex-align($x: center, $y: middle);
|
@include flex-align($x: center, $y: middle);
|
||||||
|
|
||||||
|
&.hide {
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
.user--name {
|
.user--name {
|
||||||
@include margin(0);
|
@include margin(0);
|
||||||
font-size: $font-size-medium;
|
font-size: $font-size-medium;
|
||||||
|
@ -83,3 +87,15 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.header-actions-wrap {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-grow: 1;
|
||||||
|
justify-content: flex-end;
|
||||||
|
|
||||||
|
&.has-open-sidebar {
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="conv-header">
|
<div class="conv-header">
|
||||||
<div v-if="!isContactPanelOpen" class="user">
|
<div class="user" :class="{ hide: isContactPanelOpen }">
|
||||||
<Thumbnail
|
<Thumbnail
|
||||||
:src="currentContact.thumbnail"
|
:src="currentContact.thumbnail"
|
||||||
size="40px"
|
size="40px"
|
||||||
|
@ -25,8 +25,8 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="flex-container"
|
class="header-actions-wrap"
|
||||||
:class="{ 'justify-space-between w-100': isContactPanelOpen }"
|
:class="{ 'has-open-sidebar': isContactPanelOpen }"
|
||||||
>
|
>
|
||||||
<div class="multiselect-box ion-headphone">
|
<div class="multiselect-box ion-headphone">
|
||||||
<multiselect
|
<multiselect
|
||||||
|
|
|
@ -5,9 +5,8 @@
|
||||||
:status="currentChat.status"
|
:status="currentChat.status"
|
||||||
/>
|
/>
|
||||||
<woot-button
|
<woot-button
|
||||||
class="success more--button"
|
class="clear more--button"
|
||||||
icon="ion-more"
|
icon="ion-android-more-vertical"
|
||||||
:class="buttonClass"
|
|
||||||
@click="toggleConversationActions"
|
@click="toggleConversationActions"
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
|
@ -18,17 +17,15 @@
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
v-if="!currentChat.muted"
|
v-if="!currentChat.muted"
|
||||||
class="button small clear row nice alert small-6 action--button"
|
class="button small clear row alert small-6 action--button"
|
||||||
@click="mute"
|
@click="mute"
|
||||||
>
|
>
|
||||||
<i class="icon ion-volume-mute" />
|
|
||||||
<span>{{ $t('CONTACT_PANEL.MUTE_CONTACT') }}</span>
|
<span>{{ $t('CONTACT_PANEL.MUTE_CONTACT') }}</span>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
class="button small clear row nice small-6 action--button"
|
class="button small clear row small-6 action--button"
|
||||||
@click="toggleEmailActionsModal"
|
@click="toggleEmailActionsModal"
|
||||||
>
|
>
|
||||||
<i class="icon ion-ios-copy" />
|
|
||||||
{{ $t('CONTACT_PANEL.SEND_TRANSCRIPT') }}
|
{{ $t('CONTACT_PANEL.SEND_TRANSCRIPT') }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -46,7 +43,6 @@ import { mixin as clickaway } from 'vue-clickaway';
|
||||||
import alertMixin from 'shared/mixins/alertMixin';
|
import alertMixin from 'shared/mixins/alertMixin';
|
||||||
import EmailTranscriptModal from './EmailTranscriptModal';
|
import EmailTranscriptModal from './EmailTranscriptModal';
|
||||||
import ResolveAction from '../../buttons/ResolveAction';
|
import ResolveAction from '../../buttons/ResolveAction';
|
||||||
import wootConstants from '../../../constants';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
@ -64,12 +60,6 @@ export default {
|
||||||
...mapGetters({
|
...mapGetters({
|
||||||
currentChat: 'getSelectedChat',
|
currentChat: 'getSelectedChat',
|
||||||
}),
|
}),
|
||||||
|
|
||||||
buttonClass() {
|
|
||||||
return this.currentChat.status !== wootConstants.STATUS_TYPE.OPEN
|
|
||||||
? 'warning'
|
|
||||||
: 'success';
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
mute() {
|
mute() {
|
||||||
|
@ -91,11 +81,17 @@ export default {
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
@import '~dashboard/assets/scss/mixins';
|
||||||
|
|
||||||
.more--button {
|
.more--button {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-left: var(--space-smaller);
|
margin-left: var(--space-small);
|
||||||
padding: var(--space-small);
|
padding: var(--space-small);
|
||||||
|
|
||||||
|
&.clear.more--button {
|
||||||
|
color: var(--color-body);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.actions--container {
|
.actions--container {
|
||||||
|
@ -103,11 +99,25 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown-pane {
|
.dropdown-pane {
|
||||||
right: 0;
|
@include elegant-card;
|
||||||
|
@include border-light;
|
||||||
|
right: -12px;
|
||||||
top: 48px;
|
top: 48px;
|
||||||
border: 1px solid var(--s-100);
|
|
||||||
border-radius: var(--space-smaller);
|
|
||||||
width: auto;
|
width: auto;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
@include arrow(top, var(--color-border-light), 14px);
|
||||||
|
top: -14px;
|
||||||
|
position: absolute;
|
||||||
|
right: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
@include arrow(top, white, var(--space-slab));
|
||||||
|
top: -12px;
|
||||||
|
position: absolute;
|
||||||
|
right: var(--space-small);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown-pane--open {
|
.dropdown-pane--open {
|
||||||
|
@ -119,10 +129,11 @@ export default {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: var(--space-small) 0;
|
padding: var(--space-small) var(--space-smaller);
|
||||||
|
font-size: var(--font-size-small);
|
||||||
|
|
||||||
.icon {
|
.icon {
|
||||||
margin-right: var(--space-small);
|
margin-right: var(--space-smaller);
|
||||||
min-width: var(--space-normal);
|
min-width: var(--space-normal);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<div class="contact--info">
|
<div class="contact--info">
|
||||||
<thumbnail
|
<thumbnail
|
||||||
:src="contact.thumbnail"
|
:src="contact.thumbnail"
|
||||||
size="48px"
|
size="64px"
|
||||||
:badge="channelType"
|
:badge="channelType"
|
||||||
:username="contact.name"
|
:username="contact.name"
|
||||||
:status="contact.availability_status"
|
:status="contact.availability_status"
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
--s-800: #314155;
|
--s-800: #314155;
|
||||||
--s-900: #1F2D3D;
|
--s-900: #1F2D3D;
|
||||||
|
|
||||||
--b-50:#F8F9FE;
|
--b-50: #F8F9FE;
|
||||||
--b-100: #F2F3F7;
|
--b-100: #F2F3F7;
|
||||||
--b-200: #E9EAEF;
|
--b-200: #E9EAEF;
|
||||||
--b-300: #DADBDF;
|
--b-300: #DADBDF;
|
||||||
|
@ -66,4 +66,15 @@
|
||||||
--r-700: #DE1E27;
|
--r-700: #DE1E27;
|
||||||
--r-800: #D11320;
|
--r-800: #D11320;
|
||||||
--r-900: #C30011;
|
--r-900: #C30011;
|
||||||
|
|
||||||
|
// Common color aliases
|
||||||
|
--color-heading: #1f2d3d;
|
||||||
|
--color-body: #3c4858;
|
||||||
|
|
||||||
|
--color-border: #e0e6ed;
|
||||||
|
--color-border-light: #f0f4f5;
|
||||||
|
--color-border-dark: #cad0d4;
|
||||||
|
|
||||||
|
--color-background: #f4f6fb;
|
||||||
|
--color-background-light: #f9fafc;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue