mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
feature(cloudcmd) view file on double click or enter
This commit is contained in:
parent
648997851c
commit
e32e3ff47d
3 changed files with 21 additions and 11 deletions
3
HELP.md
3
HELP.md
|
|
@ -194,7 +194,8 @@ Hot keys
|
|||
| `Ctrl + F3` | sort by name
|
||||
| `Ctrl + F5` | sort by date
|
||||
| `Ctrl + F6` | sort by size
|
||||
| `Up`, `Down`, `Enter` | file system navigation
|
||||
| `Up`, `Down` | file system navigation
|
||||
| `Enter` | change directory/view file
|
||||
| `Alt + Left/Right` | show content of directory under cursor in target panel
|
||||
| `Alt + G` | go to directory
|
||||
| `Ctrl + \` | go to the root directory
|
||||
|
|
|
|||
|
|
@ -387,6 +387,8 @@ function KeyProto() {
|
|||
case Key.ENTER:
|
||||
if (Info.isDir)
|
||||
loadDir({path});
|
||||
else
|
||||
CloudCmd.View.show();
|
||||
break;
|
||||
|
||||
case Key.BACKSPACE:
|
||||
|
|
|
|||
|
|
@ -274,6 +274,10 @@ function onDblClick(event) {
|
|||
path: path === '/' ? '/' : path + '/',
|
||||
});
|
||||
|
||||
event.preventDefault();
|
||||
}else{
|
||||
CloudCmd.View.show();
|
||||
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
|
|
@ -282,17 +286,20 @@ function onTouch(event) {
|
|||
const current = getLIElement(event.target);
|
||||
const isDir = DOM.isCurrentIsDir(current);
|
||||
|
||||
if (!isDir)
|
||||
return;
|
||||
if (!isDir){
|
||||
|
||||
const isCurrent = DOM.isCurrentFile(current);
|
||||
|
||||
if (!isCurrent)
|
||||
return;
|
||||
|
||||
CloudCmd.loadDir({
|
||||
path: DOM.getCurrentPath(current),
|
||||
});
|
||||
|
||||
const isCurrent = DOM.isCurrentFile(current);
|
||||
|
||||
if (!isCurrent)
|
||||
return;
|
||||
|
||||
CloudCmd.loadDir({
|
||||
path: DOM.getCurrentPath(current),
|
||||
});
|
||||
}else{
|
||||
CloudCmd.View.show();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue