mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-07-22 02:35:56 +02:00
* Add FileBaseFilters
* Add HTTP(S) file web server with temp URLs * Get temp web d/l from file list * Add File area filter editor (all file area stuff will be rename to file "base" later) * Concept of "listening servers" vs "login servers" * Ability to get servers by their package name * New MCI: %FN: File Base active filter name * Some ES6 updates * VC resetInitialFocus() to set focus to explicit/detected initial focus field * Limit what is dumped out when logging form data
This commit is contained in:
parent
712cf512f0
commit
a7c0f2b7b0
22 changed files with 1233 additions and 286 deletions
|
@ -21,8 +21,9 @@ const iconv = require('iconv-lite');
|
|||
|
||||
exports.getAvailableFileAreas = getAvailableFileAreas;
|
||||
exports.getSortedAvailableFileAreas = getSortedAvailableFileAreas;
|
||||
exports.getDefaultFileAreaTag = getDefaultFileAreaTag;
|
||||
exports.getDefaultFileAreaTag = getDefaultFileAreaTag;
|
||||
exports.getFileAreaByTag = getFileAreaByTag;
|
||||
exports.getFileEntryPath = getFileEntryPath;
|
||||
exports.changeFileAreaWithOptions = changeFileAreaWithOptions;
|
||||
//exports.addOrUpdateFileEntry = addOrUpdateFileEntry;
|
||||
exports.scanFileAreaForChanges = scanFileAreaForChanges;
|
||||
|
@ -46,15 +47,7 @@ function getAvailableFileAreas(client, options) {
|
|||
}
|
||||
|
||||
function getSortedAvailableFileAreas(client, options) {
|
||||
const areas = _.map(getAvailableFileAreas(client, options), (v, k) => {
|
||||
const areaInfo = {
|
||||
areaTag : k,
|
||||
area : v
|
||||
};
|
||||
|
||||
return areaInfo;
|
||||
});
|
||||
|
||||
const areas = _.map(getAvailableFileAreas(client, options), v => v);
|
||||
sortAreasOrConfs(areas, 'area');
|
||||
return areas;
|
||||
}
|
||||
|
@ -124,6 +117,13 @@ function getAreaStorageDirectory(areaInfo) {
|
|||
return paths.join(Config.fileBase.areaStoragePrefix, areaInfo.storageDir || '');
|
||||
}
|
||||
|
||||
function getFileEntryPath(fileEntry) {
|
||||
const areaInfo = getFileAreaByTag(fileEntry.areaTag);
|
||||
if(areaInfo) {
|
||||
return paths.join(areaInfo.storageDirectory, fileEntry.fileName);
|
||||
}
|
||||
}
|
||||
|
||||
function getExistingFileEntriesBySha1(sha1, cb) {
|
||||
const entries = [];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue