mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
chore: lint
This commit is contained in:
parent
e99d084728
commit
af77eeed8d
14 changed files with 143 additions and 91 deletions
|
|
@ -173,6 +173,7 @@ module.exports.buildFromJSON = (params) => {
|
|||
Path(path);
|
||||
|
||||
fileTable += `${header}<ul data-name="js-files" class="files">`;
|
||||
|
||||
/* Если мы не в корне */
|
||||
if (path !== '/') {
|
||||
const dotDot = getDotDot(path);
|
||||
|
|
@ -203,43 +204,43 @@ module.exports.buildFromJSON = (params) => {
|
|||
|
||||
fileTable += files
|
||||
.filter(filterOutDotFiles({
|
||||
showDotFiles,
|
||||
}))
|
||||
showDotFiles,
|
||||
}))
|
||||
.map(updateField)
|
||||
.map((file) => {
|
||||
const name = encode(file.name);
|
||||
const link = prefix + FS + path + name;
|
||||
|
||||
const {
|
||||
type,
|
||||
mode,
|
||||
date,
|
||||
owner,
|
||||
size,
|
||||
} = file;
|
||||
|
||||
const linkResult = rendy(templateLink, {
|
||||
link,
|
||||
title: name,
|
||||
name,
|
||||
attribute: getAttribute(file.type),
|
||||
});
|
||||
|
||||
const dataName = getDataName(file.name);
|
||||
const attribute = `draggable="true" ${dataName}`;
|
||||
|
||||
return rendy(templateFile, {
|
||||
tag: 'li',
|
||||
attribute,
|
||||
className: '',
|
||||
type,
|
||||
name: linkResult,
|
||||
size,
|
||||
date,
|
||||
owner,
|
||||
mode,
|
||||
});
|
||||
})
|
||||
const name = encode(file.name);
|
||||
const link = prefix + FS + path + name;
|
||||
|
||||
const {
|
||||
type,
|
||||
mode,
|
||||
date,
|
||||
owner,
|
||||
size,
|
||||
} = file;
|
||||
|
||||
const linkResult = rendy(templateLink, {
|
||||
link,
|
||||
title: name,
|
||||
name,
|
||||
attribute: getAttribute(file.type),
|
||||
});
|
||||
|
||||
const dataName = getDataName(file.name);
|
||||
const attribute = `draggable="true" ${dataName}`;
|
||||
|
||||
return rendy(templateFile, {
|
||||
tag: 'li',
|
||||
attribute,
|
||||
className: '',
|
||||
type,
|
||||
name: linkResult,
|
||||
size,
|
||||
date,
|
||||
owner,
|
||||
mode,
|
||||
});
|
||||
})
|
||||
.join('');
|
||||
|
||||
fileTable += '</ul>';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue