feat: prepare Zhinian desktop pilot
This commit is contained in:
@@ -62,9 +62,9 @@ interface ChannelConfigModalProps {
|
||||
onChannelSaved?: (channelType: ChannelType) => void | Promise<void>;
|
||||
}
|
||||
|
||||
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 inputClasses = 'h-[44px] rounded-lg font-mono text-[13px] bg-white/70 dark:bg-muted border-slate-200/80 dark:border-white/10 focus-visible:ring-2 focus-visible:ring-[#0369A1]/25 focus-visible:border-[#0369A1] 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 outlineButtonClasses = 'h-9 rounded-lg px-4 text-[13px] font-medium border-slate-200/80 dark:border-white/10 bg-white/60 hover:bg-white dark:bg-white/5 dark:hover:bg-white/10 shadow-none text-foreground/80 hover:text-foreground';
|
||||
const primaryButtonClasses = 'h-9 text-[13px] font-medium rounded-full px-4 shadow-none';
|
||||
|
||||
export function ChannelConfigModal({
|
||||
@@ -486,7 +486,7 @@ export function ChannelConfigModal({
|
||||
}}
|
||||
>
|
||||
<Card
|
||||
className="w-full max-w-3xl max-h-[90vh] flex flex-col rounded-3xl border-0 shadow-2xl bg-[#f3f1e9] dark:bg-card overflow-hidden"
|
||||
className="flex max-h-[90vh] w-full max-w-3xl flex-col overflow-hidden rounded-lg border border-slate-200/80 bg-white/95 shadow-[0_18px_48px_rgba(15,23,42,0.14)] backdrop-blur dark:border-white/10 dark:bg-card"
|
||||
onMouseDown={(event) => event.stopPropagation()}
|
||||
onClick={(event) => event.stopPropagation()}
|
||||
>
|
||||
@@ -525,13 +525,13 @@ 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-muted shadow-sm',
|
||||
'group relative flex items-start gap-4 overflow-hidden rounded-lg border bg-white/60 p-4 text-left shadow-sm transition-all dark:bg-muted',
|
||||
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'
|
||||
)}
|
||||
>
|
||||
<div className="h-[46px] w-[46px] shrink-0 flex items-center justify-center text-foreground bg-black/5 dark:bg-white/5 border border-black/5 dark:border-white/10 rounded-full shadow-sm">
|
||||
<div className="flex h-[46px] w-[46px] shrink-0 items-center justify-center rounded-lg border border-[#D5E8F3]/80 bg-[#EAF5FA] text-foreground shadow-sm dark:border-white/10 dark:bg-white/5">
|
||||
<ChannelLogo type={type} />
|
||||
</div>
|
||||
<div className="flex flex-col flex-1 min-w-0 py-0.5 mt-1">
|
||||
@@ -564,7 +564,7 @@ export function ChannelConfigModal({
|
||||
</div>
|
||||
) : qrCode ? (
|
||||
<div className="text-center space-y-6">
|
||||
<div className="bg-[#eeece3] dark:bg-muted p-4 rounded-3xl inline-block shadow-sm border border-black/10 dark:border-white/10">
|
||||
<div className="inline-block rounded-lg border border-slate-200/80 bg-white/70 p-4 shadow-sm dark:border-white/10 dark:bg-muted">
|
||||
{qrCode.startsWith('data:image') || qrCode.startsWith('http://') || qrCode.startsWith('https://') ? (
|
||||
<img src={qrCode} alt="Scan QR Code" className="w-64 h-64 object-contain rounded-2xl" />
|
||||
) : (
|
||||
@@ -590,7 +590,7 @@ export function ChannelConfigModal({
|
||||
</div>
|
||||
</div>
|
||||
) : loadingConfig ? (
|
||||
<div className="flex items-center justify-center py-10 rounded-2xl bg-[#eeece3] dark:bg-muted border border-black/10 dark:border-white/10">
|
||||
<div className="flex items-center justify-center rounded-lg border border-slate-200/80 bg-white/70 py-10 dark:border-white/10 dark:bg-muted">
|
||||
<Loader2 className="h-6 w-6 animate-spin text-muted-foreground" />
|
||||
<span className="ml-2 text-[14px] text-muted-foreground">{t('dialog.loadingConfig')}</span>
|
||||
</div>
|
||||
@@ -603,7 +603,7 @@ export function ChannelConfigModal({
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className="bg-[#eeece3] dark:bg-muted p-4 rounded-2xl space-y-4 shadow-sm border border-black/10 dark:border-white/10">
|
||||
<div className="space-y-4 rounded-lg border border-slate-200/80 bg-white/70 p-4 shadow-sm dark:border-white/10 dark:bg-muted">
|
||||
<div className="flex items-center justify-between gap-3">
|
||||
<div>
|
||||
<p className={labelClasses}>{t('dialog.howToConnect')}</p>
|
||||
@@ -837,7 +837,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-muted border-black/10 dark:border-white/10 text-muted-foreground hover:text-foreground shrink-0 shadow-sm"
|
||||
className="h-[44px] w-[44px] shrink-0 rounded-lg border-slate-200/80 bg-white/70 text-muted-foreground shadow-sm hover:text-foreground dark:border-white/10 dark:bg-muted"
|
||||
>
|
||||
{showSecret ? <EyeOff className="h-4 w-4" /> : <Eye className="h-4 w-4" />}
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user