From 566171783de4970334926b50b563593f1bfee08a Mon Sep 17 00:00:00 2001 From: Steven Date: Fri, 26 Jan 2024 23:33:40 +0800 Subject: [PATCH] chore: tweak embedded memo style --- web/src/components/CreateMemoRelationDialog.tsx | 3 ++- .../components/MemoContent/EmbeddedContent/EmbeddedMemo.tsx | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/web/src/components/CreateMemoRelationDialog.tsx b/web/src/components/CreateMemoRelationDialog.tsx index 137065f1..5d60428d 100644 --- a/web/src/components/CreateMemoRelationDialog.tsx +++ b/web/src/components/CreateMemoRelationDialog.tsx @@ -3,6 +3,7 @@ import React, { useState } from "react"; import { toast } from "react-hot-toast"; import useDebounce from "react-use/lib/useDebounce"; import { memoServiceClient } from "@/grpcweb"; +import { DEFAULT_MEMO_LIMIT } from "@/helpers/consts"; import { getDateTimeString } from "@/helpers/datetime"; import useCurrentUser from "@/hooks/useCurrentUser"; import { Memo } from "@/types/proto/api/v2/memo_service"; @@ -34,7 +35,7 @@ const CreateMemoRelationDialog: React.FC = (props: Props) => { filters.push(`content_search == [${JSON.stringify(searchText)}]`); } const { memos } = await memoServiceClient.listMemos({ - limit: 10, + limit: DEFAULT_MEMO_LIMIT, filter: filters.length > 0 ? filters.join(" && ") : undefined, }); setFetchedMemos(memos); diff --git a/web/src/components/MemoContent/EmbeddedContent/EmbeddedMemo.tsx b/web/src/components/MemoContent/EmbeddedContent/EmbeddedMemo.tsx index 365ebb8b..ac6618eb 100644 --- a/web/src/components/MemoContent/EmbeddedContent/EmbeddedMemo.tsx +++ b/web/src/components/MemoContent/EmbeddedContent/EmbeddedMemo.tsx @@ -49,11 +49,11 @@ const EmbeddedMemo = ({ resourceId, params: paramsStr }: Props) => { } return ( -
-
+
+
{getDateTimeString(memo.displayTime)} - +