mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Improved message flags/keywords handling for #419
This commit is contained in:
parent
a073e7f308
commit
855e2c61c5
41 changed files with 451 additions and 82 deletions
|
|
@ -99,9 +99,15 @@ export class MessageModel extends AbstractModel {
|
|||
|
||||
isUnseen: () => !this.flags().includes('\\seen'),
|
||||
isFlagged: () => this.flags().includes('\\flagged'),
|
||||
isReadReceipt: () => this.flags().includes('$mdnsent')
|
||||
isReadReceipt: () => this.flags().includes('$mdnsent'),
|
||||
// isJunk: () => this.flags().includes('$junk') && !this.flags().includes('$nonjunk'),
|
||||
// isPhishing: () => this.flags().includes('$phishing')
|
||||
// isPhishing: () => this.flags().includes('$phishing'),
|
||||
|
||||
tags: () => this.flags().map(value =>
|
||||
('\\' == value[0] || '$forwarded' == value)
|
||||
? ''
|
||||
: '<span class="msgflag-'+value+'">' + i18n('MESSAGE_TAGS/'+value,0,value) + '</span>'
|
||||
).join(' ')
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -299,7 +305,7 @@ export class MessageModel extends AbstractModel {
|
|||
hasUnseenSubMessage: this.hasUnseenSubMessage(),
|
||||
hasFlaggedSubMessage: this.hasFlaggedSubMessage()
|
||||
}, (key, value) => value && classes.push(key));
|
||||
this.flags().forEach(value => classes.push('flag-'+value));
|
||||
this.flags().forEach(value => classes.push('msgflag-'+value));
|
||||
return classes.join(' ');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@
|
|||
@import "User/Identity.less";
|
||||
@import "User/AdvancedSearch.less";
|
||||
@import "User/Attachments.less";
|
||||
@import "User/MessageFlags.less";
|
||||
@import "User/MessageList.less";
|
||||
@import "User/MessageView.less";
|
||||
@import "User/Contacts.less";
|
||||
|
|
|
|||
26
dev/Styles/User/MessageFlags.less
Normal file
26
dev/Styles/User/MessageFlags.less
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
/* RFC8457 */
|
||||
.msgflag-\$important .checkboxMessage { background-color: #F00; color: #fff; }
|
||||
.msgflag-\$important.focused { background-color: rgba(255, 0, 0, 0.30); }
|
||||
.msgflag-\$important:not(.focused) { color: #F00; }
|
||||
|
||||
/* KMail tags */
|
||||
.msgflag-\$todo .checkboxMessage { background-color: #00F; color: #fff; }
|
||||
.msgflag-\$todo.focused { background-color: rgba( 64, 64, 255, 0.30); }
|
||||
.msgflag-\$todo:not(.focused) { color: #33F; }
|
||||
|
||||
/* Thunderbird labels */
|
||||
.msgflag-\$label5 .checkboxMessage { background-color: #808; color: #fff; }
|
||||
.msgflag-\$label4 .checkboxMessage { background-color: #00F; color: #fff; }
|
||||
.msgflag-\$label3 .checkboxMessage { background-color: #080; color: #fff; }
|
||||
.msgflag-\$label2 .checkboxMessage { background-color: #FA0; color: #fff; }
|
||||
.msgflag-\$label1 .checkboxMessage { background-color: #F00; color: #fff; }
|
||||
.msgflag-\$label5.focused { background-color: rgba(255, 0, 255, 0.30); }
|
||||
.msgflag-\$label4.focused { background-color: rgba( 64, 64, 255, 0.30); }
|
||||
.msgflag-\$label3.focused { background-color: rgba( 0, 255, 0, 0.30); }
|
||||
.msgflag-\$label2.focused { background-color: rgba(255, 170, 0, 0.30); }
|
||||
.msgflag-\$label1.focused { background-color: rgba(255, 0, 0, 0.30); }
|
||||
.msgflag-\$label5:not(.focused) { color: #939; }
|
||||
.msgflag-\$label4:not(.focused) { color: #33F; }
|
||||
.msgflag-\$label3:not(.focused) { color: #090; }
|
||||
.msgflag-\$label2:not(.focused) { color: #F90; }
|
||||
.msgflag-\$label1:not(.focused) { color: #F00; }
|
||||
|
|
@ -216,13 +216,6 @@ html:not(rl-mobile) {
|
|||
margin-right:5px
|
||||
}
|
||||
|
||||
&.flag-\\deleted {
|
||||
opacity: .7;
|
||||
.subjectParent {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
}
|
||||
|
||||
&.deleted {
|
||||
opacity: .3;
|
||||
}
|
||||
|
|
@ -341,14 +334,33 @@ html:not(rl-mobile) {
|
|||
.flagParent::after {
|
||||
content: '☆'; /*⚐*/
|
||||
}
|
||||
&.flag-\\flagged .flagParent::after,
|
||||
&.msgflag-\\flagged .flagParent::after,
|
||||
&.hasFlaggedSubMessage .flagParent::after {
|
||||
color: orange;
|
||||
content: '★'; /*⚑*/
|
||||
}
|
||||
&:not(.flag-\\flagged):not(.hasFlaggedSubMessage) .flagParent:not(:hover) {
|
||||
&:not(.msgflag-\\flagged):not(.hasFlaggedSubMessage) .flagParent:not(:hover) {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.senderParent::before {
|
||||
font-family: snappymail;
|
||||
}
|
||||
&.msgflag-\\answered .senderParent::before {
|
||||
content: '← ';
|
||||
}
|
||||
&.msgflag-\$forwarded .senderParent::before {
|
||||
content: '→ ';
|
||||
}
|
||||
&.msgflag-\\answered.msgflag-\$forwarded .senderParent::before {
|
||||
content: '←→ ';
|
||||
}
|
||||
&.msgflag-\\deleted {
|
||||
opacity: .7;
|
||||
.subjectParent {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
html.rl-ctrl-key-pressed .messageListItem {
|
||||
|
|
@ -442,35 +454,3 @@ html:not(.rl-mobile):not(.rl-side-preview-pane) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.senderParent::before {
|
||||
font-family: snappymail;
|
||||
}
|
||||
.flag-\\answered .senderParent::before {
|
||||
content: '← ';
|
||||
}
|
||||
.flag-\$forwarded .senderParent::before {
|
||||
content: '→ ';
|
||||
}
|
||||
.flag-\\answered.flag-\$forwarded .senderParent::before {
|
||||
content: '←→ ';
|
||||
}
|
||||
|
||||
/* Thunderbird labels */
|
||||
/*
|
||||
.flag-\$label5 .checkboxMessage { background-color: #808; }
|
||||
.flag-\$label4 .checkboxMessage { background-color: #00F; }
|
||||
.flag-\$label3 .checkboxMessage { background-color: #080; }
|
||||
.flag-\$label2 .checkboxMessage { background-color: #FA0; }
|
||||
.flag-\$label1 .checkboxMessage { background-color: #F00; }
|
||||
*/
|
||||
.messageListItem.flag-\$label5.focused { background-color: rgba(255, 0, 255, 0.30); }
|
||||
.messageListItem.flag-\$label4.focused { background-color: rgba( 64, 64, 255, 0.30); }
|
||||
.messageListItem.flag-\$label3.focused { background-color: rgba( 0, 255, 0, 0.30); }
|
||||
.messageListItem.flag-\$label2.focused { background-color: rgba(255, 170, 0, 0.30); }
|
||||
.messageListItem.flag-\$label1.focused { background-color: rgba(255, 0, 0, 0.30); }
|
||||
.messageListItem.flag-\$label5:not(.focused) { color: #939; }
|
||||
.messageListItem.flag-\$label4:not(.focused) { color: #33F; }
|
||||
.messageListItem.flag-\$label3:not(.focused) { color: #090; }
|
||||
.messageListItem.flag-\$label2:not(.focused) { color: #F90; }
|
||||
.messageListItem.flag-\$label1:not(.focused) { color: #F00; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue