Add white border to send button in dark theme

This commit is contained in:
Chris Scott committed 2025-12-21 17:18:44 -05:00
1 parent 8061437304
commit f433cb0c1a
3 files changed
+25 -23

No files matched your search

+17 -16
View File
@@ -473,7 +473,8 @@ export const PromptInput = forwardRef<PromptInputHandle, PromptInputProps>(funct
const currentMode = preferences?.mode || 'build'
const modeColor = currentMode === 'plan' ? 'text-yellow-600 dark:text-yellow-500' : 'text-green-600 dark:text-green-500'
const modeBg = currentMode === 'plan' ? 'bg-yellow-500/10 border-yellow-500/30' : 'bg-green-500/10 border-green-500/30'
const modeBg = currentMode === 'plan' ? 'bg-yellow-500/20 border-yellow-400 hover:bg-yellow-500/30 hover:border-yellow-300' : 'bg-green-500/20 border-green-400 hover:bg-green-500/30 hover:border-green-300'
const modeShadow = currentMode === 'plan' ? 'shadow-yellow-500/20 hover:shadow-yellow-500/30' : 'shadow-green-500/20 hover:shadow-green-500/30'
const { modelString } = useModelSelection(opcodeUrl, directory)
const currentModel = modelString || ''
@@ -519,13 +520,13 @@ export const PromptInput = forwardRef<PromptInputHandle, PromptInputProps>(funct
<div className="flex gap-1.5 md:gap-2 items-center justify-between">
<div className="flex gap-1.5 md:gap-2 items-center">
<button
<button
onClick={handleModeToggle}
className={`px-2 py-1 rounded-md text-xs font-medium border w-14 ${
className={`px-3 md:px-3.5 py-1.5 md:py-2 rounded-lg text-sm font-medium border w-14 flex items-center justify-center transition-all duration-200 active:scale-95 hover:scale-105 shadow-md ${
isBashMode
? 'bg-purple-500/10 border-purple-500/30 text-purple-600 dark:text-purple-400'
: `${modeBg} ${modeColor}`
} hover:opacity-80 transition-opacity cursor-pointer`}
? 'bg-purple-500/20 border-purple-400 text-purple-700 dark:text-purple-300 shadow-purple-500/20 hover:shadow-purple-500/30'
: `${modeBg} ${modeColor} ${modeShadow}`
}`}
>
{isBashMode ? 'BASH' : currentMode.toUpperCase()}
</button>
@@ -557,21 +558,21 @@ export const PromptInput = forwardRef<PromptInputHandle, PromptInputProps>(funct
<button
onClick={handleStop}
disabled={disabled}
className="p-1.5 px-4 md:p-2 rounded-lg transition-colors bg-destructive hover:bg-destructive/90 text-destructive-foreground"
className="p-1.5 px-4 md:p-2 rounded-lg transition-all duration-200 active:scale-95 hover:scale-105 bg-gradient-to-br from-red-600 to-red-700 hover:from-red-500 hover:to-red-600 text-destructive-foreground border border-red-500/60 hover:border-red-400 shadow-md shadow-red-500/30 hover:shadow-red-500/40 ring-1 ring-red-500/20 hover:ring-red-500/30"
title="Stop"
>
<Square className="w-4 h-4" />
</button>
)}
<button
data-submit-prompt
onClick={handleSubmit}
disabled={!prompt.trim() || disabled}
className="px-5 md:px-6 py-1.5 md:py-2 rounded-lg text-sm font-medium transition-colors bg-primary hover:bg-primary/90 disabled:bg-muted disabled:text-muted-foreground disabled:cursor-not-allowed text-primary-foreground"
title={hasActiveStream ? 'Queue message' : 'Send'}
>
{hasActiveStream ? 'Queue' : 'Send'}
</button>
<button
data-submit-prompt
onClick={handleSubmit}
disabled={!prompt.trim() || disabled}
className="px-5 md:px-6 py-1.5 md:py-2 rounded-lg text-sm font-medium transition-colors bg-primary hover:bg-primary/90 disabled:bg-muted disabled:text-muted-foreground disabled:cursor-not-allowed text-primary-foreground dark:border dark:border-white/30"
title={hasActiveStream ? 'Queue message' : 'Send'}
>
{hasActiveStream ? 'Queue' : 'Send'}
</button>
</div>
</div>
@@ -19,12 +19,12 @@ const variantConfig: Record<FloatingActionVariant, { icon: ReactNode; label: str
'clear': {
icon: <X className="w-5 h-5" />,
label: 'Clear',
colors: 'bg-muted hover:bg-destructive/20 text-muted-foreground hover:text-destructive border-border hover:border-destructive/50'
colors: 'bg-gradient-to-br from-red-600 to-red-700 hover:from-red-500 hover:to-red-600 border-2 border-red-500/60 hover:border-red-400 shadow-lg shadow-red-500/30 hover:shadow-red-500/50 ring-2 ring-red-500/20 hover:ring-red-500/40 text-destructive-foreground'
},
'stop-audio': {
icon: <VolumeX className="w-5 h-5" />,
label: 'Stop Audio',
colors: 'bg-destructive/90 hover:bg-destructive text-destructive-foreground border-destructive'
colors: 'bg-gradient-to-br from-red-700 to-red-800 hover:from-red-600 hover:to-red-700 border-2 border-red-600/80 hover:border-red-500 shadow-2xl shadow-red-600/40 hover:shadow-red-600/60 ring-2 ring-red-600/30 hover:ring-red-600/50 animate-[pulse_2s_cubic-bezier(0.4,0,0.6,1)_infinite] text-destructive-foreground',
},
'custom': {
icon: null,
@@ -61,12 +61,13 @@ export const FloatingActionButton = memo(function FloatingActionButton({
onClick={onClick}
disabled={loading}
className={cn(
'fixed z-50 flex items-center gap-2 px-4 py-3 rounded-full border shadow-lg backdrop-blur-sm transition-all duration-200',
'fixed z-50 flex items-center gap-2 px-4 py-2 rounded-full backdrop-blur-md transition-all duration-200',
'min-w-[48px] min-h-[48px]',
'active:scale-95',
'active:scale-95 hover:scale-105',
'transition-transform',
config.colors,
positionClasses[position],
loading && 'opacity-70 cursor-not-allowed',
loading && 'opacity-70 cursor-not-allowed grayscale',
className
)}
aria-label={displayLabel}
+2 -2
View File
@@ -262,7 +262,7 @@ export function SessionDetail() {
handleClearPrompt()
}}
onClick={handleClearPrompt}
className="absolute -top-12 right-0 md:right-4 z-50 flex items-center justify-center p-2 rounded-full border shadow-lg backdrop-blur-sm transition-all duration-200 active:scale-95 bg-destructive/90 hover:bg-destructive text-destructive-foreground border-destructive"
className="absolute -top-12 right-0 md:right-4 z-50 flex items-center gap-2 px-4 py-2 rounded-full bg-gradient-to-br from-red-600 to-red-700 hover:from-red-500 hover:to-red-600 text-destructive-foreground border-2 border-red-500/60 hover:border-red-400 shadow-lg shadow-red-500/30 hover:shadow-red-500/50 backdrop-blur-md transition-all duration-200 active:scale-95 hover:scale-105 ring-2 ring-red-500/20 hover:ring-red-500/40"
aria-label="Clear"
>
<X className="w-6 h-6" />
@@ -277,7 +277,7 @@ export function SessionDetail() {
stop()
}}
onClick={stop}
className="absolute -top-12 left-0 md:left-4 z-50 flex items-center justify-center p-2 rounded-full border shadow-lg backdrop-blur-sm transition-all duration-200 active:scale-95 bg-destructive/90 hover:bg-destructive text-destructive-foreground border-destructive"
className="absolute -top-12 left-0 md:left-4 z-50 flex items-center gap-2 px-4 py-2 rounded-full bg-gradient-to-br from-red-700 to-red-800 hover:from-red-600 hover:to-red-700 text-destructive-foreground border-2 border-red-600/80 hover:border-red-500 shadow-2xl shadow-red-600/40 hover:shadow-red-600/60 backdrop-blur-md transition-all duration-200 active:scale-95 hover:scale-105 ring-2 ring-red-600/30 hover:ring-red-600/50 animate-[pulse_2s_cubic-bezier(0.4,0,0.6,1)_infinite]"
aria-label="Stop Audio"
>
<VolumeX className="w-6 h-6" />