This commit is contained in:
parent
df9b6dc4d5
commit
c1b83d81a3
6 changed files with 22 additions and 5 deletions
|
@ -82,6 +82,7 @@
|
|||
"snapshotMemo": "Snapshot Memo",
|
||||
"snapshotMemoTip": "Please enter the snapshot memo",
|
||||
"tagSnapshot": "Tag Snapshot",
|
||||
"tagSnapshotUpload": "Tag snapshot and upload",
|
||||
"tagSnapshotTip": "Do not include symbols \\ / : * ? " ' < > |",
|
||||
"dataRepo": "Data repo",
|
||||
"newSubDoc": "Create sub doc",
|
||||
|
|
|
@ -82,6 +82,7 @@
|
|||
"snapshotMemo": "Memo de Instantánea",
|
||||
"snapshotMemoTip": "Ingrese la nota instantánea",
|
||||
"tagSnapshot": "Instantánea de la etiqueta",
|
||||
"tagSnapshotUpload": "Etiquetar instantánea y cargar",
|
||||
"tagSnapshotTip": "No incluir símbolos \\ / : * ? " ' < > |",
|
||||
"dataRepo": "Repositorio de datos",
|
||||
"newSubDoc": "Crear subdocumento",
|
||||
|
|
|
@ -82,6 +82,7 @@
|
|||
"snapshotMemo": "Mémo d'instantané",
|
||||
"snapshotMemoTip": "Veuillez entrer le mémo instantané",
|
||||
"tagSnapshot": "Instantané de balise",
|
||||
"tagSnapshotUpload": "Tag instantané et téléchargement",
|
||||
"tagSnapshotTip": "Ne pas inclure les symboles \\ / : * ? " ' < > |",
|
||||
"dataRepo": "Dépôt de données",
|
||||
"newSubDoc": "Créer un sous-doc",
|
||||
|
|
|
@ -82,6 +82,7 @@
|
|||
"snapshotMemo": "快照備註",
|
||||
"snapshotMemoTip": "請輸入快照備註",
|
||||
"tagSnapshot": "標記快照",
|
||||
"tagSnapshotUpload": "標記快照並上傳",
|
||||
"tagSnapshotTip": "請勿包含符號 \\ / : * ? " ' < > |",
|
||||
"dataRepo": "數據倉庫",
|
||||
"newSubDoc": "新建子文檔",
|
||||
|
|
|
@ -82,6 +82,7 @@
|
|||
"snapshotMemo": "快照备注",
|
||||
"snapshotMemoTip": "请输入快照备注",
|
||||
"tagSnapshot": "标记快照",
|
||||
"tagSnapshotUpload": "标记快照并上传",
|
||||
"tagSnapshotTip": "请勿包含符号 \\ / : * ? " ' < > |",
|
||||
"dataRepo": "数据仓库",
|
||||
"newSubDoc": "新建子文档",
|
||||
|
|
|
@ -501,22 +501,34 @@ export const openHistory = () => {
|
|||
const genTagDialog = new Dialog({
|
||||
title: window.siyuan.languages.tagSnapshot,
|
||||
content: `<div class="b3-dialog__content">
|
||||
<input class="b3-text-field fn__block" placeholder="${window.siyuan.languages.tagSnapshotTip}">
|
||||
<input class="b3-text-field fn__block" value="${dayjs().format("YYYYMMDDHHmmss")}" placeholder="${window.siyuan.languages.tagSnapshotTip}">
|
||||
</div>
|
||||
<div class="b3-dialog__action">
|
||||
<button class="b3-button b3-button--cancel">${window.siyuan.languages.cancel}</button><div class="fn__space"></div>
|
||||
<button class="b3-button b3-button--text">${window.siyuan.languages.confirm}</button>
|
||||
<button class="b3-button b3-button--text">${window.siyuan.languages.tagSnapshot}</button><div class="fn__space"></div>
|
||||
<button class="b3-button b3-button--text">${window.siyuan.languages.tagSnapshotUpload}</button>
|
||||
</div>`,
|
||||
width: isMobile() ? "80vw" : "520px",
|
||||
});
|
||||
const inputElement = genTagDialog.element.querySelector(".b3-text-field") as HTMLInputElement;
|
||||
inputElement.focus();
|
||||
inputElement.select();
|
||||
const btnsElement = genTagDialog.element.querySelectorAll(".b3-button");
|
||||
btnsElement[0].addEventListener("click", () => {
|
||||
genTagDialog.destroy();
|
||||
});
|
||||
genTagDialog.bindInput(inputElement, () => {
|
||||
(btnsElement[1] as HTMLButtonElement).click();
|
||||
btnsElement[2].addEventListener("click", () => {
|
||||
fetchPost("/api/repo/tagSnapshot", {
|
||||
id: target.parentElement.getAttribute("data-id"),
|
||||
name: inputElement.value
|
||||
}, () => {
|
||||
fetchPost("/api/repo/uploadCloudSnapshot", {
|
||||
tag: inputElement.value,
|
||||
id: target.parentElement.getAttribute("data-id")
|
||||
}, () => {
|
||||
renderRepo(repoElement, 1);
|
||||
});
|
||||
});
|
||||
genTagDialog.destroy();
|
||||
});
|
||||
btnsElement[1].addEventListener("click", () => {
|
||||
fetchPost("/api/repo/tagSnapshot", {
|
||||
|
|
Loading…
Add table
Reference in a new issue