mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
chore(cloudcmd) lint
This commit is contained in:
parent
69c8eecaf1
commit
3ba6d4ae53
7 changed files with 10 additions and 20 deletions
1
.github/workflows/nodejs.yml
vendored
1
.github/workflows/nodejs.yml
vendored
|
|
@ -9,7 +9,6 @@ jobs:
|
|||
strategy:
|
||||
matrix:
|
||||
node-version:
|
||||
- 14.x
|
||||
- 16.x
|
||||
- 17.x
|
||||
steps:
|
||||
|
|
|
|||
|
|
@ -830,7 +830,6 @@ module.exports.updateCurrentInfo = (currentFile) => {
|
|||
info.isDir = DOM.isCurrentIsDir();
|
||||
info.isSelected = DOM.isSelected(current);
|
||||
info.panelPosition = DOM.getPanel().dataset.name.replace('js-', '');
|
||||
info.isOnePanel =
|
||||
info.panel.getAttribute('data-name') ===
|
||||
info.isOnePanel = info.panel.getAttribute('data-name') ===
|
||||
info.panelPassive.getAttribute('data-name');
|
||||
};
|
||||
|
|
|
|||
|
|
@ -228,8 +228,7 @@ function onAuthChange(checked) {
|
|||
const elUsername = input.getElementByName('username', Element);
|
||||
const elPassword = input.getElementByName('password', Element);
|
||||
|
||||
elUsername.disabled =
|
||||
elPassword.disabled = !checked;
|
||||
elUsername.disabled = elPassword.disabled = !checked;
|
||||
}
|
||||
|
||||
function onNameChange(name) {
|
||||
|
|
|
|||
|
|
@ -31,8 +31,7 @@ CloudCmd.sortPanel = (name, panel = getPanel()) => {
|
|||
order[position] = 'asc';
|
||||
}
|
||||
|
||||
sortPrevious =
|
||||
sort[position] = name;
|
||||
sortPrevious = sort[position] = name;
|
||||
|
||||
const noCurrent = position !== Info.panelPosition;
|
||||
|
||||
|
|
|
|||
|
|
@ -253,12 +253,7 @@ function getAttribute(type) {
|
|||
}
|
||||
|
||||
module.exports._getSize = getSize;
|
||||
function getSize(file) {
|
||||
const {
|
||||
size,
|
||||
type,
|
||||
} = file;
|
||||
|
||||
function getSize({size, type}) {
|
||||
if (type === 'directory')
|
||||
return '<dir>';
|
||||
|
||||
|
|
|
|||
|
|
@ -35,12 +35,12 @@ const logger = tryRequire('morgan');
|
|||
|
||||
module.exports = async (options, config) => {
|
||||
const prefix = config('prefix');
|
||||
const port = process.env.PORT || /* c9 */
|
||||
config('port');
|
||||
const port = process.env.PORT /* c9 */
|
||||
|| config('port');
|
||||
|
||||
const ip = process.env.IP || /* c9 */
|
||||
config('ip') ||
|
||||
'0.0.0.0';
|
||||
const ip = process.env.IP /* c9 */
|
||||
|| config('ip')
|
||||
|| '0.0.0.0';
|
||||
|
||||
const app = express();
|
||||
const server = http.createServer(app);
|
||||
|
|
|
|||
|
|
@ -52,8 +52,7 @@ const data = {
|
|||
}],
|
||||
};
|
||||
|
||||
let Expect =
|
||||
'<div data-name="js-path" class="reduce-text" title="/etc/X11/">' +
|
||||
let Expect = '<div data-name="js-path" class="reduce-text" title="/etc/X11/">' +
|
||||
'<span data-name="js-copy-path" class="path-icon icon-copy-to-clipboard"' +
|
||||
' title="copy path (Ctrl+P)">' +
|
||||
'</span>' +
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue