mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 19:49:20 +03:00
Resolve Add a "Move to" button inside message view #1295
This commit is contained in:
parent
eb802135a9
commit
77d2d099e2
3 changed files with 18 additions and 3 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import ko from 'ko';
|
||||
import { addObservablesTo, addComputablesTo, addSubscribablesTo } from 'External/ko';
|
||||
|
||||
import { ScopeMessageList, ScopeMessageView } from 'Common/Enums';
|
||||
import { ScopeFolderList, ScopeMessageList, ScopeMessageView } from 'Common/Enums';
|
||||
|
||||
import {
|
||||
ComposeType,
|
||||
|
|
@ -105,6 +105,8 @@ export class MailMessageView extends AbstractViewRight {
|
|||
showAttachmentControls: !!Local.get(ClientSideKeyNameMessageAttachmentControls),
|
||||
downloadAsZipLoading: false,
|
||||
showFullInfo: '1' === Local.get(ClientSideKeyNameMessageHeaderFullInfo),
|
||||
// bootstrap dropdown
|
||||
actionsMenu: null,
|
||||
// viewer
|
||||
viewFromShort: '',
|
||||
dkimData: ['none', '', '']
|
||||
|
|
@ -229,6 +231,7 @@ export class MailMessageView extends AbstractViewRight {
|
|||
|
||||
decorateKoCommands(this, {
|
||||
editCommand: self => self.messageVisibility(),
|
||||
moveCommand: self => self.messageVisibility(),
|
||||
goUpCommand: self => !self.messageListOrViewLoading(),
|
||||
goDownCommand: self => !self.messageListOrViewLoading()
|
||||
});
|
||||
|
|
@ -246,6 +249,15 @@ export class MailMessageView extends AbstractViewRight {
|
|||
currentMessage() && showMessageComposer([ComposeType.Draft, currentMessage()]);
|
||||
}
|
||||
|
||||
moveCommand(vm, event) {
|
||||
if (vm && event?.preventDefault) {
|
||||
stopEvent(event);
|
||||
}
|
||||
this.actionsMenu().ddBtn.hide();
|
||||
AppUserStore.focusedState(ScopeFolderList);
|
||||
moveAction(true);
|
||||
}
|
||||
|
||||
setUnseen() {
|
||||
setAction(MessageSetAction.UnsetSeen);
|
||||
currentMessage(null);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue