mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: tweak embedded memo style
This commit is contained in:
@ -3,6 +3,7 @@ import React, { useState } from "react";
|
|||||||
import { toast } from "react-hot-toast";
|
import { toast } from "react-hot-toast";
|
||||||
import useDebounce from "react-use/lib/useDebounce";
|
import useDebounce from "react-use/lib/useDebounce";
|
||||||
import { memoServiceClient } from "@/grpcweb";
|
import { memoServiceClient } from "@/grpcweb";
|
||||||
|
import { DEFAULT_MEMO_LIMIT } from "@/helpers/consts";
|
||||||
import { getDateTimeString } from "@/helpers/datetime";
|
import { getDateTimeString } from "@/helpers/datetime";
|
||||||
import useCurrentUser from "@/hooks/useCurrentUser";
|
import useCurrentUser from "@/hooks/useCurrentUser";
|
||||||
import { Memo } from "@/types/proto/api/v2/memo_service";
|
import { Memo } from "@/types/proto/api/v2/memo_service";
|
||||||
@ -34,7 +35,7 @@ const CreateMemoRelationDialog: React.FC<Props> = (props: Props) => {
|
|||||||
filters.push(`content_search == [${JSON.stringify(searchText)}]`);
|
filters.push(`content_search == [${JSON.stringify(searchText)}]`);
|
||||||
}
|
}
|
||||||
const { memos } = await memoServiceClient.listMemos({
|
const { memos } = await memoServiceClient.listMemos({
|
||||||
limit: 10,
|
limit: DEFAULT_MEMO_LIMIT,
|
||||||
filter: filters.length > 0 ? filters.join(" && ") : undefined,
|
filter: filters.length > 0 ? filters.join(" && ") : undefined,
|
||||||
});
|
});
|
||||||
setFetchedMemos(memos);
|
setFetchedMemos(memos);
|
||||||
|
@ -49,11 +49,11 @@ const EmbeddedMemo = ({ resourceId, params: paramsStr }: Props) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="relative flex flex-col justify-start items-start w-full p-4 pt-3 mb-2 bg-white dark:bg-zinc-800 rounded-lg border border-gray-200 dark:border-zinc-700">
|
<div className="relative flex flex-col justify-start items-start w-full p-4 pt-3 !my-2 bg-white dark:bg-zinc-800 rounded-lg border border-gray-200 dark:border-zinc-700 hover:shadow">
|
||||||
<div className="w-full flex flex-row justify-between items-center">
|
<div className="w-full mb-1 flex flex-row justify-between items-center">
|
||||||
<span className="text-sm text-gray-400 select-none">{getDateTimeString(memo.displayTime)}</span>
|
<span className="text-sm text-gray-400 select-none">{getDateTimeString(memo.displayTime)}</span>
|
||||||
<Link className="hover:opacity-80" to={`/m/${memo.name}`} unstable_viewTransition>
|
<Link className="hover:opacity-80" to={`/m/${memo.name}`} unstable_viewTransition>
|
||||||
<Icon.ExternalLink className="w-4 h-auto opacity-80" />
|
<Icon.ArrowUpRight className="w-5 h-auto opacity-80 text-gray-400" />
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
<MemoContent nodes={memo.nodes} memoId={memo.id} embeddedMemos={context.embeddedMemos} />
|
<MemoContent nodes={memo.nodes} memoId={memo.id} embeddedMemos={context.embeddedMemos} />
|
||||||
|
Reference in New Issue
Block a user