mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 12:39:20 +03:00
Merge branch 'master' into addressbook
This commit is contained in:
commit
84c1fb5402
60 changed files with 574 additions and 629 deletions
|
|
@ -97,11 +97,8 @@ export class MessageModel extends AbstractModel {
|
|||
isImportant: () => MessagePriority.High === this.priority(),
|
||||
hasAttachments: () => this.attachments().hasVisible(),
|
||||
|
||||
isDeleted: () => this.flags().includes('\\deleted'),
|
||||
isUnseen: () => !this.flags().includes('\\seen') /* || this.flags().includes('\\unseen')*/,
|
||||
isUnseen: () => !this.flags().includes('\\seen'),
|
||||
isFlagged: () => this.flags().includes('\\flagged'),
|
||||
isAnswered: () => this.flags().includes('\\answered'),
|
||||
isForwarded: () => this.flags().includes('$forwarded'),
|
||||
isReadReceipt: () => this.flags().includes('$mdnsent')
|
||||
// isJunk: () => this.flags().includes('$junk') && !this.flags().includes('$nonjunk'),
|
||||
// isPhishing: () => this.flags().includes('$phishing')
|
||||
|
|
@ -291,13 +288,9 @@ export class MessageModel extends AbstractModel {
|
|||
let classes = [];
|
||||
forEachObjectEntry({
|
||||
deleted: this.deleted(),
|
||||
'deleted-mark': this.isDeleted(),
|
||||
selected: this.selected(),
|
||||
checked: this.checked(),
|
||||
flagged: this.isFlagged(),
|
||||
unseen: this.isUnseen(),
|
||||
answered: this.isAnswered(),
|
||||
forwarded: this.isForwarded(),
|
||||
focused: this.focused(),
|
||||
important: this.isImportant(),
|
||||
withAttachments: !!this.attachments().length,
|
||||
|
|
@ -306,9 +299,18 @@ 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));
|
||||
return classes.join(' ');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* https://datatracker.ietf.org/doc/html/rfc5788
|
||||
*/
|
||||
keywords() {
|
||||
return this.flags().filter(value => '\\' !== value[0]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {string}
|
||||
*/
|
||||
|
|
@ -567,19 +569,4 @@ export class MessageModel extends AbstractModel {
|
|||
return result.html || plainToHtml(this.plain());
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {string}
|
||||
*/
|
||||
flagHash() {
|
||||
return [
|
||||
this.deleted(),
|
||||
this.isDeleted(),
|
||||
this.isUnseen(),
|
||||
this.isFlagged(),
|
||||
this.isAnswered(),
|
||||
this.isForwarded(),
|
||||
this.isReadReceipt()
|
||||
].join(',');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -332,11 +332,7 @@ MessagelistUserStore.removeMessagesFromList = (
|
|||
? messageList.filter(item => item && uidForRemove.includes(pInt(item.uid)))
|
||||
: [];
|
||||
|
||||
messages.forEach(item => {
|
||||
if (item && item.isUnseen()) {
|
||||
++unseenCount;
|
||||
}
|
||||
});
|
||||
messages.forEach(item => item && item.isUnseen() && ++unseenCount);
|
||||
|
||||
if (fromFolder && !copy) {
|
||||
fromFolder.messageCountAll(
|
||||
|
|
|
|||
|
|
@ -19,10 +19,6 @@
|
|||
opacity: 0.6;
|
||||
}
|
||||
|
||||
&.checked {
|
||||
box-shadow: 0 0 0 1px rgba(0, 0, 255, 0.1), 0 1px 5px rgba(0, 0, 255, 0.2);
|
||||
}
|
||||
|
||||
.checkboxAttachment {
|
||||
bottom: 6px;
|
||||
cursor: pointer;
|
||||
|
|
|
|||
|
|
@ -216,7 +216,7 @@ html:not(rl-mobile) {
|
|||
margin-right:5px
|
||||
}
|
||||
|
||||
&.deleted-mark {
|
||||
&.flag-\\deleted {
|
||||
opacity: .7;
|
||||
.subjectParent {
|
||||
text-decoration: line-through;
|
||||
|
|
@ -228,7 +228,7 @@ html:not(rl-mobile) {
|
|||
}
|
||||
|
||||
.checkboxMessage {
|
||||
padding: 0 6px;
|
||||
margin: 0 6px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
|
|
@ -242,8 +242,6 @@ html:not(rl-mobile) {
|
|||
.attachmentParent {
|
||||
position: relative;
|
||||
margin: 2px 10px 0 5px;
|
||||
color: #666;
|
||||
text-shadow: 0 1px 0 #eee;
|
||||
}
|
||||
|
||||
.senderParent, .subjectParent {
|
||||
|
|
@ -340,15 +338,15 @@ html:not(rl-mobile) {
|
|||
.flagParent {
|
||||
padding: 0 10px 0 5px;
|
||||
}
|
||||
&.flagged .flagParent::after,
|
||||
&.flag-\\flagged .flagParent::after,
|
||||
&.hasFlaggedSubMessage .flagParent::after {
|
||||
color: orange;
|
||||
content: '★'; /*⚑*/
|
||||
}
|
||||
&:not(.flagged):not(.hasFlaggedSubMessage) .flagParent::after {
|
||||
&:not(.flag-\\flagged):not(.hasFlaggedSubMessage) .flagParent::after {
|
||||
content: '☆'; /*⚐*/
|
||||
}
|
||||
&:not(.flagged):not(.hasFlaggedSubMessage) .flagParent:not(:hover) {
|
||||
&:not(.flag-\\flagged):not(.hasFlaggedSubMessage) .flagParent:not(:hover) {
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
|
|
@ -392,7 +390,7 @@ html.rl-ctrl-key-pressed .messageListItem {
|
|||
|
||||
.checkboxMessage {
|
||||
line-height: 12px;
|
||||
margin: 10px 0 -5px;
|
||||
margin: 10px 6px -5px;
|
||||
}
|
||||
|
||||
.subjectParent {
|
||||
|
|
@ -444,3 +442,35 @@ 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; }
|
||||
|
|
|
|||
|
|
@ -42,13 +42,10 @@ html.rl-no-preview-pane {
|
|||
line-height: 70px;
|
||||
padding-top: 100px;
|
||||
color: #999;
|
||||
|
||||
.icon-mail {
|
||||
font-size: 100px;
|
||||
font-size: 50px;
|
||||
line-height: 90px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
}
|
||||
.b-message-view-checked-helper::after {
|
||||
content: ' ✉';
|
||||
font-family: snappymail;
|
||||
}
|
||||
|
||||
.b-message-view-desc {
|
||||
|
|
@ -303,14 +300,6 @@ html.rl-no-preview-pane {
|
|||
}
|
||||
}
|
||||
|
||||
&.unselectedAttachmentsError {
|
||||
.attachmentItem {
|
||||
box-shadow: 0 1px 4px red;
|
||||
box-shadow: 0 1px 5px rgba(255, 0, 0, 0.4);
|
||||
box-shadow: 0 0 0 1px rgba(255, 0, 0, 0.2), 0 1px 5px rgba(255, 0, 0, 0.3);
|
||||
}
|
||||
}
|
||||
|
||||
.controls-handle {
|
||||
position: absolute;
|
||||
bottom: 5px;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import { messagesDeleteHelper } from 'Common/Folders';
|
|||
import { serverRequest } from 'Common/Links';
|
||||
import { i18n, getNotification, getUploadErrorDescByCode, timestampToString } from 'Common/Translator';
|
||||
import { MessageFlagsCache, setFolderHash } from 'Common/Cache';
|
||||
import { Settings, SettingsGet, elementById, addShortcut } from 'Common/Globals';
|
||||
import { Settings, SettingsCapa, SettingsGet, elementById, addShortcut } from 'Common/Globals';
|
||||
//import { exitFullscreen, isFullscreen, toggleFullscreen } from 'Common/Fullscreen';
|
||||
|
||||
import { AppUserStore } from 'Stores/User/App';
|
||||
|
|
@ -236,6 +236,7 @@ export class ComposePopupView extends AbstractViewPopup {
|
|||
this.sLastFocusedField = 'to';
|
||||
|
||||
this.allowContacts = AppUserStore.allowContacts();
|
||||
this.allowIdentities = SettingsCapa('Identities');
|
||||
|
||||
this.bSkipNextHide = false;
|
||||
|
||||
|
|
|
|||
|
|
@ -571,21 +571,12 @@ export class MailMessageList extends AbstractViewRight {
|
|||
|
||||
seenMessagesFast(seen) {
|
||||
const checked = MessagelistUserStore.listCheckedOrSelected();
|
||||
if (checked.length) {
|
||||
if (undefined === seen) {
|
||||
const unseen = checked.filter(message => message.isUnseen());
|
||||
listAction(
|
||||
checked[0].folder,
|
||||
unseen.length ? MessageSetAction.SetSeen : MessageSetAction.UnsetSeen,
|
||||
checked
|
||||
);
|
||||
} else {
|
||||
listAction(
|
||||
checked[0].folder,
|
||||
seen ? MessageSetAction.SetSeen : MessageSetAction.UnsetSeen,
|
||||
checked
|
||||
);
|
||||
}
|
||||
if (checked.length && null != seen) {
|
||||
listAction(
|
||||
checked[0].folder,
|
||||
seen ? MessageSetAction.SetSeen : MessageSetAction.UnsetSeen,
|
||||
checked
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -123,9 +123,6 @@ export class MailMessageView extends AbstractViewRight {
|
|||
this.fullScreenMode = isFullscreen;
|
||||
this.toggleFullScreen = toggleFullscreen;
|
||||
|
||||
this.messageListOfThreadsLoading = ko.observable(false).extend({ rateLimit: 1 });
|
||||
this.highlightUnselectedAttachments = ko.observable(false).extend({ falseTimeout: 2000 });
|
||||
|
||||
this.downloadAsZipError = ko.observable(false).extend({ falseTimeout: 7000 });
|
||||
|
||||
this.messageDomFocused = ko.observable(false).extend({ rateLimit: 0 });
|
||||
|
|
@ -136,7 +133,10 @@ export class MailMessageView extends AbstractViewRight {
|
|||
this.addComputables({
|
||||
allowAttachmentControls: () => arrayLength(attachmentsActions) && SettingsCapa('AttachmentsActions'),
|
||||
|
||||
downloadAsZipAllowed: () => this.attachmentsActions.includes('zip') && this.allowAttachmentControls(),
|
||||
downloadAsZipAllowed: () => this.attachmentsActions.includes('zip')
|
||||
&& (currentMessage() ? currentMessage().attachments : [])
|
||||
.filter(item => item && !item.isLinked() && item.checked() && item.download)
|
||||
.length,
|
||||
|
||||
lastReplyAction: {
|
||||
read: this.lastReplyAction_,
|
||||
|
|
@ -538,8 +538,6 @@ export class MailMessageView extends AbstractViewRight {
|
|||
}
|
||||
})
|
||||
.catch(() => this.downloadAsZipError(true));
|
||||
} else {
|
||||
this.highlightUnselectedAttachments(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -566,20 +564,20 @@ export class MailMessageView extends AbstractViewRight {
|
|||
readReceipt() {
|
||||
let oMessage = currentMessage()
|
||||
if (oMessage.readReceipt()) {
|
||||
Remote.request('SendReadReceiptMessage', null, {
|
||||
Remote.request('SendReadReceiptMessage', iError => {
|
||||
if (!iError) {
|
||||
oMessage.flags.push('$mdnsent');
|
||||
// oMessage.flags.valueHasMutated();
|
||||
MessageFlagsCache.store(oMessage);
|
||||
MessagelistUserStore.reloadFlagsAndCachedMessage();
|
||||
}
|
||||
}, {
|
||||
MessageFolder: oMessage.folder,
|
||||
MessageUid: oMessage.uid,
|
||||
ReadReceipt: oMessage.readReceipt(),
|
||||
Subject: i18n('READ_RECEIPT/SUBJECT', { SUBJECT: oMessage.subject() }),
|
||||
Text: i18n('READ_RECEIPT/BODY', { 'READ-RECEIPT': AccountUserStore.email() })
|
||||
});
|
||||
|
||||
oMessage.flags.push('$mdnsent');
|
||||
// oMessage.flags.valueHasMutated();
|
||||
|
||||
MessageFlagsCache.store(oMessage);
|
||||
|
||||
MessagelistUserStore.reloadFlagsAndCachedMessage();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue