mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 21:19:21 +03:00
Some tiny changes
This commit is contained in:
parent
219589b8ea
commit
c76823dc5f
8 changed files with 53 additions and 60 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { Notification } from 'Common/Enums';
|
||||
import { ClientSideKeyName } from 'Common/EnumsUser';
|
||||
import { ClientSideKeyNameLastSignMe } from 'Common/EnumsUser';
|
||||
import { SettingsGet, fireEvent } from 'Common/Globals';
|
||||
import { getNotification, translatorReload, convertLangName } from 'Common/Translator';
|
||||
|
||||
|
|
@ -14,7 +14,8 @@ import { AbstractViewLogin } from 'Knoin/AbstractViews';
|
|||
|
||||
import { LanguagesPopupView } from 'View/Popup/Languages';
|
||||
|
||||
const SignMeOff = 0,
|
||||
const
|
||||
SignMeOff = 0,
|
||||
SignMeOn = 1,
|
||||
SignMeUnused = 2;
|
||||
|
||||
|
|
@ -120,7 +121,7 @@ export class LoginUserView extends AbstractViewLogin {
|
|||
data
|
||||
);
|
||||
|
||||
Local.set(ClientSideKeyName.LastSignMe, this.signMe() ? '-1-' : '-0-');
|
||||
Local.set(ClientSideKeyNameLastSignMe, this.signMe() ? '-1-' : '-0-');
|
||||
}
|
||||
|
||||
return valid;
|
||||
|
|
@ -129,8 +130,7 @@ export class LoginUserView extends AbstractViewLogin {
|
|||
onBuild(dom) {
|
||||
super.onBuild(dom);
|
||||
|
||||
const signMeLocal = Local.get(ClientSideKeyName.LastSignMe),
|
||||
signMe = (SettingsGet('SignMe') || '').toLowerCase();
|
||||
const signMe = (SettingsGet('SignMe') || '').toLowerCase();
|
||||
|
||||
switch (signMe) {
|
||||
case 'defaultoff':
|
||||
|
|
@ -139,7 +139,7 @@ export class LoginUserView extends AbstractViewLogin {
|
|||
'defaulton' === signMe ? SignMeOn : SignMeOff
|
||||
);
|
||||
|
||||
switch (signMeLocal) {
|
||||
switch (Local.get(ClientSideKeyNameLastSignMe)) {
|
||||
case '-1-':
|
||||
this.signMeType(SignMeOn);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,9 @@ import { Scope } from 'Common/Enums';
|
|||
|
||||
import {
|
||||
ComposeType,
|
||||
ClientSideKeyName,
|
||||
ClientSideKeyNameLastReplyAction,
|
||||
ClientSideKeyNameMessageHeaderFullInfo,
|
||||
ClientSideKeyNameMessageAttachmentControls,
|
||||
FolderType,
|
||||
MessageSetAction
|
||||
} from 'Common/EnumsUser';
|
||||
|
|
@ -96,7 +98,7 @@ export class MailMessageView extends AbstractViewRight {
|
|||
showAttachmentControls: false,
|
||||
downloadAsZipLoading: false,
|
||||
lastReplyAction_: '',
|
||||
showFullInfo: '1' === Local.get(ClientSideKeyName.MessageHeaderFullInfo),
|
||||
showFullInfo: '1' === Local.get(ClientSideKeyNameMessageHeaderFullInfo),
|
||||
moreDropdownTrigger: false,
|
||||
|
||||
// viewer
|
||||
|
|
@ -124,7 +126,7 @@ export class MailMessageView extends AbstractViewRight {
|
|||
this.messageListOfThreadsLoading = ko.observable(false).extend({ rateLimit: 1 });
|
||||
this.highlightUnselectedAttachments = ko.observable(false).extend({ falseTimeout: 2000 });
|
||||
|
||||
this.showAttachmentControlsState = v => Local.set(ClientSideKeyName.MessageAttachmentControls, !!v);
|
||||
this.showAttachmentControlsState = v => Local.set(ClientSideKeyNameMessageAttachmentControls, !!v);
|
||||
|
||||
this.downloadAsZipError = ko.observable(false).extend({ falseTimeout: 7000 });
|
||||
|
||||
|
|
@ -183,14 +185,14 @@ export class MailMessageView extends AbstractViewRight {
|
|||
showAttachmentControls: v => currentMessage()
|
||||
&& currentMessage().attachments.forEach(item => item && item.checked(!!v)),
|
||||
|
||||
lastReplyAction_: value => Local.set(ClientSideKeyName.LastReplyAction, value),
|
||||
lastReplyAction_: value => Local.set(ClientSideKeyNameLastReplyAction, value),
|
||||
|
||||
message: message => {
|
||||
MessageUserStore.activeDom(null);
|
||||
|
||||
if (message) {
|
||||
this.showAttachmentControls(false);
|
||||
if (Local.get(ClientSideKeyName.MessageAttachmentControls)) {
|
||||
if (Local.get(ClientSideKeyNameMessageAttachmentControls)) {
|
||||
setTimeout(() => {
|
||||
this.showAttachmentControls(true);
|
||||
}, 50);
|
||||
|
|
@ -222,10 +224,10 @@ export class MailMessageView extends AbstractViewRight {
|
|||
}
|
||||
},
|
||||
|
||||
showFullInfo: value => Local.set(ClientSideKeyName.MessageHeaderFullInfo, value ? '1' : '0')
|
||||
showFullInfo: value => Local.set(ClientSideKeyNameMessageHeaderFullInfo, value ? '1' : '0')
|
||||
});
|
||||
|
||||
this.lastReplyAction(Local.get(ClientSideKeyName.LastReplyAction) || ComposeType.Reply);
|
||||
this.lastReplyAction(Local.get(ClientSideKeyNameLastReplyAction) || ComposeType.Reply);
|
||||
|
||||
// commands
|
||||
this.replyCommand = createCommandReplyHelper(ComposeType.Reply);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue