mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
feature(client) view: add ability to view raw files using Shift + F3
This commit is contained in:
parent
eb2c15ba17
commit
462d7bf3b5
3 changed files with 6 additions and 3 deletions
1
HELP.md
1
HELP.md
|
|
@ -156,6 +156,7 @@ Then, start the server again with `cloudcmd` and reload the page.
|
|||
| `F1` | help
|
||||
| `F2` | show `user menu`
|
||||
| `F3` | view, change directory
|
||||
| `Shift + F3` | view raw file, change directory
|
||||
| `F4` | edit
|
||||
| `Shift + F4` | edit in "vim" mode
|
||||
| `F5` | copy
|
||||
|
|
|
|||
|
|
@ -198,7 +198,9 @@ async function switchKey(event) {
|
|||
path,
|
||||
});
|
||||
else if (shift)
|
||||
CloudCmd.Markdown.show(path);
|
||||
CloudCmd.View.show(null, {
|
||||
raw: true,
|
||||
});
|
||||
else if (ctrlMeta)
|
||||
CloudCmd.sortPanel('name');
|
||||
else
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ module.exports.init = async () => {
|
|||
events.forEach(addEvent(Overlay, onOverlayClick));
|
||||
};
|
||||
|
||||
async function show(data, options) {
|
||||
async function show(data, options = {}) {
|
||||
const prefixURL = CloudCmd.prefixURL + FS;
|
||||
|
||||
if (Loading)
|
||||
|
|
@ -124,7 +124,7 @@ async function show(data, options) {
|
|||
Images.show.load();
|
||||
|
||||
const path = prefixURL + Info.path;
|
||||
const type = getType(path);
|
||||
const type = options.raw ? '' : getType(path);
|
||||
|
||||
switch(type) {
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue