feature(client) view: add ability to view raw files using Shift + F3

This commit is contained in:
coderaiser 2021-01-17 15:55:24 +02:00
parent eb2c15ba17
commit 462d7bf3b5
3 changed files with 6 additions and 3 deletions

View file

@ -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

View file

@ -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: