Skip to content

Commit 6b682be

Browse files
committed
fix(comment): fix comments
1 parent f6459d7 commit 6b682be

File tree

18 files changed

+95
-56
lines changed

18 files changed

+95
-56
lines changed

src/components/attributes/index.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ export default function Attributes(props: IProps) {
3333
resourceId={resource.id}
3434
namespaceId={namespaceId}
3535
/>
36-
<div className="flex items-center gap-3">
37-
<Link className="size-4 text-muted-foreground" />
36+
<div className="flex flex-wrap sm:flex-nowrap items-start gap-3">
37+
<Link className="shrink-0 size-4 text-muted-foreground" />
3838
<span className="text-muted-foreground font-medium min-w-[80px]">
3939
{t('resource.attrs.url')}
4040
</span>
4141
<a
4242
target="_blank"
4343
href={resource.attrs.url}
44-
className="text-base text-foreground"
44+
className="text-base break-all text-foreground truncate"
4545
>
4646
{resource.attrs.url}
4747
</a>
@@ -58,7 +58,7 @@ export default function Attributes(props: IProps) {
5858
</div>
5959
)} */}
6060
{resource.created_at && (
61-
<div className="flex items-center gap-3">
61+
<div className="flex flex-wrap sm:flex-nowrap items-center gap-3">
6262
<Clock className="size-4 text-muted-foreground" />
6363
<span className="text-muted-foreground font-medium min-w-[80px]">
6464
{t('resource.attrs.created')}
@@ -90,7 +90,7 @@ export default function Attributes(props: IProps) {
9090
resourceId={resource.id}
9191
namespaceId={namespaceId}
9292
/>
93-
<div className="flex items-center gap-3">
93+
<div className="flex flex-wrap sm:flex-nowrap items-center gap-3">
9494
<File className="size-4 text-muted-foreground" />
9595
<span className="text-muted-foreground font-medium min-w-[80px]">
9696
{t('resource.attrs.filename')}
@@ -131,7 +131,7 @@ export default function Attributes(props: IProps) {
131131
</Button>
132132
</div>
133133
{resource.created_at && (
134-
<div className="flex items-center gap-3">
134+
<div className="flex flex-wrap sm:flex-nowrap items-center gap-3">
135135
<Clock className="size-4 text-muted-foreground" />
136136
<span className="text-muted-foreground font-medium min-w-[80px]">
137137
{t('resource.attrs.created')}
@@ -174,7 +174,7 @@ export default function Attributes(props: IProps) {
174174
</div>
175175
)} */}
176176
{resource.created_at && (
177-
<div className="flex items-center gap-3">
177+
<div className="flex flex-wrap sm:flex-nowrap items-center gap-3">
178178
<Clock className="size-4 text-muted-foreground" />
179179
<span className="text-muted-foreground font-medium min-w-[80px]">
180180
{t('resource.attrs.created')}

src/components/attributes/metadata.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ export function Metadata({ metadata }: { metadata: Record<string, any> }) {
44
return (
55
<>
66
{Object.entries(metadata).map(([key, value]) => (
7-
<div key={key} className="flex items-center gap-3">
7+
<div key={key} className="flex items-start gap-3">
88
<Text className="size-4 text-muted-foreground" />
99
<span className="text-muted-foreground font-medium min-w-[80px]">
1010
{key}
1111
</span>
12-
<span className="text-foreground">{String(value)}</span>
12+
<span className="text-foreground break-all">{String(value)}</span>
1313
</div>
1414
))}
1515
</>

src/components/tags/tags.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export default function Tags(props: IProps) {
5858
}, [data]);
5959

6060
return (
61-
<div className="flex items-center gap-3">
61+
<div className="flex flex-wrap sm:flex-nowrap items-center gap-3">
6262
<TagsIcon className="size-4 text-muted-foreground" />
6363
<span className="text-muted-foreground font-medium min-w-[80px]">
6464
{t('resource.attrs.tag')}
@@ -68,7 +68,7 @@ export default function Tags(props: IProps) {
6868
<LoaderCircle className="transition-transform animate-spin" />
6969
</span>
7070
) : (
71-
<span className="flex items-center text-foreground h-7">
71+
<span className="flex flex-wrap items-center text-foreground h-7">
7272
{editing ? (
7373
<MultipleSelector
7474
creatable
@@ -91,7 +91,7 @@ export default function Tags(props: IProps) {
9191
) : (
9292
<Space
9393
onClick={enterEdit}
94-
className="min-h-6 min-w-96 cursor-pointer"
94+
className="flex-wrap min-h-6 cursor-pointer"
9595
>
9696
{tags.length > 0 ? (
9797
tags.map(tag => <Badge key={tag.value}>{tag.label}</Badge>)

src/i18n/locales/en.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,5 +484,12 @@
484484
"save": "Save",
485485
"discard": "Discard"
486486
}
487+
},
488+
"footer": {
489+
"docs": "Docs",
490+
"discord": "Discord",
491+
"wechat": "QR Code",
492+
"feedback": "Feedback",
493+
"join": "We sincerely invite you to join the seed group"
487494
}
488495
}

src/i18n/locales/zh.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,5 +484,12 @@
484484
"save": "保存",
485485
"discard": "放弃"
486486
}
487+
},
488+
"footer": {
489+
"docs": "帮助文档",
490+
"discord": "Discord",
491+
"wechat": "二维码",
492+
"feedback": "意见反馈",
493+
"join": "诚邀您加入种子群"
487494
}
488495
}

src/index.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
--chart-4: 43 74% 66%;
3030
--chart-5: 27 87% 67%;
3131
--radius: 0.5rem;
32-
--sidebar-background: 270 10% 96%;
32+
--sidebar-background: 240 24% 96%;
3333
--sidebar-foreground: 0 0% 9%;
3434
--sidebar-primary: 240 5.9% 10%;
3535
--sidebar-primary-foreground: 0 0% 98%;
@@ -96,6 +96,10 @@
9696
}
9797
}
9898

99+
body {
100+
background: hsl(var(--sidebar-background));
101+
}
102+
99103
.reset-list ol {
100104
list-style: decimal;
101105
}

src/page/chat/header/actions.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export default function Actions(props: IProps) {
126126
<Button
127127
variant="ghost"
128128
size="sm"
129-
className="text-[#585D65] size-[28px]"
129+
className="text-[#585D65] size-[28px] dark:text-white"
130130
onClick={onChatHistory}
131131
>
132132
<History />

src/page/chat/header/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default function ChatHeader() {
1919
const app = useApp();
2020
const loc = useLocation();
2121
const params = useParams();
22-
const { open } = useSidebar();
22+
const { open, isMobile } = useSidebar();
2323
const modified = useRef(false);
2424
const { t } = useTranslation();
2525
const i18nTitle = t('chat.conversations.new');
@@ -89,9 +89,9 @@ export default function ChatHeader() {
8989
}, [data, conversationsPage]);
9090

9191
return (
92-
<header className="rounded-[16px] sticky z-[30] top-0 bg-white flex h-12 shrink-0 items-center gap-2 dark:bg-background">
92+
<header className="rounded-[16px] sticky z-[30] top-0 bg-white flex flex-wrap min-h-12 shrink-0 items-center gap-2 dark:bg-background">
9393
<div className="flex flex-1 items-center gap-1 px-3 sm:gap-2">
94-
{!open && <SidebarTrigger className="text-[#8F959E]" />}
94+
{(!open || isMobile) && <SidebarTrigger className="text-[#8F959E]" />}
9595
{conversationId && (
9696
<Breadcrumb>
9797
<BreadcrumbList>

src/page/chat/home.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export default function ChatHomePage() {
4848
<div className="flex justify-center h-full p-4">
4949
<div className="flex flex-col h-full max-w-3xl w-full">
5050
<div className="flex flex-col justify-center h-full mb-40">
51-
<h1 className="text-[28px] text-[#171717] text-center mb-[32px] font-medium">
51+
<h1 className="text-[28px] text-[#171717] text-center mb-[32px] font-medium dark:text-white">
5252
<Typewriter text={t(i18n)} typeSpeed={32} />
5353
</h1>
5454
<ChatArea

src/page/chat/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import Page from './page';
55

66
export default function Chat() {
77
return (
8-
<SidebarInset className="m-[8px] bg-white rounded-[16px]">
8+
<SidebarInset className="m-[8px] bg-white rounded-[16px] dark:bg-background">
99
<Header />
1010
<Page />
1111
</SidebarInset>

0 commit comments

Comments
 (0)