Fixes esphome/issues#1192 - Save on upload bug (#1107)

This commit is contained in:
Jonathan Adams 2020-07-01 18:08:17 +01:00 committed by GitHub
parent 6505c30c2b
commit 31067530a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -735,6 +735,7 @@ document.querySelectorAll("[data-action='edit']").forEach((button) => {
const closeButton = document.querySelector("#js-editor-modal [data-action='close']"); const closeButton = document.querySelector("#js-editor-modal [data-action='close']");
saveButton.setAttribute('data-filename', editorActiveFilename); saveButton.setAttribute('data-filename', editorActiveFilename);
uploadButton.setAttribute('data-filename', editorActiveFilename); uploadButton.setAttribute('data-filename', editorActiveFilename);
uploadButton.setAttribute('onClick', `saveFile("${editorActiveFilename}")`);
if (editorActiveFilename === "secrets.yaml") { if (editorActiveFilename === "secrets.yaml") {
uploadButton.classList.add("disabled"); uploadButton.classList.add("disabled");
editorActiveSecrets = true; editorActiveSecrets = true;