mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-29 02:30:28 +00:00
feature(package) putout v4.0.0
This commit is contained in:
parent
f20c7b15a4
commit
d6674aed3e
6 changed files with 8 additions and 11 deletions
|
|
@ -459,7 +459,7 @@ function CloudCmdProto(DOM) {
|
|||
current = DOM.getCurrentByName(dir);
|
||||
|
||||
if (!current)
|
||||
current = DOM.getFiles(panel)[0];
|
||||
[current] = DOM.getFiles(panel);
|
||||
|
||||
DOM.setCurrentFile(current, {
|
||||
history,
|
||||
|
|
@ -528,7 +528,7 @@ function CloudCmdProto(DOM) {
|
|||
CloudCmd.loadDir({path}, () => {
|
||||
const {panel} = Info;
|
||||
const current = DOM.getCurrentByName(dir);
|
||||
const first = DOM.getFiles(panel)[0];
|
||||
const [first] = DOM.getFiles(panel);
|
||||
|
||||
DOM.setCurrentFile(current || first, {
|
||||
history,
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ module.exports.getCurrentName = (currentFile) => {
|
|||
|
||||
if (!current)
|
||||
return '';
|
||||
|
||||
|
||||
const link = DOM.getCurrentLink(current);
|
||||
|
||||
if (!link)
|
||||
|
|
@ -83,7 +83,7 @@ module.exports.getCurrentDirPath = (panel = DOM.getPanel()) => {
|
|||
*/
|
||||
module.exports.getCurrentPath = (currentFile) => {
|
||||
const current = currentFile || DOM.getCurrentFile();
|
||||
const element = DOM.getByTag('a', current)[0];
|
||||
const [element] = DOM.getByTag('a', current);
|
||||
const {prefix} = CloudCmd;
|
||||
|
||||
const path = element
|
||||
|
|
|
|||
|
|
@ -844,7 +844,7 @@ function CmdProto() {
|
|||
current = DOM.getCurrentByName(name, panel);
|
||||
|
||||
if (!current)
|
||||
current = filesPassive[0];
|
||||
[current] = filesPassive;
|
||||
}
|
||||
|
||||
DOM.setCurrentFile(current, {
|
||||
|
|
|
|||
|
|
@ -314,7 +314,7 @@ function _processFiles(options, data) {
|
|||
if (!names.length)
|
||||
names.push(DOM.getCurrentName());
|
||||
|
||||
const name = names[0];
|
||||
const [name] = names;
|
||||
|
||||
const sameName = DOM.getCurrentByName(name, panel);
|
||||
|
||||
|
|
@ -444,7 +444,7 @@ function twopack(operation, type) {
|
|||
|
||||
function message(msg, to, names) {
|
||||
const n = names.length;
|
||||
const name = names[0];
|
||||
const [name] = names;
|
||||
|
||||
msg += ' ';
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue