diff --git a/web/src/components/MemoContent/EmbeddedContent/EmbeddedMemo.tsx b/web/src/components/MemoContent/EmbeddedContent/EmbeddedMemo.tsx index d69fd648a..0605970ad 100644 --- a/web/src/components/MemoContent/EmbeddedContent/EmbeddedMemo.tsx +++ b/web/src/components/MemoContent/EmbeddedContent/EmbeddedMemo.tsx @@ -1,4 +1,5 @@ import { useContext, useEffect } from "react"; +import MemoResourceListView from "@/components/MemoResourceListView"; import useLoading from "@/hooks/useLoading"; import { useMemoStore } from "@/store/v1"; import MemoContent from ".."; @@ -33,7 +34,12 @@ const EmbeddedMemo = ({ memoId }: Props) => { // Add the memo to the set of embedded memos. This is used to prevent infinite loops when a memo embeds itself. context.embeddedMemos.add(resourceName); - return ; + return ( +
+ + +
+ ); }; export default EmbeddedMemo; diff --git a/web/src/components/MemoEditor/MemoEditorDialog.tsx b/web/src/components/MemoEditor/MemoEditorDialog.tsx index 736d0bde8..448a4c86a 100644 --- a/web/src/components/MemoEditor/MemoEditorDialog.tsx +++ b/web/src/components/MemoEditor/MemoEditorDialog.tsx @@ -8,10 +8,11 @@ import Icon from "../Icon"; interface Props extends DialogProps { memoId?: number; + cacheKey?: string; relationList?: MemoRelation[]; } -const MemoEditorDialog: React.FC = ({ memoId, relationList, destroy }: Props) => { +const MemoEditorDialog: React.FC = ({ memoId, cacheKey, relationList, destroy }: Props) => { const globalStore = useGlobalStore(); const tagStore = useTagStore(); const { systemStatus } = globalStore.state; @@ -26,10 +27,10 @@ const MemoEditorDialog: React.FC = ({ memoId, relationList, destroy }: Pr return ( <> -
+
- -

{systemStatus.customizedProfile.name}

+ +

{systemStatus.customizedProfile.name}

@@ -38,7 +39,7 @@ const MemoEditorDialog: React.FC = ({ memoId, relationList, destroy }: Pr
= ({ memoId, relationList, destroy }: Pr ); }; -export default function showMemoEditorDialog(props: Pick = {}): void { +export default function showMemoEditorDialog(props: Pick = {}): void { generateDialog( { className: "memo-editor-dialog", diff --git a/web/src/components/MemoView.tsx b/web/src/components/MemoView.tsx index d13797476..08eae64f9 100644 --- a/web/src/components/MemoView.tsx +++ b/web/src/components/MemoView.tsx @@ -106,6 +106,7 @@ const MemoView: React.FC = (props: Props) => { const handleEditMemoClick = () => { showMemoEditorDialog({ memoId: memo.id, + cacheKey: `${memo.id}-${memo.updateTime}`, }); }; diff --git a/web/src/pages/MemoDetail.tsx b/web/src/pages/MemoDetail.tsx index a7a0d1fb7..716908556 100644 --- a/web/src/pages/MemoDetail.tsx +++ b/web/src/pages/MemoDetail.tsx @@ -95,6 +95,7 @@ const MemoDetail = () => { const handleEditMemoClick = () => { showMemoEditorDialog({ memoId: memo.id, + cacheKey: `${memo.id}-${memo.updateTime}`, }); };