mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-16 17:10:53 +08:00
This commit is contained in:
parent
c705f6b189
commit
50c6c93ca7
@ -1,5 +1,7 @@
|
||||
{
|
||||
"confirmDeleteTip": "确定删除 <b>${x}</b> 吗?<br>删除后可在 [数据历史] 中恢复,按 [设置 - 编辑器 - 历史保留天数] 保留 <code class='fn__code'>${y}</code> 天",
|
||||
"andSubFile": "确定删除 <b>${x}</b> 及其 <b>${y}</b> 个子文档吗?",
|
||||
"confirmDeleteTip": "确定删除 <b>${x}</b> 吗?",
|
||||
"rollbackTip": "删除后可在 [数据历史] 中恢复,按 [设置 - 编辑器 - 历史保留天数] 保留 <code class='fn__code'>${x}</code> 天",
|
||||
"newView": "添加视图",
|
||||
"newCol": "添加列",
|
||||
"newRow": "添加条目",
|
||||
@ -686,7 +688,6 @@
|
||||
"customEmoji": "添加自定义表情",
|
||||
"customEmojiTip": "打开 <a href=\"javascript:void(0)\" id=\"appearanceOpenEmoji\">Emoji 文件夹</a> 放入图片后并点击刷新按钮",
|
||||
"recentEmoji": "常用表情",
|
||||
"andSubFile": "及其 <b>x</b> 个子文档",
|
||||
"changeIcon": "修改图标",
|
||||
"addIcon": "添加图标",
|
||||
"includeSubFile": "\n包含 x 个子文档",
|
||||
|
@ -18,9 +18,13 @@ export const deleteFile = (notebookId: string, pathString: string) => {
|
||||
id: getDisplayName(pathString, true, true)
|
||||
}, (response) => {
|
||||
const fileName = escapeHtml(response.data.name);
|
||||
let tip = `${window.siyuan.languages.confirmDelete} <b>${fileName}</b>?`;
|
||||
let tip = `${window.siyuan.languages.confirmDeleteTip.replace("${x}", fileName)}
|
||||
<div class="fn__hr"></div>
|
||||
<div class="ft__smaller ft__on-surface">${window.siyuan.languages.rollbackTip.replace("${x}", window.siyuan.config.editor.historyRetentionDays)}</div>`;
|
||||
if (response.data.subFileCount > 0) {
|
||||
tip = `${window.siyuan.languages.confirmDelete} <b>${fileName}</b> ${window.siyuan.languages.andSubFile.replace("x", response.data.subFileCount)}?`;
|
||||
tip = `${window.siyuan.languages.andSubFile.replace("${x}", fileName).replace("${y}", response.data.subFileCount)}
|
||||
<div class="fn__hr"></div>
|
||||
<div class="ft__smaller ft__on-surface">${window.siyuan.languages.rollbackTip.replace("${x}", window.siyuan.config.editor.historyRetentionDays)}</div>`;
|
||||
}
|
||||
confirmDialog(window.siyuan.languages.deleteOpConfirm, tip, () => {
|
||||
fetchPost("/api/filetree/removeDoc", {
|
||||
@ -40,7 +44,9 @@ export const deleteFiles = (liElements: Element[]) => {
|
||||
deleteFile(itemNotebookId, liElements[0].getAttribute("data-path"));
|
||||
} else {
|
||||
confirmDialog(window.siyuan.languages.deleteOpConfirm,
|
||||
`${window.siyuan.languages.confirmDelete} <b>${Lute.EscapeHTMLStr(getNotebookName(itemNotebookId))}</b>?`, () => {
|
||||
`${window.siyuan.languages.confirmDeleteTip.replace("${x}", Lute.EscapeHTMLStr(getNotebookName(itemNotebookId)))}
|
||||
<div class="fn__hr"></div>
|
||||
<div class="ft__smaller ft__on-surface">${window.siyuan.languages.rollbackTip.replace("${x}", window.siyuan.config.editor.historyRetentionDays)}</div>`, () => {
|
||||
fetchPost("/api/notebook/removeNotebook", {
|
||||
notebook: itemNotebookId,
|
||||
callback: Constants.CB_MOUNT_REMOVE
|
||||
@ -61,7 +67,9 @@ export const deleteFiles = (liElements: Element[]) => {
|
||||
return;
|
||||
}
|
||||
confirmDialog(window.siyuan.languages.deleteOpConfirm,
|
||||
window.siyuan.languages.confirmRemoveAll.replace("${count}", paths.length), () => {
|
||||
`${window.siyuan.languages.confirmRemoveAll.replace("${count}", paths.length)}
|
||||
<div class="fn__hr"></div>
|
||||
<div class="ft__smaller ft__on-surface">${window.siyuan.languages.rollbackTip.replace("${x}", window.siyuan.config.editor.historyRetentionDays)}</div>`, () => {
|
||||
fetchPost("/api/filetree/removeDocs", {
|
||||
paths
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user