🎨 Support for listing missing files in Settings - Assets https://github.com/siyuan-note/siyuan/issues/8383

This commit is contained in:
Daniel 2023-06-04 11:55:06 +08:00
parent 7aaa25840f
commit 11a97adcfe
No known key found for this signature in database
GPG Key ID: 86211BA83DF03017
7 changed files with 6 additions and 11 deletions

View File

@ -635,7 +635,6 @@
"sort": "Sort",
"enterFullscreen": "Enter Full Screen",
"exitFullscreen": "Exit Full Screen",
"clearUnused": "Unreferenced assets",
"clearAll": "Are you sure to clean up all unreferenced assets?",
"missingAssets": "Missing assets",
"unreferencedAssets": "Unreferenced assets",

View File

@ -635,7 +635,6 @@
"sort": "Ordenar",
"enterFullscreen": "Entrar en pantalla completa",
"exitFullscreen": "Salir de pantalla completa",
"clearUnused": "Activos no utilizados",
"clearAll": "¿Está seguro de limpiar todos los activos no referenciados?",
"missingAssets": "Activos faltantes",
"unreferencedAssets": "Activos sin referencia",

View File

@ -635,7 +635,6 @@
"sort": "Tri",
"enterFullscreen": "plein écran",
"exitFullscreen": "Quitter le plein écran",
"clearUnused": "assets non-référencés",
"clearAll": "Êtes-vous sûr de nettoyer tous les assets non référencés ?",
"missingAssets": "Actifs manquants",
"unreferencedAssets": "Actifs non référencés",

View File

@ -635,8 +635,7 @@
"sort": "排序",
"enterFullscreen": "進入全螢幕",
"exitFullscreen": "退出全螢幕",
"clearUnused": "未引用的資料",
"clearAll": "確認清理所有未引用的資料?",
"clearAll": "確認清理所有未引用的資料文件?",
"missingAssets": "丟失的資料文件",
"unreferencedAssets": "未引用的資料文件",
"paste": "貼上",

View File

@ -635,8 +635,7 @@
"sort": "排序",
"enterFullscreen": "进入全屏幕",
"exitFullscreen": "退出全屏幕",
"clearUnused": "未引用资源文件",
"clearAll": "确认清理所有未引用资源文件?",
"clearAll": "确认清理所有未引用的资源文件?",
"missingAssets": "丢失的资源文件",
"unreferencedAssets": "未引用的资源文件",
"paste": "粘贴",

View File

@ -15,7 +15,7 @@ export const image = {
<div class="layout-tab-bar fn__flex">
<div class="item item--full item--focus" data-type="remove">
<div class="fn__flex-1"></div>
${window.siyuan.languages.clearUnused}
${window.siyuan.languages.unreferencedAssets}
<div class="fn__flex-1"></div>
</div>
<div class="item item--full" data-type="missing">
@ -57,7 +57,7 @@ export const image = {
while (target && !target.isEqualNode(image.element)) {
const type = target.getAttribute("data-type");
if (target.id === "removeAll") {
confirmDialog(window.siyuan.languages.clearUnused, `${window.siyuan.languages.clearAll}`, () => {
confirmDialog(window.siyuan.languages.deleteOpConfirm, `${window.siyuan.languages.clearAll}`, () => {
fetchPost("/api/asset/removeUnusedAssets", {}, response => {
getAllModels().asset.forEach(item => {
if (response.data.paths.includes(item.path)) {
@ -93,7 +93,7 @@ export const image = {
/// #endif
} else if (type === "clear") {
const pathString = target.parentElement.getAttribute("data-path");
confirmDialog(window.siyuan.languages.clearUnused, `${window.siyuan.languages.delete} <b>${pathPosix().basename(pathString)}</b>`, () => {
confirmDialog(window.siyuan.languages.deleteOpConfirm, `${window.siyuan.languages.delete} <b>${pathPosix().basename(pathString)}</b>`, () => {
fetchPost("/api/asset/removeUnusedAsset", {
path: pathString,
}, response => {

View File

@ -39,7 +39,7 @@ export const initConfigSearch = (element: HTMLElement, app: App) => {
"apiKeyTip", "apiProxy", "apiProxyTip", "apiBaseURL", "apiBaseURLTip"])),
// 图片
getLang(["assets", "clearUnused", "missingAssets"]),
getLang(["assets", "unreferencedAssets", "missingAssets"]),
// 导出
getLang(["paragraphBeginningSpace", "md4", "export", "export1", "export2", "export5", "export11",