diff --git a/web/src/components/CreateMemoRelationDialog.tsx b/web/src/components/CreateMemoRelationDialog.tsx index fe251b45..83d3958e 100644 --- a/web/src/components/CreateMemoRelationDialog.tsx +++ b/web/src/components/CreateMemoRelationDialog.tsx @@ -75,7 +75,7 @@ const CreateMemoRelationDialog: React.FC = (props: Props) => { return ( <>
-

{"Relations"}

+

{"Add references"}

@@ -84,24 +84,25 @@ const CreateMemoRelationDialog: React.FC = (props: Props) => { } + endDecorator={} /> {memoList.length > 0 && ( <> -
+
{memoList.map((memo) => (
handleDeleteMemoRelation(memo)} > - #{memo.id} - {memo.content} + #{memo.id} + {memo.content} +
))}
diff --git a/web/src/components/MemoEditor/MemoEditorDialog.tsx b/web/src/components/MemoEditor/MemoEditorDialog.tsx index b9aa7dea..57e87843 100644 --- a/web/src/components/MemoEditor/MemoEditorDialog.tsx +++ b/web/src/components/MemoEditor/MemoEditorDialog.tsx @@ -1,6 +1,5 @@ import { useEffect } from "react"; -import { useTagStore } from "@/store/module"; -import { useTranslate } from "@/utils/i18n"; +import { useGlobalStore, useTagStore } from "@/store/module"; import MemoEditor from "."; import { generateDialog } from "../Dialog"; import Icon from "../Icon"; @@ -11,8 +10,9 @@ interface Props extends DialogProps { } const MemoEditorDialog: React.FC = ({ memoId, relationList, destroy }: Props) => { - const t = useTranslate(); + const globalStore = useGlobalStore(); const tagStore = useTagStore(); + const { systemStatus } = globalStore.state; useEffect(() => { tagStore.fetchTags(); @@ -25,7 +25,10 @@ const MemoEditorDialog: React.FC = ({ memoId, relationList, destroy }: Pr return ( <>
-

{t("amount-text.memo")}

+
+ +

{systemStatus.customizedProfile.name}

+
diff --git a/web/src/components/MemoEditor/index.tsx b/web/src/components/MemoEditor/index.tsx index 58381e42..3b21d54c 100644 --- a/web/src/components/MemoEditor/index.tsx +++ b/web/src/components/MemoEditor/index.tsx @@ -24,6 +24,7 @@ const emptyOlReg = /^(\d+)\. $/; interface Props { className?: string; + editorClassName?: string; cacheKey?: string; memoId?: MemoId; relationList?: MemoRelation[]; @@ -39,7 +40,7 @@ interface State { } const MemoEditor = (props: Props) => { - const { className, cacheKey, memoId, onConfirm } = props; + const { className, editorClassName, cacheKey, memoId, onConfirm } = props; const { i18n } = useTranslation(); const t = useTranslate(); const [contentCache, setContentCache] = useLocalStorage(`memo-editor-${cacheKey}`, ""); @@ -396,7 +397,7 @@ const MemoEditor = (props: Props) => { const editorConfig = useMemo( () => ({ - className: "", + className: editorClassName ?? "", initialContent: "", placeholder: t("editor.placeholder"), onContentChange: handleContentChange, diff --git a/web/src/components/MemoRelationListView.tsx b/web/src/components/MemoRelationListView.tsx index f9701494..9b33086f 100644 --- a/web/src/components/MemoRelationListView.tsx +++ b/web/src/components/MemoRelationListView.tsx @@ -35,47 +35,43 @@ const MemoRelationListView = (props: Props) => { return ( <> {referencingMemoList.length > 0 && ( -
- - - -
- {referencingMemoList.map((memo) => { - return ( -
- - #{memo.id} - {memo.content} - -
- ); - })} -
+
+ {referencingMemoList.map((memo) => { + return ( +
+ + + + + #{memo.id} + {memo.content} + +
+ ); + })}
)} {referencedMemoList.length > 0 && ( -
- - - -
- {referencedMemoList.map((memo) => { - return ( -
- - #{memo.id} - {memo.content} - -
- ); - })} -
+
+ {referencedMemoList.map((memo) => { + return ( +
+ + + + + #{memo.id} + {memo.content} + +
+ ); + })}
)}