mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 20:49:20 +03:00
Add new "Move to folder" button
This commit is contained in:
parent
2c3881abc6
commit
f0e9d1a6d5
14 changed files with 312 additions and 182 deletions
|
|
@ -20,7 +20,8 @@ import {
|
|||
import {
|
||||
bMobileDevice,
|
||||
popupVisibility,
|
||||
leftPanelDisabled
|
||||
leftPanelDisabled,
|
||||
moveAction
|
||||
} from 'Common/Globals';
|
||||
|
||||
import {
|
||||
|
|
@ -76,6 +77,7 @@ class MessageListMailBoxUserView extends AbstractViewNext
|
|||
this.iGoToUpUpOrDownDownTimeout = 0;
|
||||
|
||||
this.mobile = !!Settings.appSettingsGet('mobile');
|
||||
this.newMoveToFolder = AppStore.newMoveToFolder;
|
||||
|
||||
this.allowReload = !!Settings.capa(Capa.Reload);
|
||||
this.allowSearch = !!Settings.capa(Capa.Search);
|
||||
|
|
@ -350,6 +352,30 @@ class MessageListMailBoxUserView extends AbstractViewNext
|
|||
@command(canBeMovedHelper)
|
||||
moveCommand() {} // eslint-disable-line no-empty-function
|
||||
|
||||
@command(canBeMovedHelper)
|
||||
moveNewCommand(vm, event) {
|
||||
if (this.newMoveToFolder() && this.mobileCheckedStateShow())
|
||||
{
|
||||
if (vm && event && event.preventDefault) {
|
||||
event.preventDefault();
|
||||
if (event.stopPropagation) {
|
||||
event.stopPropagation();
|
||||
}
|
||||
}
|
||||
|
||||
if (moveAction())
|
||||
{
|
||||
AppStore.focusedState(Focused.MessageList);
|
||||
moveAction(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
AppStore.focusedState(Focused.FolderList);
|
||||
moveAction(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
hideLeft(item, event) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
|
@ -869,7 +895,16 @@ class MessageListMailBoxUserView extends AbstractViewNext
|
|||
{
|
||||
// move
|
||||
key('m', KeyState.MessageList, () => {
|
||||
this.moveDropdownTrigger(true);
|
||||
|
||||
if (this.newMoveToFolder())
|
||||
{
|
||||
this.moveNewCommand();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.moveDropdownTrigger(true);
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue