Simplify message .priorityHigh

This commit is contained in:
the-djmaze 2022-09-12 23:13:04 +02:00
parent a3a4a057e5
commit 7dc4b283b3
5 changed files with 19 additions and 12 deletions

View file

@ -156,7 +156,6 @@ export class MessageModel extends AbstractModel {
this.addComputables({
attachmentIconClass: () => FileInfo.getAttachmentsIconClass(this.attachments()),
threadsLen: () => this.threads().length,
isImportant: () => MessagePriority.High === this.priority(),
hasAttachments: () => this.attachments().hasVisible(),
isUnseen: () => !this.flags().includes('\\seen'),
@ -370,7 +369,7 @@ export class MessageModel extends AbstractModel {
/**
* @return string
*/
lineAsCss() {
lineAsCss(flags=1) {
let classes = [];
forEachObjectEntry({
deleted: this.deleted(),
@ -378,13 +377,13 @@ export class MessageModel extends AbstractModel {
checked: this.checked(),
unseen: this.isUnseen(),
focused: this.focused(),
important: this.isImportant(),
priorityHigh: this.priority() === MessagePriority.High,
withAttachments: !!this.attachments().length,
// hasChildrenMessage: 1 < this.threadsLen(),
hasUnseenSubMessage: this.hasUnseenSubMessage(),
hasFlaggedSubMessage: this.hasFlaggedSubMessage()
}, (key, value) => value && classes.push(key));
this.flags().forEach(value => classes.push('msgflag-'+value));
flags && this.flags().forEach(value => classes.push('msgflag-'+value));
return classes.join(' ');
}

View file

@ -211,11 +211,10 @@ html:not(rl-mobile) {
border-left-color: #ccc;
}
.priorityHigh::before {
content: '!'; /*❗*/
&.priorityHigh .subjectParent::before {
content: '! '; /*❗*/
color: red;
font-weight: bolder;
margin-right: 5px;
}
&.deleted {

View file

@ -26,6 +26,12 @@ html.rl-no-preview-pane {
color: #fff;
}
.priorityHigh .subject::before {
content: '! '; /*❗*/
color: red;
font-weight: bolder;
}
.b-content {
height: 100%;
}
@ -79,7 +85,6 @@ html.rl-no-preview-pane {
.flagParent {
cursor: pointer;
margin: 0 0.25em;
.flagOn {
color: orange;
@ -106,6 +111,10 @@ html.rl-no-preview-pane {
padding: 10px;
flex-shrink: 0;
.fontastic + span {
margin-left: 0.25em;
}
.subjectParent {
display: flex;
font-size: 18px;
@ -118,6 +127,7 @@ html.rl-no-preview-pane {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin: 0 0.25em;
}
.subject:empty {
font-style: italic;