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
51f51b54de
commit
f7379c0562
8 changed files with 15 additions and 20 deletions
|
|
@ -94,6 +94,7 @@ function CloudCmdProto(DOM) {
|
|||
imgPosition = 'top';
|
||||
|
||||
Images.show.load(imgPosition, panel);
|
||||
|
||||
/* загружаем содержимое каталога */
|
||||
await ajaxLoad(addSlashToEnd(path), {
|
||||
refresh,
|
||||
|
|
@ -237,7 +238,7 @@ function CloudCmdProto(DOM) {
|
|||
|
||||
const dirPath = DOM.getCurrentDirPath();
|
||||
|
||||
Listeners = CloudCmd.Listeners;
|
||||
({Listeners} = CloudCmd);
|
||||
Listeners.init();
|
||||
|
||||
const panels = getPanels();
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ module.exports = (name, options, callback = options) => {
|
|||
|
||||
if (isArray) {
|
||||
remoteTmpls = module.remote;
|
||||
local = module.local;
|
||||
({local} = module);
|
||||
} else {
|
||||
remoteTmpls = [module.remote];
|
||||
local = [module.local];
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ module.exports.ajax = (params) => {
|
|||
if (!isArrayBuf && isObject || isArray)
|
||||
data = jonny.stringify(p.data);
|
||||
else
|
||||
data = p.data;
|
||||
({data} = p);
|
||||
|
||||
xhr.onreadystatechange = (event) => {
|
||||
const xhr = event.target;
|
||||
|
|
|
|||
|
|
@ -216,7 +216,7 @@ async function onPathElementClick(panel, event) {
|
|||
function copyPath(el) {
|
||||
clipboard
|
||||
.writeText(el
|
||||
.parentElement.title)
|
||||
.parentElement.title)
|
||||
.then(CloudCmd.log)
|
||||
.catch(CloudCmd.log);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -276,6 +276,7 @@ function download(type) {
|
|||
const path = DOM.getCurrentPath(file);
|
||||
|
||||
CloudCmd.log(`downloading file ${path}...`);
|
||||
|
||||
/*
|
||||
* if we send ajax request -
|
||||
* no need in hash so we escape #
|
||||
|
|
|
|||
|
|
@ -343,10 +343,13 @@ async function _processFiles(options, data) {
|
|||
let names = [];
|
||||
|
||||
if (data) {
|
||||
from = data.from;
|
||||
to = data.to;
|
||||
names = data.names;
|
||||
panel = Info.panel;
|
||||
({
|
||||
from,
|
||||
to,
|
||||
names,
|
||||
} = data);
|
||||
|
||||
({panel} = Info);
|
||||
} else {
|
||||
from = Info.dirPath;
|
||||
to = DOM.getNotCurrentDirPath();
|
||||
|
|
|
|||
|
|
@ -2,12 +2,7 @@
|
|||
|
||||
const fullstore = require('fullstore');
|
||||
|
||||
const {
|
||||
J,
|
||||
K,
|
||||
UP,
|
||||
DOWN,
|
||||
} = require('../../key/key.js');
|
||||
const {J, K, UP, DOWN} = require('../../key/key.js');
|
||||
|
||||
const store = fullstore(1);
|
||||
const isDigit = (a) => /^\d+$/.test(a);
|
||||
|
|
|
|||
|
|
@ -3,12 +3,7 @@
|
|||
const test = require('supertape');
|
||||
const navigate = require('./navigate');
|
||||
|
||||
const {
|
||||
UP,
|
||||
DOWN,
|
||||
J,
|
||||
K,
|
||||
} = require('../../key/key.js');
|
||||
const {UP, DOWN, J, K} = require('../../key/key.js');
|
||||
|
||||
test('cloudcmd: user-menu: navigate: DOWN', (t) => {
|
||||
const el = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue