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

Envelope: add message summaries #10389

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
19 changes: 16 additions & 3 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 @@ -78,6 +78,7 @@
</div>
<div v-if="data.encrypted || data.previewText"
class="envelope__preview-text">
<SparkleIcon :size="15" :title="t('mail', 'This summary was AI generated')"/>

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

View workflow job for this annotation

GitHub Actions / NPM lint

Expected a space before '/>', but not found
{{ isEncrypted ? t('mail', 'Encrypted message') : data.previewText.trim() }}
</div>
</div>
Expand Down Expand Up @@ -344,6 +345,7 @@
import AlertOctagonIcon from 'vue-material-design-icons/AlertOctagon.vue'
import Avatar from './Avatar.vue'
import IconCreateEvent from 'vue-material-design-icons/Calendar.vue'
import SparkleIcon from 'vue-material-design-icons/Creation.vue'
import ClockOutlineIcon from 'vue-material-design-icons/ClockOutline.vue'
import CheckIcon from 'vue-material-design-icons/Check.vue'
import ChevronLeft from 'vue-material-design-icons/ChevronLeft.vue'
Expand Down Expand Up @@ -414,6 +416,7 @@
PlusIcon,
TagIcon,
TagModal,
SparkleIcon,
Star,
StarOutline,
EmailRead,
Expand Down Expand Up @@ -484,7 +487,7 @@

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

Check warning on line 490 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 485
...mapGetters([
'isSnoozeDisabled',
]),
Expand Down Expand Up @@ -926,11 +929,21 @@
}
&__preview-text {
color: var(--color-text-maxcontrast);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-weight: initial;
flex: 1 1;
max-height: calc(var(--default-font-size) * var(--default-line-height) * 2);

/* Weird CSS hacks to make text ellipsize without white-space: nowrap */
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;

.material-design-icon {
display: inline;

position: relative;
top: 2px;
}
}
}

Expand Down
Loading