fix: webui unexpected save-btn when file is non-editable (#429)
This commit is contained in:
parent
3727dec115
commit
5d26103ea2
1 changed files with 5 additions and 3 deletions
|
@ -603,9 +603,11 @@ async function setupEditorPage() {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
const $saveBtn = document.querySelector(".save-btn");
|
if (DATA.editable) {
|
||||||
$saveBtn.classList.remove("hidden");
|
const $saveBtn = document.querySelector(".save-btn");
|
||||||
$saveBtn.addEventListener("click", saveChange);
|
$saveBtn.classList.remove("hidden");
|
||||||
|
$saveBtn.addEventListener("click", saveChange);
|
||||||
|
}
|
||||||
} else if (DATA.kind == "View") {
|
} else if (DATA.kind == "View") {
|
||||||
$editor.readonly = true;
|
$editor.readonly = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue