博客评论添加ip及地址
This commit is contained in:
@@ -9,11 +9,11 @@ export class BlogComment {
|
|||||||
@Column()
|
@Column()
|
||||||
content: string;
|
content: string;
|
||||||
|
|
||||||
// @Column()
|
@Column()
|
||||||
// ip: string;
|
ip: string;
|
||||||
|
|
||||||
// @Column()
|
@Column()
|
||||||
// address: string;
|
address: string;
|
||||||
|
|
||||||
@CreateDateColumn({ precision: 3 })
|
@CreateDateColumn({ precision: 3 })
|
||||||
createdAt: Date;
|
createdAt: Date;
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ export function BlogComments({ blogId }: { blogId: string }) {
|
|||||||
<div className="whitespace-pre-wrap break-all">{d.content}</div>
|
<div className="whitespace-pre-wrap break-all">{d.content}</div>
|
||||||
<div className="text-xs text-zinc-500 flex gap-2">
|
<div className="text-xs text-zinc-500 flex gap-2">
|
||||||
<p>{new Date(d.createdAt).toLocaleString()}</p>
|
<p>{new Date(d.createdAt).toLocaleString()}</p>
|
||||||
<p>未知</p>
|
<p>{d.address}</p>
|
||||||
<p className="text-zinc-900 cursor-pointer" onClick={() => setReplayTarget(d)}>回复</p>
|
<p className="text-zinc-900 cursor-pointer" onClick={() => setReplayTarget(d)}>回复</p>
|
||||||
</div>
|
</div>
|
||||||
{
|
{
|
||||||
@@ -54,7 +54,7 @@ export function BlogComments({ blogId }: { blogId: string }) {
|
|||||||
<div className="whitespace-pre-wrap break-all">{c.content}</div>
|
<div className="whitespace-pre-wrap break-all">{c.content}</div>
|
||||||
<div className="text-xs text-zinc-500 flex gap-2">
|
<div className="text-xs text-zinc-500 flex gap-2">
|
||||||
<p>{new Date().toLocaleString()}</p>
|
<p>{new Date().toLocaleString()}</p>
|
||||||
<p>未知</p>
|
<p>{c.address}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
))
|
))
|
||||||
|
|||||||
@@ -8,4 +8,5 @@ export interface BlogComment {
|
|||||||
deletedAt: string | null;
|
deletedAt: string | null;
|
||||||
parentId: string | null;
|
parentId: string | null;
|
||||||
user: User | null;
|
user: User | null;
|
||||||
|
address: string;
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user