mirror of
https://github.com/YspCoder/clawgo.git
synced 2026-05-15 07:27:28 +08:00
feat(webui): refresh brand theme and add day-night mode
This commit is contained in:
@@ -34,12 +34,12 @@ export const GlobalDialog: React.FC<{
|
||||
{open && (
|
||||
<motion.div className="fixed inset-0 z-[130] bg-black/60 backdrop-blur-sm flex items-center justify-center p-4"
|
||||
initial={{ opacity: 0 }} animate={{ opacity: 1 }} exit={{ opacity: 0 }}>
|
||||
<motion.div className="w-full max-w-md rounded-2xl border border-zinc-700 bg-zinc-900 shadow-2xl"
|
||||
<motion.div className="brand-card w-full max-w-md rounded-[28px] border border-zinc-700 shadow-2xl"
|
||||
initial={{ scale: 0.95, y: 8 }} animate={{ scale: 1, y: 0 }} exit={{ scale: 0.95, y: 8 }}>
|
||||
<div className="px-5 py-4 border-b border-zinc-800">
|
||||
<div className="px-5 py-4 border-b border-zinc-800 relative z-[1]">
|
||||
<h3 className="text-sm font-semibold text-zinc-100">{options.title || (kind === 'confirm' ? t('dialogPleaseConfirm') : kind === 'prompt' ? t('dialogInputTitle') : t('dialogNotice'))}</h3>
|
||||
</div>
|
||||
<div className="px-5 py-4 space-y-3">
|
||||
<div className="px-5 py-4 space-y-3 relative z-[1]">
|
||||
<div className="text-sm text-zinc-300 whitespace-pre-wrap">{options.message}</div>
|
||||
{kind === 'prompt' && (
|
||||
<div className="space-y-2">
|
||||
@@ -54,16 +54,16 @@ export const GlobalDialog: React.FC<{
|
||||
}
|
||||
}}
|
||||
placeholder={options.inputPlaceholder || t('dialogInputPlaceholder')}
|
||||
className="w-full px-3 py-2 rounded-lg bg-zinc-950 border border-zinc-800 text-sm text-zinc-100"
|
||||
className="w-full px-3 py-2 rounded-xl bg-zinc-950/75 border border-zinc-800 text-sm text-zinc-100 focus:outline-none focus:border-indigo-500 focus:ring-2 focus:ring-indigo-500/20"
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<div className="px-5 pb-5 flex items-center justify-end gap-2">
|
||||
<div className="px-5 pb-5 flex items-center justify-end gap-2 relative z-[1]">
|
||||
{(kind === 'confirm' || kind === 'prompt') && (
|
||||
<button onClick={onCancel} className="px-3 py-1.5 rounded-lg bg-zinc-800 hover:bg-zinc-700 text-zinc-200 text-sm">{options.cancelText || t('cancel')}</button>
|
||||
<button onClick={onCancel} className="px-3 py-1.5 rounded-xl bg-zinc-800 hover:bg-zinc-700 text-zinc-200 text-sm">{options.cancelText || t('cancel')}</button>
|
||||
)}
|
||||
<button onClick={() => onConfirm(kind === 'prompt' ? value : undefined)} className={`px-3 py-1.5 rounded-lg text-sm ${options.danger ? 'bg-red-600 hover:bg-red-500 text-white' : 'bg-indigo-600 hover:bg-indigo-500 text-white'}`}>
|
||||
<button onClick={() => onConfirm(kind === 'prompt' ? value : undefined)} className={`px-3 py-1.5 rounded-xl text-sm ${options.danger ? 'bg-red-600 hover:bg-red-500 text-white' : 'brand-button text-white'}`}>
|
||||
{options.confirmText || t('dialogOk')}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user