Skip to content

Commit 470e39d

Browse files
fix: fullsize email content under 600px
Make the email content full screen wide, when screen < 600 px. And a few other fixes
1 parent 1055abb commit 470e39d

File tree

6 files changed

+56
-22
lines changed

6 files changed

+56
-22
lines changed

src/components/Message.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ export default {
206206
margin-inline-start: auto;
207207
}
208208
209-
@media (max-width: 500px) {
209+
@media (max-width: 600px) {
210210
margin-left: calc(var(--default-grid-baseline) * 3);
211211
margin-right: calc(var(--default-grid-baseline) * 3);
212212
}

src/components/MessageAttachments.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ export default {
279279
bottom:0;
280280
background: linear-gradient(0deg, var(--color-main-background), var(--color-main-background) 90%, rgba(255, 255, 255, 0));
281281
282-
@media (max-width: 500px) {
282+
@media (max-width: 600px) {
283283
padding: 10px 12px 10px 12px;
284284
}
285285
}

src/components/MessageHTMLBody.vue

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -176,24 +176,25 @@ export default {
176176
.html-message-body {
177177
margin : 2px calc(var(--default-grid-baseline) * 3) 0 calc(var(--default-grid-baseline) * 14);
178178
background-color: #FFFFFF;
179-
border-radius: 5px;
179+
border-radius: var(--border-radius-element);
180180
181-
@media (max-width: 500px) {
181+
@media (max-width: 600px) {
182182
margin-left: calc(var(--default-grid-baseline) * 3);
183183
margin-right: calc(var(--default-grid-baseline) * 3);
184184
}
185185
}
186186
187187
#mail-message-has-blocked-content {
188188
margin-inline-start: 10px;
189-
color: var(--color-text-maxcontrast) !important;
189+
color: #000000 !important;
190+
padding-top: 5px;
190191
}
191192
192193
#message-container {
193194
flex: 1;
194195
display: flex;
195196
background-color: #FFFFFF;
196-
border-radius: 5px;
197+
border-radius: var(--border-radius-element);
197198
198199
// TODO: collapse quoted text and remove inner scrollbar
199200
@media only screen {
@@ -212,7 +213,7 @@ export default {
212213
213214
.message-frame {
214215
width: 100%;
215-
border-radius: 5px;
216+
border-radius: var(--border-radius-element);
216217
}
217218
218219
:deep(.button-vue__icon) {

src/components/PhishingWarning.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,15 @@ export default {
6464
<style lang="scss" scoped>
6565
.phishing-warning {
6666
background-color:rgba(var(--color-warning-rgb), 0.2);
67-
border-radius: var(--border-radius);
67+
border-radius: var(--border-radius-element);
6868
text-align: start;
6969
padding: 8px;
7070
margin: calc(var(--default-grid-baseline) * 3);
7171
// To match the html message margin
7272
margin-inline-start: calc(var(--default-grid-baseline) * 14);
7373
&__title {
7474
display: flex;
75+
gap: 2px;
7576
}
7677
&__list {
7778
list-style-position: inside;
@@ -87,7 +88,7 @@ export default {
8788
}
8889
}
8990
90-
@media (max-width: 500px) {
91+
@media (max-width: 600px) {
9192
margin-inline-start: calc(var(--default-grid-baseline) * 3);
9293
}
9394
}

src/components/Thread.vue

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ export default {
236236
this.$nextTick(() => {
237237
const header = this.$el.querySelector('#mail-thread-header')
238238
if (header) {
239-
const offset = -header.offsetHeight + 52
239+
const offset = -header.offsetHeight + 51
240240
document.documentElement.style.setProperty('--mail-thread-header-offset', `${offset}px`)
241241
}
242242
})
@@ -619,7 +619,7 @@ export default {
619619
}
620620
}
621621
622-
@media only screen and (max-width: 500px) {
622+
@media only screen and (max-width: 1024px) {
623623
#mail-thread-header {
624624
position: sticky !important;
625625
top: var(--mail-thread-header-offset, -25px) !important;;
@@ -654,7 +654,7 @@ export default {
654654
}
655655
}
656656
}
657-
@media only screen and (max-width: 500px) {
657+
@media only screen and (max-width: 600px) {
658658
#mail-thread-header-fields {
659659
padding-inline-start: 48px;
660660
}
@@ -679,7 +679,7 @@ export default {
679679
margin: calc(var(--default-grid-baseline) * 2) calc(var(--default-grid-baseline) * 10) 0 calc(var(--default-grid-baseline) * 14);
680680
}
681681
682-
@media only screen and (max-width: 500px) {
682+
@media only screen and (max-width: 600px) {
683683
#mail-content {
684684
margin: calc(var(--default-grid-baseline) * 2) calc(var(--default-grid-baseline) * 3) 0 calc(var(--default-grid-baseline) * 3);
685685
}
@@ -729,9 +729,10 @@ export default {
729729
}
730730
731731
.avatar-more {
732-
display: inline;
732+
display: flex;
733733
background-color: var(--color-background-dark);
734734
border-radius: var(--border-radius-large);
735+
align-items: center;
735736
cursor: pointer;
736737
}
737738

src/components/ThreadEnvelope.vue

Lines changed: 39 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,11 @@ export default {
438438
const { envelope } = this.$refs
439439
const envelopeWidth = (envelope && envelope.clientWidth) || 250
440440
const spaceToFill = envelopeWidth - 500 + this.recomputeMenuSize
441+
442+
if (envelopeWidth < 400) {
443+
return 0
444+
}
445+
441446
return Math.floor(spaceToFill / 44)
442447
},
443448
account() {
@@ -998,7 +1003,6 @@ export default {
9981003
text-overflow: ellipsis;
9991004
overflow: hidden;
10001005
}
1001-
10021006
}
10031007
10041008
.right {
@@ -1182,6 +1186,39 @@ export default {
11821186
font-weight: bold;
11831187
}
11841188
1189+
.envelope__header {
1190+
display: flex;
1191+
align-items: center;
1192+
1193+
.left {
1194+
display: flex;
1195+
align-items: center;
1196+
min-width: 0; /* umožní textu správně zkrátit */
1197+
flex: 1 1 auto; /* roztáhne se co to jde */
1198+
gap: 8px; /* mezera mezi textem a unsubscribe */
1199+
}
1200+
1201+
.envelope__header__left__sender-subject-tags {
1202+
min-width: 0;
1203+
overflow: hidden;
1204+
text-overflow: ellipsis;
1205+
white-space: nowrap;
1206+
}
1207+
1208+
.envelope__header__left__unsubscribe {
1209+
flex-shrink: 0; /* aby se nikdy nezmenšovalo */
1210+
}
1211+
1212+
.right {
1213+
flex-shrink: 0;
1214+
margin-left: auto; /* drží se vpravo */
1215+
display: flex;
1216+
align-items: center;
1217+
gap: 4px;
1218+
}
1219+
}
1220+
1221+
11851222
.tag-group__label {
11861223
margin: 0 calc(var(--default-grid-baseline) * 2);
11871224
z-index: 2;
@@ -1226,11 +1263,5 @@ export default {
12261263
display: inline;
12271264
align-items: center;
12281265
}
1229-
@media only screen and (max-width: 400px) {
1230-
.sender {
1231-
text-overflow: ellipsis;
1232-
overflow: hidden;
1233-
width: 180px;
1234-
}
1235-
}
1266+
12361267
</style>

0 commit comments

Comments
 (0)