mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 20:49:20 +03:00
Added "copy to" action in menu's for #1559
This commit is contained in:
parent
0aa48a8dd4
commit
53a6f04f18
44 changed files with 77 additions and 14 deletions
|
|
@ -77,13 +77,14 @@ export class MailFolderList extends AbstractViewLeft {
|
|||
const folder = ko.dataFor(el);
|
||||
if (folder) {
|
||||
if (moveAction()) {
|
||||
moveAction(false);
|
||||
let messages = MessagelistUserStore.listCheckedOrSelectedUidsWithSubMails();
|
||||
const copy = event.ctrlKey || 2 === moveAction(),
|
||||
messages = MessagelistUserStore.listCheckedOrSelectedUidsWithSubMails();
|
||||
moveAction(0);
|
||||
messages.size && MessagelistUserStore.moveMessages(
|
||||
messages.folder,
|
||||
messages,
|
||||
folder.fullName,
|
||||
event.ctrlKey
|
||||
copy
|
||||
);
|
||||
} else {
|
||||
if (!SettingsUserStore.usePreviewPane()) {
|
||||
|
|
@ -160,7 +161,7 @@ export class MailFolderList extends AbstractViewLeft {
|
|||
// addShortcut('tab', 'shift', ScopeFolderList, () => {
|
||||
addShortcut('escape,tab,arrowright', '', ScopeFolderList, () => {
|
||||
AppUserStore.focusedState(ScopeMessageList);
|
||||
moveAction(false);
|
||||
moveAction(0);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -331,6 +331,7 @@ export class MailMessageList extends AbstractViewRight {
|
|||
spamCommand: canBeMovedHelper,
|
||||
notSpamCommand: canBeMovedHelper,
|
||||
moveCommand: canBeMovedHelper,
|
||||
copyCommand: canBeMovedHelper
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -415,18 +416,26 @@ export class MailMessageList extends AbstractViewRight {
|
|||
moveMessagesToFolderType(FolderType.Inbox);
|
||||
}
|
||||
|
||||
moveCommand(vm, event) {
|
||||
moveOrCopy(vm, event, mode) {
|
||||
if (canBeMovedHelper()) {
|
||||
if (vm && event?.preventDefault) {
|
||||
stopEvent(event);
|
||||
}
|
||||
|
||||
let b = moveAction();
|
||||
AppUserStore.focusedState(b ? ScopeMessageList : ScopeFolderList);
|
||||
moveAction(!b);
|
||||
let i = moveAction();
|
||||
AppUserStore.focusedState(i ? ScopeMessageList : ScopeFolderList);
|
||||
moveAction(i ? 0 : mode);
|
||||
}
|
||||
}
|
||||
|
||||
moveCommand(vm, event) {
|
||||
this.moveOrCopy(vm, event, 1);
|
||||
}
|
||||
|
||||
copyCommand(vm, event) {
|
||||
this.moveOrCopy(vm, event, 2);
|
||||
}
|
||||
|
||||
composeClick() {
|
||||
showMessageComposer();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -240,6 +240,7 @@ export class MailMessageView extends AbstractViewRight {
|
|||
decorateKoCommands(this, {
|
||||
editCommand: self => self.messageVisible(),
|
||||
moveCommand: self => self.messageVisible(),
|
||||
copyCommand: self => self.messageVisible(),
|
||||
goUpCommand: self => !self.messageListOrViewLoading(),
|
||||
goDownCommand: self => !self.messageListOrViewLoading()
|
||||
});
|
||||
|
|
@ -257,13 +258,21 @@ export class MailMessageView extends AbstractViewRight {
|
|||
currentMessage() && showMessageComposer([ComposeType.Draft, currentMessage()]);
|
||||
}
|
||||
|
||||
moveCommand(vm, event) {
|
||||
moveOrCopy(vm, event, mode) {
|
||||
if (vm && event?.preventDefault) {
|
||||
stopEvent(event);
|
||||
}
|
||||
this.actionsMenu().ddBtn.hide();
|
||||
AppUserStore.focusedState(ScopeFolderList);
|
||||
moveAction(true);
|
||||
moveAction(mode);
|
||||
}
|
||||
|
||||
moveCommand(vm, event) {
|
||||
this.moveOrCopy(vm, event, 1);
|
||||
}
|
||||
|
||||
copyCommand(vm, event) {
|
||||
this.moveOrCopy(vm, event, 2);
|
||||
}
|
||||
|
||||
setUnseen() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue