Vanessa 2024-03-08 11:15:23 +08:00
parent a46e626319
commit 077288184c
3 changed files with 7 additions and 2 deletions

View file

@ -283,6 +283,10 @@ export const showPopover = async (app: App, showRef = false) => {
} else if (popoverTargetElement.dataset.type === "url") {
// 在 database 的 url 列中以思源协议开头的链接
ids = [getIdFromSYProtocol(popoverTargetElement.textContent.trim())];
} else if (popoverTargetElement.dataset.popoverUrl) {
// 镜像数据库
const postResponse = await fetchSyncPost(popoverTargetElement.dataset.popoverUrl, {id: popoverTargetElement.dataset.avId});
ids = postResponse.data;
} else {
// pdf
let targetId;

View file

@ -360,6 +360,7 @@ export abstract class Constants {
refPopover: {default: "", custom: ""},
copyText: {default: "", custom: ""},
exitFocus: {default: "", custom: ""},
ai: {default: "", custom: ""},
switchReadonly: {default: "", custom: ""},
expand: {default: "⌘↓", custom: "⌘↓"},
collapse: {default: "⌘↑", custom: "⌘↑"},
@ -395,7 +396,7 @@ export abstract class Constants {
insertAfter: {default: "⇧⌘A", custom: "⇧⌘A"},
jumpToParentNext: {default: "⇧⌘N", custom: "⇧⌘N"},
moveToUp: {default: "⇧⌘↑", custom: "⇧⌘↑"},
moveToDown: {default: "⇧⌘↓", custom: "⇧⌘↓"},
moveToDown: {default: "⇧⌘↓", custom: "⇧⌘↓"}
},
insert: {
appearance: {default: "⌥⌘X", custom: "⌥⌘X"},

View file

@ -204,7 +204,7 @@ ${cell.color ? `color:${cell.color};` : ""}">${renderCell(cell.value)}</div>`;
<svg><use xlink:href="#iconAdd"></use></svg>
</span>
<div class="fn__space"></div>
${response.data.isMirror ? ` <span class="block__icon block__icon--show ariaLabel" aria-label="${window.siyuan.languages.mirrorTip}">
${response.data.isMirror ? ` <span data-av-id="${response.data.id}" data-popover-url="/api/av/getMirrorDatabaseBlocks" class="popover__block block__icon block__icon--show ariaLabel" aria-label="${window.siyuan.languages.mirrorTip}">
<svg><use xlink:href="#iconSplitLR"></use></svg></span><div class="fn__space"></div>` : ""}
</div>
<div contenteditable="${protyle.disabled ? "false" : "true"}" spellcheck="${window.siyuan.config.editor.spellcheck.toString()}" class="av__title${viewData.hideAttrViewName ? " av__title--hide" : ""}" data-title="${response.data.name || ""}" data-tip="${window.siyuan.languages.title}">${response.data.name || ""}</div>