Skip to content

Commit 183bfcd

Browse files
committed
refactor(i18n): remove flags from language selector; thinking tweaks
1 parent 782f436 commit 183bfcd

File tree

3 files changed

+4
-30
lines changed

3 files changed

+4
-30
lines changed

frontend/src/components/common/LanguageSwitcher.tsx

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from "react";
2-
import { ChevronDownIcon, GlobeIcon, CheckIcon } from "lucide-react";
2+
import { ChevronDownIcon, CheckIcon } from "lucide-react";
33
import {
44
DropdownMenu,
55
DropdownMenuContent,
@@ -14,34 +14,29 @@ export interface LanguageOption {
1414
code: SupportedLanguage;
1515
name: string;
1616
nativeName: string;
17-
flag: string;
1817
}
1918

2019
const SUPPORTED_LANGUAGES: LanguageOption[] = [
2120
{
2221
code: "en",
2322
name: "English",
2423
nativeName: "English",
25-
flag: "🇺🇸",
2624
},
2725
{
2826
code: "zh-CN",
2927
name: "Simplified Chinese",
3028
nativeName: "简体中文",
31-
flag: "🇨🇳",
3229
},
3330
{
3431
code: "zh-TW",
3532
name: "Traditional Chinese",
3633
nativeName: "繁體中文",
37-
flag: "🇹🇼",
3834
},
3935
];
4036

4137
interface LanguageSwitcherProps {
4238
variant?: "default" | "outline" | "ghost" | "secondary";
4339
size?: "default" | "sm" | "lg" | "icon";
44-
showFlag?: boolean;
4540
showText?: boolean;
4641
showChevron?: boolean;
4742
className?: string;
@@ -50,7 +45,6 @@ interface LanguageSwitcherProps {
5045
export const LanguageSwitcher: React.FC<LanguageSwitcherProps> = ({
5146
variant = "ghost",
5247
size = "default",
53-
showFlag = true,
5448
showText = true,
5549
showChevron = true,
5650
className,
@@ -88,16 +82,6 @@ export const LanguageSwitcher: React.FC<LanguageSwitcherProps> = ({
8882
title={currentLang ? currentLang.nativeName : "Language"}
8983
aria-label="Language switcher"
9084
>
91-
{!showFlag && <GlobeIcon className="h-4 w-4" />}
92-
{showFlag && (
93-
<span
94-
className="text-base leading-none"
95-
role="img"
96-
aria-label={`${currentLang.nativeName} flag`}
97-
>
98-
{currentLang.flag}
99-
</span>
100-
)}
10185
{showText && size !== "icon" && (
10286
<span className="text-sm font-medium hidden sm:inline-block">
10387
{currentLang.nativeName}
@@ -134,13 +118,6 @@ export const LanguageSwitcher: React.FC<LanguageSwitcherProps> = ({
134118
isSelected && "bg-accent/60 text-accent-foreground"
135119
)}
136120
>
137-
<span
138-
className="text-lg flex-shrink-0"
139-
role="img"
140-
aria-label={`${language.nativeName} flag`}
141-
>
142-
{language.flag}
143-
</span>
144121
<div className="flex flex-col flex-1 gap-0.5">
145122
<span
146123
className={cn(

frontend/src/components/conversation/ConversationList.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,19 +207,16 @@ export function ConversationList({
207207
<SelectContent>
208208
<SelectItem value="en">
209209
<div className="flex items-center gap-2">
210-
<span>🇺🇸</span>
211210
<span>English</span>
212211
</div>
213212
</SelectItem>
214213
<SelectItem value="zh-CN">
215214
<div className="flex items-center gap-2">
216-
<span>🇨🇳</span>
217215
<span>简体中文</span>
218216
</div>
219217
</SelectItem>
220218
<SelectItem value="zh-TW">
221219
<div className="flex items-center gap-2">
222-
<span>🇹🇼</span>
223220
<span>繁體中文</span>
224221
</div>
225222
</SelectItem>

frontend/src/components/conversation/ThinkingBlock.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ export function ThinkingBlock({ thinking }: ThinkingBlockProps) {
1717
}
1818

1919
return (
20-
<div className="mb-3 border border-border rounded-lg bg-muted/50">
20+
<div className="border border-border rounded-md bg-muted/50">
2121
<button
2222
onClick={() => setIsExpanded(!isExpanded)}
23-
className="w-full flex items-center justify-between p-3 text-left hover:bg-muted/70 rounded-lg transition-colors"
23+
className="w-full flex items-center justify-between p-1 px-2 text-left hover:bg-muted/70 transition-colors"
2424
>
2525
<div className="flex items-center gap-2 text-sm font-medium text-muted-foreground">
2626
<Brain className="w-4 h-4" />
@@ -34,7 +34,7 @@ export function ThinkingBlock({ thinking }: ThinkingBlockProps) {
3434
</button>
3535

3636
{isExpanded && (
37-
<div className="px-3 pb-3 border-t border-border mt-2 pt-3">
37+
<div className="px-3 pb-3 border-t border-border">
3838
<div className="prose prose-sm max-w-none dark:prose-invert text-xs text-muted-foreground">
3939
<ReactMarkdown remarkPlugins={[remarkGfm]}>
4040
{thinking}

0 commit comments

Comments
 (0)