mirror of
https://github.com/esphome/esphome.git
synced 2025-03-13 22:28:14 +00: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
fba6104642
commit
e61f972d85
@ -709,9 +709,12 @@ document.querySelectorAll(".action-edit").forEach((btn) => {
|
||||
editorUploadButton.setAttribute('data-node', activeEditorConfig);
|
||||
filenameField.innerHTML = activeEditorConfig;
|
||||
|
||||
editor.setValue("Loading configuration yaml...");
|
||||
editor.setOption('readOnly', true);
|
||||
fetch(`./edit?configuration=${activeEditorConfig}`, {credentials: "same-origin"})
|
||||
.then(res => res.text()).then(response => {
|
||||
editor.setValue(response, -1);
|
||||
editor.setOption('readOnly', false);
|
||||
});
|
||||
|
||||
modalInstance.open();
|
||||
|
Loading…
x
Reference in New Issue
Block a user