mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-19 05:28:07 +01:00
This commit is contained in:
parent
83777a14ed
commit
a2dba45103
12 changed files with 228 additions and 163 deletions
|
|
@ -33,6 +33,7 @@ import {genEmptyElement} from "../../block/util";
|
|||
import {transaction} from "../wysiwyg/transaction";
|
||||
import {hideTooltip} from "../../dialog/tooltip";
|
||||
import {transferBlockRef} from "../../menus/block";
|
||||
import {openCardByData} from "../../card/openCard";
|
||||
|
||||
export class Title {
|
||||
public element: HTMLElement;
|
||||
|
|
@ -230,7 +231,9 @@ export class Title {
|
|||
}).element);
|
||||
window.siyuan.menus.menu.popup({x: event.clientX, y: event.clientY});
|
||||
});
|
||||
this.element.querySelector(".protyle-attr").addEventListener("click", (event: MouseEvent & { target: HTMLElement }) => {
|
||||
this.element.querySelector(".protyle-attr").addEventListener("click", (event: MouseEvent & {
|
||||
target: HTMLElement
|
||||
}) => {
|
||||
fetchPost("/api/block/getDocInfo", {
|
||||
id: protyle.block.rootID
|
||||
}, (response) => {
|
||||
|
|
@ -353,6 +356,15 @@ export class Title {
|
|||
openFileWechatNotify(protyle);
|
||||
}
|
||||
}).element);
|
||||
window.siyuan.menus.menu.append(new MenuItem({
|
||||
label: window.siyuan.languages.riffCard,
|
||||
icon: "iconRiffCard",
|
||||
click: () => {
|
||||
fetchPost("/api/riff/getTreeRiffDueCards", {rootID: protyle.block.rootID}, (response) => {
|
||||
openCardByData(response.data, `<span class="fn__flex-center">${escapeHtml(this.editElement.textContent)}</span>`);
|
||||
});
|
||||
}
|
||||
}).element);
|
||||
window.siyuan.menus.menu.append(new MenuItem({type: "separator"}).element);
|
||||
window.siyuan.menus.menu.append(new MenuItem({
|
||||
iconHTML: Constants.ZWSP,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue