mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-31 15:12:06 +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:
		| @@ -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(); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user