mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-10 18:58:50 +01:00
🚨
This commit is contained in:
parent
1ac623ebb1
commit
d24f5ae3cf
8 changed files with 26 additions and 28 deletions
|
|
@ -306,7 +306,7 @@ export const setKey = (isSync:boolean, cb?:() => void) => {
|
|||
dialog.element.querySelector(".b3-button--cancel").addEventListener("click", () => {
|
||||
dialog.destroy();
|
||||
});
|
||||
const genBtnElement = dialog.element.querySelector("#initKeyByPW")
|
||||
const genBtnElement = dialog.element.querySelector("#initKeyByPW");
|
||||
dialog.element.querySelector(".b3-switch").addEventListener("change", function () {
|
||||
if (this.checked) {
|
||||
genBtnElement.removeAttribute("disabled");
|
||||
|
|
@ -331,7 +331,7 @@ export const setKey = (isSync:boolean, cb?:() => void) => {
|
|||
fetchPost("/api/repo/initRepoKeyFromPassphrase", {pass: inputElements[0].value}, (response) => {
|
||||
window.siyuan.config.repo.key = response.data.key;
|
||||
if (cb) {
|
||||
cb()
|
||||
cb();
|
||||
}
|
||||
if (isSync) {
|
||||
setSync(response.data.key, dialog);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue