From a575977e3cecd05e1e53eff46a07b4ba7e0771b8 Mon Sep 17 00:00:00 2001 From: Haze <709547807@qq.com> Date: Wed, 11 Mar 2026 15:37:16 +0800 Subject: [PATCH] chore(apparence): opt clawx apparence and i18n settings (#410) --- .../channels/ChannelConfigModal.tsx | 14 +++--- src/components/layout/Sidebar.tsx | 2 +- src/components/settings/ProvidersSettings.tsx | 48 +++++++++---------- src/i18n/locales/en/channels.json | 3 +- src/i18n/locales/en/dashboard.json | 2 +- src/i18n/locales/ja/agents.json | 2 +- src/i18n/locales/ja/channels.json | 5 +- src/i18n/locales/ja/dashboard.json | 4 +- src/i18n/locales/zh/agents.json | 24 +++++----- src/i18n/locales/zh/channels.json | 5 +- src/i18n/locales/zh/dashboard.json | 4 +- src/pages/Agents/index.tsx | 10 ++-- src/pages/Channels/index.tsx | 2 +- src/pages/Chat/ChatInput.tsx | 4 +- src/pages/Cron/index.tsx | 18 +++---- src/pages/Models/index.tsx | 2 +- src/pages/Settings/index.tsx | 20 ++++---- src/pages/Skills/index.tsx | 16 +++---- src/styles/globals.css | 37 +++++++------- src/types/channel.ts | 1 - 20 files changed, 110 insertions(+), 113 deletions(-) diff --git a/src/components/channels/ChannelConfigModal.tsx b/src/components/channels/ChannelConfigModal.tsx index 04c5451a4..1b9e9d34a 100644 --- a/src/components/channels/ChannelConfigModal.tsx +++ b/src/components/channels/ChannelConfigModal.tsx @@ -51,7 +51,7 @@ interface ChannelConfigModalProps { onChannelSaved?: (channelType: ChannelType) => void | Promise; } -const inputClasses = 'h-[44px] rounded-xl font-mono text-[13px] bg-[#eeece3] dark:bg-[#151514] border-black/10 dark:border-white/10 focus-visible:ring-2 focus-visible:ring-blue-500/50 focus-visible:border-blue-500 shadow-sm transition-all text-foreground placeholder:text-foreground/40'; +const inputClasses = 'h-[44px] rounded-xl font-mono text-[13px] bg-[#eeece3] dark:bg-muted border-black/10 dark:border-white/10 focus-visible:ring-2 focus-visible:ring-blue-500/50 focus-visible:border-blue-500 shadow-sm transition-all text-foreground placeholder:text-foreground/40'; const labelClasses = 'text-[14px] text-foreground/80 font-bold'; const outlineButtonClasses = 'h-9 text-[13px] font-medium rounded-full px-4 border-black/10 dark:border-white/10 bg-transparent hover:bg-black/5 dark:hover:bg-white/5 shadow-none text-foreground/80 hover:text-foreground'; const primaryButtonClasses = 'h-9 text-[13px] font-medium rounded-full px-4 shadow-none'; @@ -371,7 +371,7 @@ export function ChannelConfigModal({ return (
event.stopPropagation()} > @@ -409,7 +409,7 @@ export function ChannelConfigModal({ key={type} onClick={() => setSelectedType(type)} className={cn( - 'group flex items-start gap-4 p-4 rounded-2xl transition-all text-left border relative overflow-hidden bg-[#eeece3] dark:bg-[#151514] shadow-sm', + 'group flex items-start gap-4 p-4 rounded-2xl transition-all text-left border relative overflow-hidden bg-[#eeece3] dark:bg-muted shadow-sm', isConfigured ? 'border-green-500/40 bg-green-500/5 dark:bg-green-500/10' : 'border-black/5 dark:border-white/10 hover:bg-black/5 dark:hover:bg-white/5' @@ -448,7 +448,7 @@ export function ChannelConfigModal({
) : qrCode ? (
-
+
{qrCode.startsWith('data:image') ? ( Scan QR Code ) : ( @@ -474,7 +474,7 @@ export function ChannelConfigModal({
) : loadingConfig ? ( -
+
{t('dialog.loadingConfig')}
@@ -487,7 +487,7 @@ export function ChannelConfigModal({
)} -
+

{t('dialog.howToConnect')}

@@ -696,7 +696,7 @@ function ConfigField({ field, value, onChange, showSecret, onToggleSecret }: Con variant="outline" size="icon" onClick={onToggleSecret} - className="h-[44px] w-[44px] rounded-xl bg-[#eeece3] dark:bg-[#151514] border-black/10 dark:border-white/10 text-muted-foreground hover:text-foreground shrink-0 shadow-sm" + className="h-[44px] w-[44px] rounded-xl bg-[#eeece3] dark:bg-muted border-black/10 dark:border-white/10 text-muted-foreground hover:text-foreground shrink-0 shadow-sm" > {showSecret ? : } diff --git a/src/components/layout/Sidebar.tsx b/src/components/layout/Sidebar.tsx index 607de237c..907929c87 100644 --- a/src/components/layout/Sidebar.tsx +++ b/src/components/layout/Sidebar.tsx @@ -254,7 +254,7 @@ export function Sidebar() { }} className={cn( 'flex w-full items-center gap-2.5 rounded-lg px-2.5 py-2 text-[14px] font-medium transition-colors mb-2', - 'bg-white dark:bg-accent shadow-sm border border-black/5 dark:border-white/10 text-foreground', + 'bg-black/5 dark:bg-accent shadow-none border border-transparent text-foreground', sidebarCollapsed && 'justify-center px-0', )} > diff --git a/src/components/settings/ProvidersSettings.tsx b/src/components/settings/ProvidersSettings.tsx index 7509600e1..9f66a415d 100644 --- a/src/components/settings/ProvidersSettings.tsx +++ b/src/components/settings/ProvidersSettings.tsx @@ -52,7 +52,7 @@ import { useSettingsStore } from '@/stores/settings'; import { hostApiFetch } from '@/lib/host-api'; import { subscribeHostEvent } from '@/lib/host-events'; -const inputClasses = 'h-[44px] rounded-xl font-mono text-[13px] bg-[#eeece3] dark:bg-[#151514] border-black/10 dark:border-white/10 focus-visible:ring-2 focus-visible:ring-blue-500/50 focus-visible:border-blue-500 shadow-sm transition-all text-foreground placeholder:text-foreground/40'; +const inputClasses = 'h-[44px] rounded-xl font-mono text-[13px] bg-[#eeece3] dark:bg-muted border-black/10 dark:border-white/10 focus-visible:ring-2 focus-visible:ring-blue-500/50 focus-visible:border-blue-500 shadow-sm transition-all text-foreground placeholder:text-foreground/40'; const labelClasses = 'text-[14px] text-foreground/80 font-bold'; function normalizeFallbackProviderIds(ids?: string[]): string[] { @@ -184,7 +184,7 @@ export function ProvidersSettings() {

{t('aiProviders.title', 'AI Providers')}

- @@ -407,7 +407,7 @@ function ProviderCard({ }; const currentInputClasses = isDefault - ? "h-[40px] rounded-xl font-mono text-[13px] bg-white dark:bg-[#1a1a19] border-black/10 dark:border-white/10 focus-visible:ring-2 focus-visible:ring-blue-500/50 shadow-sm" + ? "h-[40px] rounded-xl font-mono text-[13px] bg-white dark:bg-card border-black/10 dark:border-white/10 focus-visible:ring-2 focus-visible:ring-blue-500/50 shadow-sm" : inputClasses; const currentLabelClasses = isDefault ? "text-[13px] text-muted-foreground" : labelClasses; @@ -419,12 +419,12 @@ function ProviderCard({ "group flex flex-col p-4 rounded-2xl transition-all relative overflow-hidden hover:bg-black/5 dark:hover:bg-white/5", isDefault ? "bg-black/[0.04] dark:bg-white/[0.06] border border-transparent" - : "bg-transparent border border-black/10 dark:border-white/10" + : "bg-transparent border border-transparent" )} >
-
+
{getProviderIconUrl(account.vendorId) ? ( {typeInfo?.name ) : ( @@ -482,7 +482,7 @@ function ProviderCard({ @@ -578,8 +578,8 @@ function ProviderCard({ onChange={(e) => setFallbackModelsText(e.target.value)} placeholder={t('aiProviders.dialog.fallbackModelIdsPlaceholder')} className={isDefault - ? "min-h-24 w-full rounded-xl border border-black/10 dark:border-white/10 bg-white dark:bg-[#1a1a19] px-3 py-2 text-[13px] font-mono outline-none focus-visible:ring-2 focus-visible:ring-blue-500/50 shadow-sm" - : "min-h-24 w-full rounded-xl border border-black/10 dark:border-white/10 bg-[#eeece3] dark:bg-[#151514] px-3 py-2 text-[13px] font-mono outline-none focus-visible:ring-2 focus-visible:ring-blue-500/50 focus-visible:border-blue-500 shadow-sm transition-all text-foreground placeholder:text-foreground/40"} + ? "min-h-24 w-full rounded-xl border border-black/10 dark:border-white/10 bg-white dark:bg-card px-3 py-2 text-[13px] font-mono outline-none focus-visible:ring-2 focus-visible:ring-blue-500/50 shadow-sm" + : "min-h-24 w-full rounded-xl border border-black/10 dark:border-white/10 bg-[#eeece3] dark:bg-muted px-3 py-2 text-[13px] font-mono outline-none focus-visible:ring-2 focus-visible:ring-blue-500/50 focus-visible:border-blue-500 shadow-sm transition-all text-foreground placeholder:text-foreground/40"} />

{t('aiProviders.dialog.fallbackModelIdsHelp')} @@ -590,7 +590,7 @@ function ProviderCard({ {fallbackOptions.length === 0 ? (

{t('aiProviders.dialog.noFallbackOptions')}

) : ( -
+
{fallbackOptions.map((candidate) => (