mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-06 20:55:30 +02:00
* Fix up and improve oputil file-base stuff
* Specialize if user does not have upload ACS
This commit is contained in:
parent
1f879c8bfb
commit
a257a9ba4b
6 changed files with 49 additions and 19 deletions
|
@ -122,11 +122,14 @@ exports.getModule = class UploadModule extends MenuModule {
|
|||
}
|
||||
|
||||
getSaveState() {
|
||||
return {
|
||||
uploadType : this.uploadType,
|
||||
tempRecvDirectory : this.tempRecvDirectory,
|
||||
areaInfo : this.availAreas[ this.viewControllers.options.getView(MciViewIds.options.area).getData() ],
|
||||
};
|
||||
// if no areas, we're falling back due to lack of access/areas avail to upload to
|
||||
if(this.availAreas.length > 0) {
|
||||
return {
|
||||
uploadType : this.uploadType,
|
||||
tempRecvDirectory : this.tempRecvDirectory,
|
||||
areaInfo : this.availAreas[ this.viewControllers.options.getView(MciViewIds.options.area).getData() ],
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
restoreSavedState(savedState) {
|
||||
|
@ -143,6 +146,11 @@ exports.getModule = class UploadModule extends MenuModule {
|
|||
initSequence() {
|
||||
const self = this;
|
||||
|
||||
if(0 === this.availAreas.length) {
|
||||
//
|
||||
return this.gotoMenu(this.menuConfig.config.noUploadAreasAvailMenu || 'fileBaseNoUploadAreasAvail');
|
||||
}
|
||||
|
||||
async.series(
|
||||
[
|
||||
function before(callback) {
|
||||
|
@ -641,6 +649,8 @@ exports.getModule = class UploadModule extends MenuModule {
|
|||
const tagsView = self.viewControllers.fileDetails.getView(MciViewIds.fileDetails.tags);
|
||||
const yearView = self.viewControllers.fileDetails.getView(MciViewIds.fileDetails.estYear);
|
||||
|
||||
self.updateCustomViewTextsWithFilter('fileDetails', MciViewIds.fileDetails.customRangeStart, fileEntry);
|
||||
|
||||
tagsView.setText( Array.from(fileEntry.hashTags).join(',') ); // :TODO: optional 'hashTagsSep' like file list/browse
|
||||
yearView.setText(fileEntry.meta.est_release_year || '');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue