mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
fix(edit-file) multiple f4
This commit is contained in:
parent
9d7d66fc99
commit
5daf1124a1
1 changed files with 10 additions and 0 deletions
|
|
@ -5,6 +5,7 @@
|
|||
CloudCmd.EditFile = exports;
|
||||
|
||||
const Format = require('format-io/legacy');
|
||||
const fullstore = require('fullstore/legacy');
|
||||
const exec = require('execon');
|
||||
const supermenu = require('supermenu');
|
||||
|
||||
|
|
@ -18,6 +19,8 @@ const TITLE = 'Edit';
|
|||
const Images = DOM.Images;
|
||||
|
||||
let MSG_CHANGED;
|
||||
const isLoading = fullstore();
|
||||
|
||||
const ConfigView = {
|
||||
beforeClose: () => {
|
||||
exec.ifExist(Menu, 'hide');
|
||||
|
|
@ -26,11 +29,15 @@ const ConfigView = {
|
|||
};
|
||||
|
||||
module.exports.init = async () => {
|
||||
isLoading(true);
|
||||
|
||||
await CloudCmd.Edit();
|
||||
|
||||
const editor = CloudCmd.Edit.getEditor();
|
||||
authCheck(editor);
|
||||
setListeners(editor);
|
||||
|
||||
isLoading(false);
|
||||
};
|
||||
|
||||
function getName() {
|
||||
|
|
@ -43,6 +50,9 @@ function getName() {
|
|||
}
|
||||
|
||||
module.exports.show = (options) => {
|
||||
if (isLoading())
|
||||
return;
|
||||
|
||||
const config = {
|
||||
...ConfigView,
|
||||
...options,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue