Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

chore: update memo props

Steven3822c26e3218
diff --git a/web/src/components/Memo.tsx b/web/src/components/Memo.tsx
index bad0ef10d..001cb4189 100644
--- a/web/src/components/Memo.tsx
+++ b/web/src/components/Memo.tsx
@@ -25,7 +25,6 @@ import "@/less/memo.less";
interface Props {
memo: Memo;
showVisibility?: boolean;
- showCommentEntry?: boolean;
lazyRendering?: boolean;
}
@@ -280,13 +279,6 @@ const Memo: React.FC<Props> = (props: Props) => {
)}
</div>
</div>
- {memo.parent && props.showCommentEntry && (
- <div>
- <Link to={`/m/${memo.parent.id}`}>
- <span className="text-xs text-gray-400 opacity-80">This is a comment of #{memo.parent.id}</span>
- </Link>
- </div>
- )}
<MemoContent
content={memo.content}
onMemoContentClick={handleMemoContentClick}
diff --git a/web/src/components/MemoList.tsx b/web/src/components/MemoList.tsx
index 345a55119..203c5c7b9 100644
--- a/web/src/components/MemoList.tsx
+++ b/web/src/components/MemoList.tsx
@@ -133,7 +133,7 @@ const MemoList: React.FC = () => {
return (
<div className="memo-list-container">
{sortedMemos.map((memo) => (
- <Memo key={`${memo.id}-${memo.displayTs}`} memo={memo} lazyRendering showVisibility showCommentEntry />
+ <Memo key={`${memo.id}-${memo.displayTs}`} memo={memo} lazyRendering showVisibility />
))}
{isFetching ? (
<div className="status-text-container fetching-tip">
diff --git a/web/src/pages/Explore.tsx b/web/src/pages/Explore.tsx
index a2cfe66d8..375554216 100644
--- a/web/src/pages/Explore.tsx
+++ b/web/src/pages/Explore.tsx
@@ -93,7 +93,7 @@ const Explore = () => {
<div className="relative w-full h-auto flex flex-col justify-start items-start">
<MemoFilter />
{sortedMemos.map((memo) => {
- return <Memo key={`${memo.id}-${memo.displayTs}`} memo={memo} showCommentEntry />;
+ return <Memo key={`${memo.id}-${memo.displayTs}`} memo={memo} />;
})}
{isComplete ? (
sortedMemos.length === 0 && (
diff --git a/web/src/pages/MemoDetail.tsx b/web/src/pages/MemoDetail.tsx
index 19671ca92..dfc95dc72 100644
--- a/web/src/pages/MemoDetail.tsx
+++ b/web/src/pages/MemoDetail.tsx
@@ -119,16 +119,16 @@ const MemoDetail = () => {
<span className="text-gray-400 dark:text-gray-400">#{memo.id}</span>
</Tooltip>
</div>
+ <MemoContent content={memo.content} />
+ <MemoResourceListView resourceList={memo.resourceList} />
+ <MemoRelationListView relationList={referenceRelations} />
{memo.parent && (
- <div className="mb-2">
+ <div className="w-full mt-2">
<Link to={`/m/${memo.parent.id}`}>
<span className="text-xs text-gray-400 opacity-80">This is a comment of #{memo.parent.id}</span>
</Link>
</div>
)}
- <MemoContent content={memo.content} />
- <MemoResourceListView resourceList={memo.resourceList} />
- <MemoRelationListView relationList={referenceRelations} />
<div className="w-full mt-4 flex flex-col sm:flex-row justify-start sm:justify-between sm:items-center gap-2">
<div className="flex flex-row justify-start items-center">
<Link to={`/u/${encodeURIComponent(memo.creatorUsername)}`}>