|
1 | 1 | import { Button } from "@/components/ui/button"; |
| 2 | +import { Card } from "@/components/ui/card"; |
2 | 3 | import { ContextMenu, ContextMenuContent, ContextMenuItem, ContextMenuTrigger } from "@/components/ui/context-menu"; |
3 | 4 | import { Dialog } from "@/components/ui/dialog"; |
4 | 5 | import { Popover } from "@/components/ui/popover"; |
@@ -43,7 +44,7 @@ export default function AttachmentsWindow() { |
43 | 44 | }, [attachments]); |
44 | 45 |
|
45 | 46 | return ( |
46 | | - <div className="bg-background flex flex-col gap-2 p-2"> |
| 47 | + <div className="flex flex-col gap-2 p-2"> |
47 | 48 | <div className="flex gap-3"> |
48 | 49 | <Button |
49 | 50 | onClick={async () => { |
@@ -99,24 +100,24 @@ export default function AttachmentsWindow() { |
99 | 100 | </div> |
100 | 101 |
|
101 | 102 | {/* 一个又一个的附件展示 */} |
102 | | - <div className="flex flex-wrap gap-1"> |
| 103 | + <div className="flex flex-wrap gap-2"> |
103 | 104 | {attachments.entries().map(([id, blob]) => ( |
104 | 105 | <ContextMenu key={id}> |
105 | 106 | {/* 非右键的直接展示部分 */} |
106 | 107 | <ContextMenuTrigger> |
107 | | - <div className="bg-card hover:bg-primary text-primary hover:text-primary-foreground flex flex-col gap-2 rounded-sm p-1 transition-colors hover:ring"> |
| 108 | + <Card className="gap-2 p-2"> |
108 | 109 | {/* <Separator /> */} |
109 | 110 | {blob.type.startsWith("image") && ( |
110 | | - <img src={urls.get(id)} alt={id} className="max-h-12 max-w-full object-contain" /> |
| 111 | + <img src={urls.get(id)} alt={id} className="max-w-full rounded-lg object-contain" /> |
111 | 112 | )} |
112 | 113 | <div className="flex flex-col gap-0.5"> |
113 | | - <span className="text-[6px] opacity-50">{id}</span> |
114 | | - <div className="flex flex-wrap gap-x-2 text-xs"> |
| 114 | + <span className="text-[8px] opacity-50">{id}</span> |
| 115 | + <div className="flex flex-wrap gap-x-2 text-sm"> |
115 | 116 | <span>{blob.type}</span> |
116 | 117 | <span>{formatBytes(blob.size)}</span> |
117 | 118 | </div> |
118 | 119 | </div> |
119 | | - </div> |
| 120 | + </Card> |
120 | 121 | </ContextMenuTrigger> |
121 | 122 |
|
122 | 123 | {/* 右键内容 */} |
|
0 commit comments