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");
|
||||
$saveBtn.classList.remove("hidden");
|
||||
$saveBtn.addEventListener("click", saveChange);
|
||||
if (DATA.editable) {
|
||||
const $saveBtn = document.querySelector(".save-btn");
|
||||
$saveBtn.classList.remove("hidden");
|
||||
$saveBtn.addEventListener("click", saveChange);
|
||||
}
|
||||
} else if (DATA.kind == "View") {
|
||||
$editor.readonly = true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue