mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
chore: cloudcmd: actions: lint ☘️
This commit is contained in:
parent
9f52ed795d
commit
84c6935ae4
7 changed files with 73 additions and 72 deletions
|
|
@ -173,7 +173,6 @@ module.exports.buildFromJSON = (params) => {
|
|||
Path(path);
|
||||
|
||||
fileTable += `${header}<ul data-name="js-files" class="files">`;
|
||||
|
||||
/* Если мы не в корне */
|
||||
if (path !== '/') {
|
||||
const dotDot = getDotDot(path);
|
||||
|
|
@ -204,43 +203,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