mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
fix(edit-file) show editor when access denied
This commit is contained in:
parent
a741795ef3
commit
6be2c41823
4 changed files with 9 additions and 2 deletions
|
|
@ -1,5 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
/* global CloudCmd */
|
||||
|
||||
const exec = require('execon');
|
||||
const Key = CloudCmd.Key;
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,9 @@ CloudCmd.EditFile = function EditFileProto(callback) {
|
|||
|
||||
Images.show.load();
|
||||
|
||||
CloudCmd.Edit.show(config);
|
||||
CloudCmd.Edit
|
||||
.getEditor()
|
||||
.setOption('keyMap', 'default');
|
||||
|
||||
Info.getData((error, data) => {
|
||||
const path = Info.path;
|
||||
|
|
@ -81,6 +83,8 @@ CloudCmd.EditFile = function EditFileProto(callback) {
|
|||
.setValueFirst(path, data)
|
||||
.setModeForPath(name)
|
||||
.enableKey();
|
||||
|
||||
CloudCmd.Edit.show(config);
|
||||
});
|
||||
|
||||
return CloudCmd.Edit;
|
||||
|
|
|
|||
|
|
@ -58,9 +58,11 @@ CloudCmd.EditNames = function EditNamesProto(callback) {
|
|||
.getEditor()
|
||||
.setValueFirst('edit-names', names)
|
||||
.setMode()
|
||||
.setOption('keyMap', 'default')
|
||||
.disableKey();
|
||||
|
||||
DOM.Events.addKey(keyListener);
|
||||
|
||||
CloudCmd.Edit.show(ConfigView);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -87,7 +87,6 @@ function EditProto(callback) {
|
|||
|
||||
Edit.getEditor()
|
||||
.setOptions({
|
||||
keyMap: 'default',
|
||||
fontSize: 16,
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue