mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-01 05:29:20 +03:00
Replace babel command decorators with proper knockout command decorators
This commit is contained in:
parent
b6d8fa5b3f
commit
540b12ed26
27 changed files with 181 additions and 132 deletions
|
|
@ -9,7 +9,7 @@ import FolderStore from 'Stores/User/Folder';
|
|||
|
||||
import Remote from 'Remote/User/Fetch';
|
||||
|
||||
import { command } from 'Knoin/Knoin';
|
||||
import { decorateKoCommands } from 'Knoin/Knoin';
|
||||
import { AbstractViewPopup } from 'Knoin/AbstractViews';
|
||||
|
||||
class FolderCreatePopupView extends AbstractViewPopup {
|
||||
|
|
@ -40,9 +40,12 @@ class FolderCreatePopupView extends AbstractViewPopup {
|
|||
});
|
||||
|
||||
this.defaultOptionsAfterRender = defaultOptionsAfterRender;
|
||||
|
||||
decorateKoCommands(this, {
|
||||
createFolderCommand: self => self.simpleFolderNameValidation(self.folderName())
|
||||
});
|
||||
}
|
||||
|
||||
@command((self) => self.simpleFolderNameValidation(self.folderName()))
|
||||
createFolderCommand() {
|
||||
let parentFolderName = this.selectedParentValue();
|
||||
if (!parentFolderName && 1 < FolderStore.namespace.length) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue