mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
chore(dom) duplicatePanel: es2015-ify
This commit is contained in:
parent
02a19fecbf
commit
0f70b5da31
1 changed files with 16 additions and 10 deletions
|
|
@ -1360,19 +1360,25 @@ function CmdProto() {
|
|||
});
|
||||
},
|
||||
|
||||
this.duplicatePanel = function() {
|
||||
var isDir = CurrentInfo.isDir;
|
||||
var path = CurrentInfo.dirPath;
|
||||
var panel = CurrentInfo.panelPassive;
|
||||
var noCurrent = !CurrentInfo.isOnePanel;
|
||||
this.duplicatePanel = () => {
|
||||
const Info = CurrentInfo;
|
||||
const isDir = Info.isDir;
|
||||
const panel = Info.panelPassive;
|
||||
const noCurrent = !Info.isOnePanel;
|
||||
|
||||
if (isDir)
|
||||
path = CurrentInfo.path;
|
||||
const getPath = (isDir) => {
|
||||
if (isDir)
|
||||
return Info.path;
|
||||
|
||||
return Info.dirPath;
|
||||
};
|
||||
|
||||
const path = getPath(isDir);
|
||||
|
||||
CloudCmd.loadDir({
|
||||
path: path,
|
||||
panel: panel,
|
||||
noCurrent: noCurrent,
|
||||
path,
|
||||
panel,
|
||||
noCurrent,
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue