mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-07 21:25:34 +02:00
* Use more standard code paths & emit index events in ToggleMenuView
* Fix fetching areas & internal message attach area name * Use proper config in new MenuModule methods * More good progress on uploading
This commit is contained in:
parent
0a92eec5e8
commit
a45142f2fd
7 changed files with 205 additions and 45 deletions
|
@ -27,11 +27,18 @@ exports.getModule = class FileTransferProtocolSelectModule extends MenuModule {
|
|||
super(options);
|
||||
|
||||
this.config = this.menuConfig.config || {};
|
||||
|
||||
if(options.extraArgs) {
|
||||
if(options.extraArgs.direction) {
|
||||
this.config.direction = options.extraArgs.direction;
|
||||
}
|
||||
}
|
||||
|
||||
this.config.direction = this.config.direction || 'send';
|
||||
|
||||
this.loadAvailProtocols();
|
||||
|
||||
this.extraArgs = options.extraArgs;
|
||||
this.extraArgs = options.extraArgs;
|
||||
|
||||
if(_.has(options, 'lastMenuResult.sentFileIds')) {
|
||||
this.sentFileIds = options.lastMenuResult.sentFileIds;
|
||||
|
@ -50,9 +57,9 @@ exports.getModule = class FileTransferProtocolSelectModule extends MenuModule {
|
|||
};
|
||||
|
||||
if('send' === this.config.direction) {
|
||||
return this.gotoMenu(this.config.downloadFilesMenu || 'downloadFiles', modOpts, cb);
|
||||
return this.gotoMenu(this.config.downloadFilesMenu || 'sendFilesToUser', modOpts, cb);
|
||||
} else {
|
||||
return this.gotoMenu(this.config.uploadFilesMenu || 'uploadFiles', modOpts, cb);
|
||||
return this.gotoMenu(this.config.uploadFilesMenu || 'recvFilesFromUser', modOpts, cb);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue