mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 17:40:13 +01:00
🎨 改进数据仓库密钥初始化确认过程
This commit is contained in:
parent
02c7182856
commit
dd53d345a4
9 changed files with 49 additions and 32 deletions
|
|
@ -289,7 +289,7 @@ ${accountHTML}
|
|||
const importKeyElement = modelMainElement.querySelector("#importKey");
|
||||
importKeyElement.addEventListener("click", () => {
|
||||
const passwordDialog = new Dialog({
|
||||
title: window.siyuan.languages.key,
|
||||
title: "🔑 " + window.siyuan.languages.key,
|
||||
content: `<div class="b3-dialog__content">
|
||||
<textarea class="b3-text-field fn__block" placeholder="${window.siyuan.languages.keyPlaceholder}"></textarea>
|
||||
</div>
|
||||
|
|
@ -315,7 +315,7 @@ ${accountHTML}
|
|||
});
|
||||
});
|
||||
modelMainElement.querySelector("#initKey").addEventListener("click", () => {
|
||||
confirmDialog(window.siyuan.languages.genKey, "TODO", () => {
|
||||
confirmDialog("🔑 " + window.siyuan.languages.genKey, window.siyuan.languages.initRepoKeyTip, () => {
|
||||
fetchPost("/api/repo/initRepoKey", {}, (response) => {
|
||||
window.siyuan.config.repo.key = response.data.key;
|
||||
importKeyElement.parentElement.classList.add("fn__none");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue