An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: https://github.com/siyuan-note/siyuan/issues/8202
Vanessacae79fecd5a5
diff --git a/app/src/assets/scss/component/_card.scss b/app/src/assets/scss/component/_card.scssindex 1e4587c78c..94b3e25d18 100644--- a/app/src/assets/scss/component/_card.scss+++ b/app/src/assets/scss/component/_card.scss@@ -34,8 +34,8 @@}&__img {- width: 96px;- height: 96px;+ width: 100px;+ height: 100px;display: flex;justify-content: center;align-items: center;diff --git a/app/src/types/index.d.ts b/app/src/types/index.d.tsindex b90f74263c..57e12f7bcc 100644--- a/app/src/types/index.d.ts+++ b/app/src/types/index.d.ts@@ -632,6 +632,9 @@ declare interface IFile {hMtime: string;hCtime: string;hSize: string;+ dueFlashcardCount?: string;+ newFlashcardCount?: string;+ flashcardCount?: string;id: string;count: number;subFileCount: number;diff --git a/app/src/util/pathName.ts b/app/src/util/pathName.tsindex 031443b76d..53be419994 100644--- a/app/src/util/pathName.ts+++ b/app/src/util/pathName.ts@@ -8,7 +8,7 @@ import {unicode2Emoji} from "../emoji";import {Constants} from "../constants";import {showMessage} from "../dialog/message";-export const getIdZoomInByPath = () => {+export const getIdZoomInByPath = () => {const searchParams = new URLSearchParams(window.location.search);const PWAURL = searchParams.get("url");let id = "";@@ -128,7 +128,8 @@ export const moveToPath = (fromPaths: string[], toNotebook: string, toPath: stri});};-export const movePathTo = (cb: (toPath: string[], toNotebook: string[]) => void, paths?: string[], range?: Range, title?: string, flashcard = false) => {+export const movePathTo = (cb: (toPath: string[], toNotebook: string[]) => void,+ paths?: string[], range?: Range, title?: string, flashcard = false) => {const exitDialog = window.siyuan.dialogs.find((item) => {if (item.element.querySelector("#foldList")) {item.destroy();@@ -161,6 +162,8 @@ export const movePathTo = (cb: (toPath: string[], toNotebook: string[]) => void,}}});+ // 文档树上引用数悬浮层不被遮挡+ dialog.element.style.zIndex = "200";if (paths && paths.length > 0) {fetchPost("/api/filetree/getHPathsByPaths", {paths}, (response) => {dialog.element.querySelector(".b3-dialog__header .ft__smaller").innerHTML = escapeHtml(response.data.join(" "));@@ -204,10 +207,25 @@ export const movePathTo = (cb: (toPath: string[], toNotebook: string[]) => void,flashcard,}, (data) => {let fileHTML = "";- data.data.forEach((item: { boxIcon: string, box: string, hPath: string, path: string }) => {+ data.data.forEach((item: {+ boxIcon: string,+ box: string,+ hPath: string,+ path: string,+ newFlashcardCount: string,+ dueFlashcardCount: string,+ flashcardCount: string+ }) => {+ let countHTML = "";+ if (flashcard) {+ countHTML = `<span class="popover__block counter b3-tooltips b3-tooltips__w" aria-label="${window.siyuan.languages.flashcardNewCard}">${item.newFlashcardCount}</span>+<span class="popover__block counter b3-tooltips b3-tooltips__w" aria-label="${window.siyuan.languages.flashcardReviewCard}">${item.dueFlashcardCount}</span>+<span class="popover__block counter b3-tooltips b3-tooltips__w" aria-label="${window.siyuan.languages.flashcardCard}">${item.flashcardCount}</span>`;+ }fileHTML += `<li style="padding: 4px" class="b3-list-item${fileHTML === "" ? " b3-list-item--focus" : ""}" data-path="${item.path}" data-box="${item.box}">${unicode2Emoji(item.boxIcon || Constants.SIYUAN_IMAGE_NOTE, false, "b3-list-item__graphic", true)}<span class="b3-list-item__showall">${escapeHtml(item.hPath)}</span>+ ${countHTML}</li>`;});searchListElement.innerHTML = fileHTML;@@ -435,7 +453,7 @@ export const movePathTo = (cb: (toPath: string[], toNotebook: string[]) => void,});};-const getLeaf = (liElement: HTMLElement, flashcard:boolean) => {+const getLeaf = (liElement: HTMLElement, flashcard: boolean) => {const toggleElement = liElement.querySelector(".b3-list-item__arrow");if (toggleElement.classList.contains("b3-list-item__arrow--open")) {toggleElement.classList.remove("b3-list-item__arrow--open");@@ -463,7 +481,11 @@ const getLeaf = (liElement: HTMLElement, flashcard:boolean) => {let fileHTML = "";response.data.files.forEach((item: IFile) => {let countHTML = "";- if (item.count && item.count > 0) {+ if (flashcard) {+ countHTML = `<span class="popover__block counter b3-tooltips b3-tooltips__nw" aria-label="${window.siyuan.languages.flashcardNewCard}">${item.newFlashcardCount}</span>+<span class="popover__block counter b3-tooltips b3-tooltips__nw" aria-label="${window.siyuan.languages.flashcardReviewCard}">${item.dueFlashcardCount}</span>+<span class="popover__block counter b3-tooltips b3-tooltips__nw" aria-label="${window.siyuan.languages.flashcardCard}">${item.flashcardCount}</span>`;+ } else if (item.count && item.count > 0) {countHTML = `<span class="popover__block counter b3-tooltips b3-tooltips__nw" aria-label="${window.siyuan.languages.ref}">${item.count}</span>`;}fileHTML += `<li title="${getDisplayName(item.name, true, true)} ${item.hSize}${item.bookmark ? "\n" + window.siyuan.languages.bookmark + " " + item.bookmark : ""}${item.name1 ? "\n" + window.siyuan.languages.name + " " + item.name1 : ""}${item.alias ? "\n" + window.siyuan.languages.alias + " " + item.alias : ""}${item.memo ? "\n" + window.siyuan.languages.memo + " " + item.memo : ""}${item.subFileCount !== 0 ? window.siyuan.languages.includeSubFile.replace("x", item.subFileCount) : ""}\n${window.siyuan.languages.modifiedAt} ${item.hMtime}\n${window.siyuan.languages.createdAt} ${item.hCtime}"