mirror of
https://github.com/esphome/esphome.git
synced 2024-12-20 16:18:49 +01:00
clear and disable editor while fetching contents (#603)
* clear and disable editor while fetching contents * semicolon Co-Authored-By: Otto Winter <otto@otto-winter.com> * semicolon Co-Authored-By: Otto Winter <otto@otto-winter.com>
This commit is contained in:
parent
30a542e763
commit
0a21816a5a
@ -709,9 +709,12 @@ document.querySelectorAll(".action-edit").forEach((btn) => {
|
|||||||
editorUploadButton.setAttribute('data-node', activeEditorConfig);
|
editorUploadButton.setAttribute('data-node', activeEditorConfig);
|
||||||
filenameField.innerHTML = activeEditorConfig;
|
filenameField.innerHTML = activeEditorConfig;
|
||||||
|
|
||||||
|
editor.setValue("Loading configuration yaml...");
|
||||||
|
editor.setOption('readOnly', true);
|
||||||
fetch(`./edit?configuration=${activeEditorConfig}`, {credentials: "same-origin"})
|
fetch(`./edit?configuration=${activeEditorConfig}`, {credentials: "same-origin"})
|
||||||
.then(res => res.text()).then(response => {
|
.then(res => res.text()).then(response => {
|
||||||
editor.setValue(response, -1);
|
editor.setValue(response, -1);
|
||||||
|
editor.setOption('readOnly', false);
|
||||||
});
|
});
|
||||||
|
|
||||||
modalInstance.open();
|
modalInstance.open();
|
||||||
|
Loading…
Reference in New Issue
Block a user