Skip to content

Commit

Permalink
Envelope: temporarily disable oneline mode on small screen sizes (#10072
Browse files Browse the repository at this point in the history
)

style(Envelope): temporarily disable oneline mode on small screen sizes

Signed-off-by: Grigory Vodyanov <[email protected]>
  • Loading branch information
GVodyanov authored Sep 2, 2024
1 parent 2490ae8 commit cba9bed
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions src/components/Envelope.vue
Original file line number Diff line number Diff line change
Expand Up @@ -474,8 +474,14 @@ export default {
moreActionsOpen: false,
snoozeOptions: false,
customSnoozeDateTime: new Date(moment().add(2, 'hours').minute(0).second(0).valueOf()),
overwriteOneLineMobile: false,
}
},
mounted() {
this.onWindowResize()
window.addEventListener('resize', this.onWindowResize)
},
computed: {
...mapGetters([
'isSnoozeDisabled',
Expand All @@ -484,7 +490,7 @@ export default {
return messageDateTime(new Date(this.data.dateInt))
},
oneLineLayout() {
return this.$store.getters.getPreference('layout-mode', 'vertical-split') === 'no-split'
return this.overwriteOneLineMobile ? false : this.$store.getters.getPreference('layout-mode', 'vertical-split') === 'no-split'
},
hasMultipleRecipients() {
if (!this.account) {
Expand Down Expand Up @@ -876,6 +882,15 @@ export default {
setCustomSnooze() {
this.onSnooze(this.customSnoozeDateTime.valueOf())
},
onWindowResize() {
const widthOutput = window.innerWidth
if (widthOutput <= 700) {
this.overwriteOneLineMobile = true
} else {
this.overwriteOneLineMobile = false
}
},
},
}
</script>
Expand Down Expand Up @@ -1056,8 +1071,8 @@ export default {
}
}
.one-line.favorite-icon-style {
margin-bottom: 31px;
margin-left: 31px;
top: 3px;
left: 31px;
}
:deep(.svg svg) {
height: 16px;
Expand Down

0 comments on commit cba9bed

Please sign in to comment.