Skip to content

Commit

Permalink
style(Envelope): temporarily disable oneline mode on small screen sizes
Browse files Browse the repository at this point in the history
Signed-off-by: Grigory Vodyanov <[email protected]>
  • Loading branch information
GVodyanov authored and GretaD committed Sep 2, 2024
1 parent 62f1cec commit 1d5cefa
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);

Check failure on line 483 in src/components/Envelope.vue

View workflow job for this annotation

GitHub Actions / NPM lint

Extra semicolon
},
computed: {

Check warning on line 485 in src/components/Envelope.vue

View workflow job for this annotation

GitHub Actions / NPM lint

The "computed" property should be above the "mounted" property on line 480
...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 1d5cefa

Please sign in to comment.