mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
38 lines
810 B
JavaScript
38 lines
810 B
JavaScript
'use strict';
|
|
|
|
const data = `'use strict';
|
|
|
|
module.exports = {
|
|
'F2 - Rename file': async ({DOM}) => {
|
|
await DOM.renameCurrent();
|
|
},
|
|
};
|
|
`;
|
|
|
|
module.exports = {
|
|
'F2 - Rename file': async ({DOM}) => {
|
|
await DOM.renameCurrent();
|
|
},
|
|
|
|
'C - Create User Menu File': async ({DOM, CloudCmd, tryToCatch}) => {
|
|
const {
|
|
RESTful,
|
|
CurrentInfo,
|
|
} = DOM;
|
|
|
|
const {dirPath} = CurrentInfo;
|
|
const path = `${dirPath}.cloudcmd.menu.js`;
|
|
|
|
const [e] = await tryToCatch(RESTful.write, path, data);
|
|
|
|
if (e)
|
|
return;
|
|
|
|
await CloudCmd.refresh();
|
|
DOM.setCurrentByName('.cloudcmd.menu.js');
|
|
await CloudCmd.EditFile.show();
|
|
},
|
|
};
|
|
|
|
module.exports._data = data;
|
|
|