mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-15 03:28:07 +01:00
🎨 Support for listing missing files in Settings - Assets https://github.com/siyuan-note/siyuan/issues/8383
This commit is contained in:
parent
7aaa25840f
commit
11a97adcfe
7 changed files with 6 additions and 11 deletions
|
|
@ -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 => {
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue