This commit is contained in:
Daniel 2024-08-03 22:36:14 +08:00
parent efb3c5dd36
commit 6215e37418
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
4 changed files with 17 additions and 12 deletions

View file

@ -272,8 +272,8 @@ ${checkUpdateHTML}
passwordDialog.destroy();
});
btnsElement[1].addEventListener("click", () => {
fetchPost("/api/repo/importRepoKey", {key: textAreaElement.value}, () => {
window.siyuan.config.repo.key = textAreaElement.value;
fetchPost("/api/repo/importRepoKey", {key: textAreaElement.value}, (response) => {
window.siyuan.config.repo.key = response.data.key;
importKeyElement.parentElement.classList.add("fn__none");
importKeyElement.parentElement.nextElementSibling.classList.remove("fn__none");
passwordDialog.destroy();

View file

@ -179,8 +179,8 @@ export const initAbout = () => {
passwordDialog.destroy();
});
btnsElement[1].addEventListener("click", () => {
fetchPost("/api/repo/importRepoKey", {key: textAreaElement.value}, () => {
window.siyuan.config.repo.key = textAreaElement.value;
fetchPost("/api/repo/importRepoKey", {key: textAreaElement.value}, (response) => {
window.siyuan.config.repo.key = response.data.key;
importKeyElement.parentElement.classList.add("fn__none");
importKeyElement.parentElement.nextElementSibling.classList.remove("fn__none");
passwordDialog.destroy();