From 5daf1124a16becf3df196bfa18c1e29dfd34b1d1 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 23 Aug 2018 22:11:12 +0300 Subject: [PATCH] fix(edit-file) multiple f4 --- client/modules/edit-file.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/client/modules/edit-file.js b/client/modules/edit-file.js index 1b549f38..01dc124e 100644 --- a/client/modules/edit-file.js +++ b/client/modules/edit-file.js @@ -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,