Skip to content

Commit

Permalink
fixup! feat: add recipient info on the right side of the composer
Browse files Browse the repository at this point in the history
Signed-off-by: greta <[email protected]>
  • Loading branch information
GretaD committed Nov 6, 2024
1 parent 296f673 commit bde6da5
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/components/NewMessageModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ export default {
cookedComposerData: undefined,
changed: false,
largerModal: false,
isLargeScreen: window.innerWidth >= 1200,
recipient: {
name: '',
email: '',
Expand Down Expand Up @@ -221,7 +222,9 @@ export default {
return this.composerData?.smartReply ?? null
},
modalSize() {
return this.composerData.to && this.composerData.to.length > 0 ? 'full' : (this.largerModal ? 'large' : 'normal')
return this.isLargeScreen && this.composerData.to && this.composerData.to.length > 0
? 'full'
: (this.largerModal ? 'large' : 'normal')
},
},
created() {
Expand All @@ -235,11 +238,16 @@ export default {
await this.$nextTick()
this.updateCookedComposerData()
await this.openModalSize()
window.addEventListener('resize', this.checkScreenSize)
},
beforeDestroy() {
window.removeEventListener('beforeunload', this.onBeforeUnload)
window.removeEventListener('resize', this.checkScreenSize)
},
methods: {
checkScreenSize() {
this.isLargeScreen = window.innerWidth >= 1200
},
async openModalSize() {
try {
const sizePreference = this.$store.getters.getPreference('modalSize')
Expand Down Expand Up @@ -625,6 +633,9 @@ export default {
overflow-y: auto;
padding-left: 5px;
border-left: 1px solid #ccc;
@media (max-width: 1200px) {
display: none;
}
}
.modal-content.with-recipient .left-pane {
Expand Down

0 comments on commit bde6da5

Please sign in to comment.