Explorar o código

:art: fix https://github.com/siyuan-note/siyuan/issues/10714

Vanessa hai 1 ano
pai
achega
a3e3a0aeed
Modificáronse 1 ficheiros con 7 adicións e 1 borrados
  1. 7 1
      app/src/block/popover.ts

+ 7 - 1
app/src/block/popover.ts

@@ -48,7 +48,13 @@ export const initBlockPopover = (app: App) => {
                 if (tip && isLocalPath(href) && !aElement.classList.contains("b3-tooltips")) {
                 if (tip && isLocalPath(href) && !aElement.classList.contains("b3-tooltips")) {
                     let assetTip = tip;
                     let assetTip = tip;
                     fetchPost("/api/asset/statAsset", {path: href}, (response) => {
                     fetchPost("/api/asset/statAsset", {path: href}, (response) => {
-                        assetTip += ` ${response.data.hSize}${title ? "<br>" + title : ""}<br>${window.siyuan.languages.modifiedAt} ${response.data.hCreated}<br>${window.siyuan.languages.createdAt} ${response.data.hUpdated}`;
+                        if (response.code === 1) {
+                            if (title) {
+                                assetTip += "<br>" + title;
+                            }
+                        } else {
+                            assetTip += ` ${response.data.hSize}${title ? "<br>" + title : ""}<br>${window.siyuan.languages.modifiedAt} ${response.data.hCreated}<br>${window.siyuan.languages.createdAt} ${response.data.hUpdated}`;
+                        }
                         showTooltip(assetTip, aElement);
                         showTooltip(assetTip, aElement);
                     });
                     });
                     tip = "";
                     tip = "";