Compare commits
2 commits
develop
...
feat/dashb
Author | SHA1 | Date | |
---|---|---|---|
|
af8fb74032 | ||
|
4375b694c4 |
11 changed files with 118 additions and 74 deletions
|
@ -42,7 +42,6 @@ $resolve-button-width: 13.2rem;
|
||||||
margin-right: var(--space-normal);
|
margin-right: var(--space-normal);
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
|
|
||||||
|
|
||||||
.user--profile__meta {
|
.user--profile__meta {
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -54,7 +53,6 @@ $resolve-button-width: 13.2rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.header-actions-wrap {
|
.header-actions-wrap {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -62,6 +60,10 @@ $resolve-button-width: 13.2rem;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
|
|
||||||
|
@include breakpoint(640px down) {
|
||||||
|
margin-top: var(--space-small);
|
||||||
|
}
|
||||||
|
|
||||||
&.has-open-sidebar {
|
&.has-open-sidebar {
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
}
|
}
|
||||||
|
|
|
@ -324,6 +324,7 @@
|
||||||
var(--space-one);
|
var(--space-one);
|
||||||
|
|
||||||
.is-text {
|
.is-text {
|
||||||
|
align-items: center;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
text-align: start;
|
text-align: start;
|
||||||
|
|
||||||
|
|
|
@ -794,16 +794,16 @@ export default {
|
||||||
|
|
||||||
.conversations-list-wrap {
|
.conversations-list-wrap {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
width: 34rem;
|
flex-basis: 34rem;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@include breakpoint(large up) {
|
@include breakpoint(large up) {
|
||||||
width: 36rem;
|
flex-basis: 36rem;
|
||||||
}
|
}
|
||||||
@include breakpoint(xlarge up) {
|
@include breakpoint(xlarge up) {
|
||||||
width: 35rem;
|
flex-basis: 38rem;
|
||||||
}
|
}
|
||||||
@include breakpoint(xxlarge up) {
|
@include breakpoint(xxlarge up) {
|
||||||
width: 38rem;
|
flex-basis: 42rem;
|
||||||
}
|
}
|
||||||
@include breakpoint(xxxlarge up) {
|
@include breakpoint(xxxlarge up) {
|
||||||
flex-basis: 46rem;
|
flex-basis: 46rem;
|
||||||
|
@ -814,10 +814,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
&.list--full-width {
|
&.list--full-width {
|
||||||
width: 100%;
|
flex-basis: 100%;
|
||||||
@include breakpoint(xxxlarge up) {
|
|
||||||
flex-basis: 100%;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.filter--actions {
|
.filter--actions {
|
||||||
|
|
|
@ -233,9 +233,6 @@ export default {
|
||||||
width: 40rem;
|
width: 40rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.off-canvas-content.is-open-left {
|
|
||||||
transform: translateX(18.8rem);
|
|
||||||
}
|
|
||||||
|
|
||||||
.secondary-sidebar {
|
.secondary-sidebar {
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
|
|
@ -376,6 +376,10 @@ export default {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
|
.ProseMirror-menubar {
|
||||||
|
min-height: var(--space-two) !important;
|
||||||
|
}
|
||||||
|
|
||||||
> .ProseMirror {
|
> .ProseMirror {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
|
|
|
@ -166,11 +166,15 @@ export default {
|
||||||
.conversation-sidebar-wrap {
|
.conversation-sidebar-wrap {
|
||||||
height: auto;
|
height: auto;
|
||||||
flex: 0 0;
|
flex: 0 0;
|
||||||
overflow: hidden;
|
z-index: var(--z-index-low);
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
background: white;
|
background: white;
|
||||||
flex-basis: 28rem;
|
flex-basis: 28rem;
|
||||||
|
|
||||||
|
@include breakpoint(768px down) {
|
||||||
|
flex-basis: fit-content;
|
||||||
|
}
|
||||||
|
|
||||||
@include breakpoint(large up) {
|
@include breakpoint(large up) {
|
||||||
flex-basis: 30em;
|
flex-basis: 30em;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,53 +1,55 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="conv-header">
|
<div class="conv-header">
|
||||||
<div class="user">
|
<div class="conversation-header--details">
|
||||||
<back-button v-if="showBackButton" :back-url="backButtonUrl" />
|
<div class="user">
|
||||||
<Thumbnail
|
<back-button v-if="showBackButton" :back-url="backButtonUrl" />
|
||||||
:src="currentContact.thumbnail"
|
<Thumbnail
|
||||||
size="40px"
|
:src="currentContact.thumbnail"
|
||||||
:badge="inboxBadge"
|
size="40px"
|
||||||
:username="currentContact.name"
|
:badge="inboxBadge"
|
||||||
:status="currentContact.availability_status"
|
:username="currentContact.name"
|
||||||
/>
|
:status="currentContact.availability_status"
|
||||||
<div class="user--profile__meta">
|
/>
|
||||||
<h3 class="user--name text-truncate">
|
<div class="user--profile__meta">
|
||||||
<span class="margin-right-smaller">{{ currentContact.name }}</span>
|
<h3 class="user--name text-truncate">
|
||||||
<fluent-icon
|
<span class="margin-right-smaller">{{ currentContact.name }}</span>
|
||||||
v-if="!isHMACVerified"
|
<fluent-icon
|
||||||
v-tooltip="$t('CONVERSATION.UNVERIFIED_SESSION')"
|
v-if="!isHMACVerified"
|
||||||
size="14"
|
v-tooltip="$t('CONVERSATION.UNVERIFIED_SESSION')"
|
||||||
class="hmac-warning__icon"
|
size="14"
|
||||||
icon="warning"
|
class="hmac-warning__icon"
|
||||||
/>
|
icon="warning"
|
||||||
</h3>
|
/>
|
||||||
<div class="conversation--header--actions">
|
</h3>
|
||||||
<inbox-name
|
<div class="conversation--header--actions text-truncate">
|
||||||
v-if="hasMultipleInboxes"
|
<inbox-name
|
||||||
:inbox="inbox"
|
v-if="hasMultipleInboxes"
|
||||||
class="margin-right-small"
|
:inbox="inbox"
|
||||||
/>
|
class="margin-right-small"
|
||||||
<span
|
/>
|
||||||
v-if="isSnoozed"
|
<span
|
||||||
class="snoozed--display-text margin-right-small"
|
v-if="isSnoozed"
|
||||||
>
|
class="snoozed--display-text margin-right-small"
|
||||||
{{ snoozedDisplayText }}
|
>
|
||||||
</span>
|
{{ snoozedDisplayText }}
|
||||||
<woot-button
|
</span>
|
||||||
class="user--profile__button margin-right-small"
|
<woot-button
|
||||||
size="small"
|
class="user--profile__button margin-right-small"
|
||||||
variant="link"
|
size="small"
|
||||||
@click="$emit('contact-panel-toggle')"
|
variant="link"
|
||||||
>
|
@click="$emit('contact-panel-toggle')"
|
||||||
{{ contactPanelToggleText }}
|
>
|
||||||
</woot-button>
|
{{ contactPanelToggleText }}
|
||||||
|
</woot-button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div
|
||||||
<div
|
class="header-actions-wrap"
|
||||||
class="header-actions-wrap"
|
:class="{ 'has-open-sidebar': isContactPanelOpen }"
|
||||||
:class="{ 'has-open-sidebar': isContactPanelOpen }"
|
>
|
||||||
>
|
<more-actions :conversation-id="currentChat.id" />
|
||||||
<more-actions :conversation-id="currentChat.id" />
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -165,14 +167,26 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.text-truncate {
|
@import '~dashboard/assets/scss/woot';
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
|
|
||||||
.conv-header {
|
.conv-header {
|
||||||
flex: 0 0 var(--space-jumbo);
|
flex: 0 0 var(--space-jumbo);
|
||||||
|
|
||||||
|
@include breakpoint(640px down) {
|
||||||
|
flex-direction: row;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.conversation-header--details {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
@include breakpoint(640px down) {
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.option__desc {
|
.option__desc {
|
||||||
|
|
|
@ -280,6 +280,7 @@ export default {
|
||||||
.message-text--metadata {
|
.message-text--metadata {
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
margin-left: var(--space-small);
|
||||||
|
|
||||||
.time {
|
.time {
|
||||||
margin-right: var(--space-small);
|
margin-right: var(--space-small);
|
||||||
|
|
|
@ -47,6 +47,7 @@ import AccountSelector from 'dashboard/components/layout/sidebarComponents/Accou
|
||||||
import AddLabelModal from 'dashboard/routes/dashboard/settings/labels/AddLabel';
|
import AddLabelModal from 'dashboard/routes/dashboard/settings/labels/AddLabel';
|
||||||
import NotificationPanel from 'dashboard/routes/dashboard/notifications/components/NotificationPanel';
|
import NotificationPanel from 'dashboard/routes/dashboard/notifications/components/NotificationPanel';
|
||||||
import uiSettingsMixin from 'dashboard/mixins/uiSettings';
|
import uiSettingsMixin from 'dashboard/mixins/uiSettings';
|
||||||
|
import wootConstants from 'dashboard/constants';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
@ -67,6 +68,7 @@ export default {
|
||||||
showAddLabelModal: false,
|
showAddLabelModal: false,
|
||||||
showShortcutModal: false,
|
showShortcutModal: false,
|
||||||
isNotificationPanel: false,
|
isNotificationPanel: false,
|
||||||
|
isDesktopView: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -77,14 +79,40 @@ export default {
|
||||||
const { show_secondary_sidebar: showSecondarySidebar } = this.uiSettings;
|
const { show_secondary_sidebar: showSecondarySidebar } = this.uiSettings;
|
||||||
return showSecondarySidebar;
|
return showSecondarySidebar;
|
||||||
},
|
},
|
||||||
|
previouslyUsedDisplayType() {
|
||||||
|
const {
|
||||||
|
previously_used_conversation_display_type: conversationDisplayType,
|
||||||
|
} = this.uiSettings;
|
||||||
|
return conversationDisplayType;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
isDesktopView() {
|
||||||
|
const { LAYOUT_TYPES } = wootConstants;
|
||||||
|
this.updateUISettings({
|
||||||
|
conversation_display_type: !this.isDesktopView
|
||||||
|
? LAYOUT_TYPES.EXPANDED
|
||||||
|
: this.previouslyUsedDisplayType,
|
||||||
|
});
|
||||||
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
window.addEventListener('resize', this.handleResize);
|
||||||
|
this.handleResize();
|
||||||
bus.$on(BUS_EVENTS.TOGGLE_SIDEMENU, this.toggleSidebar);
|
bus.$on(BUS_EVENTS.TOGGLE_SIDEMENU, this.toggleSidebar);
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
bus.$off(BUS_EVENTS.TOGGLE_SIDEMENU, this.toggleSidebar);
|
bus.$off(BUS_EVENTS.TOGGLE_SIDEMENU, this.toggleSidebar);
|
||||||
|
window.removeEventListener('resize', this.handleResize);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleResize() {
|
||||||
|
if (window.innerWidth <= 992) {
|
||||||
|
this.isDesktopView = false;
|
||||||
|
} else {
|
||||||
|
this.isDesktopView = true;
|
||||||
|
}
|
||||||
|
},
|
||||||
toggleSidebar() {
|
toggleSidebar() {
|
||||||
this.updateUISettings({
|
this.updateUISettings({
|
||||||
show_secondary_sidebar: !this.isSidebarOpen,
|
show_secondary_sidebar: !this.isSidebarOpen,
|
||||||
|
|
|
@ -133,7 +133,10 @@ export default {
|
||||||
conversationDisplayType === LAYOUT_TYPES.CONDENSED
|
conversationDisplayType === LAYOUT_TYPES.CONDENSED
|
||||||
? LAYOUT_TYPES.EXPANDED
|
? LAYOUT_TYPES.EXPANDED
|
||||||
: LAYOUT_TYPES.CONDENSED;
|
: LAYOUT_TYPES.CONDENSED;
|
||||||
this.updateUISettings({ conversation_display_type: newViewType });
|
this.updateUISettings({
|
||||||
|
conversation_display_type: newViewType,
|
||||||
|
previously_used_conversation_display_type: newViewType,
|
||||||
|
});
|
||||||
},
|
},
|
||||||
fetchConversationIfUnavailable() {
|
fetchConversationIfUnavailable() {
|
||||||
if (!this.conversationId) {
|
if (!this.conversationId) {
|
||||||
|
|
|
@ -109,14 +109,7 @@ export default {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding: var(--space-small);
|
padding: var(--space-small);
|
||||||
|
position: unset;
|
||||||
@include breakpoint(xlarge down) {
|
|
||||||
position: absolute;
|
|
||||||
}
|
|
||||||
|
|
||||||
@include breakpoint(xlarge up) {
|
|
||||||
position: unset;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
|
Loading…
Reference in a new issue