Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Envelope): RTL support #10496

Merged
merged 1 commit into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/components/Envelope.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
:class="{ 'important-one-line': oneLineLayout, 'icon-important': !oneLineLayout }"
:data-starred="isImportant ? 'true' : 'false'"
@click.prevent="hasWriteAcl ? onToggleImportant() : false"
v-html="importantSvg" />

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

View workflow job for this annotation

GitHub Actions / NPM lint

'v-html' directive can lead to XSS attack
<JunkIcon v-if="data.flags.$junk"
:size="18"
class="app-content-list-item-star junk-icon-style"
Expand Down Expand Up @@ -70,14 +70,16 @@
<em>{{ t('mail', 'Draft: ') }}</em>
</span>
<span class="envelope__subtitle__subject"
:class="{'one-line': oneLineLayout }">
:class="{'one-line': oneLineLayout }"
dir="auto">
<span class="envelope__subtitle__subject__text" :class="{'one-line': oneLineLayout }">
{{ subjectForSubtitle }}
</span>
</span>
</div>
<div v-if="data.encrypted || data.previewText"
class="envelope__preview-text">
class="envelope__preview-text"
dir="auto">
{{ isEncrypted ? t('mail', 'Encrypted message') : data.previewText.trim() }}
</div>
</div>
Expand Down Expand Up @@ -475,7 +477,7 @@

window.addEventListener('resize', this.onWindowResize)
},
computed: {

Check warning on line 480 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 475
...mapGetters([
'isSnoozeDisabled',
]),
Expand Down
12 changes: 7 additions & 5 deletions src/components/EnvelopeSkeleton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,9 @@ export default {
.list-item-content__details,
.list-item-details__details {
white-space: nowrap;
margin: 0 auto 0 0;
margin-block: 0;
margin-inline-start: 0;
margin-inline-end: auto;
overflow: hidden;
text-overflow: ellipsis;
}
Expand Down Expand Up @@ -509,7 +511,7 @@ export default {
justify-content: start;
align-items: end;
white-space: nowrap;
margin-left: calc(var(--default-grid-baseline) * 2);
margin-inline-start: calc(var(--default-grid-baseline) * 2);
// to align details on top instead of in the center. The right way to do it would be to change the template, but that breaks one-line layout
margin-top: -22px;

Expand Down Expand Up @@ -562,7 +564,7 @@ export default {
&__name {
align-self: center;
min-width: 300px;
padding-right: calc(var(--default-grid-baseline) * 2);
padding-inline-end: calc(var(--default-grid-baseline) * 2);
}

&__inner {
Expand All @@ -580,7 +582,7 @@ export default {
align-items: unset;
justify-content: end;
margin-top: 0;
margin-left: 0;
margin-inline-start: 0;
}
}

Expand Down Expand Up @@ -613,7 +615,7 @@ export default {
display: flex;
flex: 1 0;
justify-content: space-between;
padding-left: 8px;
padding-inline-start: 8px;
min-width: 0;
&__main {
flex: 1 0;
Expand Down
Loading