chore: lint

This commit is contained in:
coderiaser 2025-03-29 00:20:04 +02:00
parent 51f51b54de
commit f7379c0562
8 changed files with 15 additions and 20 deletions

View file

@ -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();

View file

@ -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];

View file

@ -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;

View file

@ -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);
}

View file

@ -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 #

View file

@ -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();

View file

@ -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);

View file

@ -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 = {