mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-07-24 03:30:40 +02:00
* WIP on upload support - protocols, modules, etc.
* Ability for KeyEntryView to only show specific/allowed keys * Start moving/adding common methods to MenuModule vs boilerplate code * menuFlags: String|StringArray: flags for menus, e.g. new 'noHistory' flag to prevent appending to history/stack * New download stats/MCI codes * Ability to redirect input stream to [protocols] temporairly
This commit is contained in:
parent
6da7d557f9
commit
0a92eec5e8
21 changed files with 985 additions and 76 deletions
|
@ -12,6 +12,14 @@ module.exports = class DownloadQueue {
|
|||
}
|
||||
}
|
||||
|
||||
get items() {
|
||||
return this.client.user.downloadQueue;
|
||||
}
|
||||
|
||||
clear() {
|
||||
this.client.user.downloadQueue = [];
|
||||
}
|
||||
|
||||
toggle(fileEntry) {
|
||||
if(this.isQueued(fileEntry)) {
|
||||
this.client.user.downloadQueue = this.client.user.downloadQueue.filter(e => fileEntry.fileId !== e.fileId);
|
||||
|
@ -25,10 +33,19 @@ module.exports = class DownloadQueue {
|
|||
fileId : fileEntry.fileId,
|
||||
areaTag : fileEntry.areaTag,
|
||||
fileName : fileEntry.fileName,
|
||||
byteSize : fileEntry.meta.byteSize || 0,
|
||||
path : fileEntry.filePath,
|
||||
byteSize : fileEntry.meta.byte_size || 0,
|
||||
});
|
||||
}
|
||||
|
||||
removeItems(fileIds) {
|
||||
if(!Array.isArray(fileIds)) {
|
||||
fileIds = [ fileIds ];
|
||||
}
|
||||
|
||||
this.client.user.downloadQueue = this.client.user.downloadQueue.filter(e => ( -1 === fileIds.indexOf(e.fileId) ) );
|
||||
}
|
||||
|
||||
isQueued(entryOrId) {
|
||||
if(entryOrId instanceof FileEntry) {
|
||||
entryOrId = entryOrId.fileId;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue