diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 768c0d10..5d47ab07 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -9,7 +9,6 @@ jobs: strategy: matrix: node-version: - - 14.x - 16.x - 17.x steps: diff --git a/client/dom/index.js b/client/dom/index.js index 1473a02c..fe665336 100644 --- a/client/dom/index.js +++ b/client/dom/index.js @@ -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'); }; diff --git a/client/modules/config/index.js b/client/modules/config/index.js index 38963929..130cd183 100644 --- a/client/modules/config/index.js +++ b/client/modules/config/index.js @@ -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) { diff --git a/client/sort.js b/client/sort.js index f46f61a2..b3c68ee5 100644 --- a/client/sort.js +++ b/client/sort.js @@ -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; diff --git a/common/cloudfunc.js b/common/cloudfunc.js index ac0cc221..64728094 100644 --- a/common/cloudfunc.js +++ b/common/cloudfunc.js @@ -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>'; diff --git a/server/server.js b/server/server.js index 48f428e4..abfff494 100644 --- a/server/server.js +++ b/server/server.js @@ -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); diff --git a/test/common/cloudfunc.js b/test/common/cloudfunc.js index 218de467..a9987f10 100644 --- a/test/common/cloudfunc.js +++ b/test/common/cloudfunc.js @@ -52,8 +52,7 @@ const data = { }], }; -let Expect = - '
' + +let Expect = '
' + '' + '' +