Skip to content

Commit 0be2e18

Browse files
committed
refactor: more UI enhancements
1 parent 8de7fff commit 0be2e18

File tree

22 files changed

+242
-344
lines changed

22 files changed

+242
-344
lines changed

webview-ui/src/components/prompts/PromptsView.tsx

Lines changed: 199 additions & 319 deletions
Large diffs are not rendered by default.

webview-ui/src/components/settings/ContextManagementSettings.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export const ContextManagementSettings = ({
9999
<Input
100100
type="number"
101101
pattern="-?[0-9]*"
102-
className="w-24 bg-vscode-input-background text-vscode-input-foreground px-2 py-1 rounded text-right [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none disabled:opacity-50"
102+
className="w-24 bg-vscode-input-background text-vscode-input-foreground border border-vscode-input-border px-2 py-1 rounded text-right [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none disabled:opacity-50"
103103
value={maxReadFileLine ?? 500}
104104
min={-1}
105105
onChange={(e) => {

webview-ui/src/components/ui/alert-dialog.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ function AlertDialogAction({ className, ...props }: React.ComponentProps<typeof
9090
<AlertDialogPrimitive.Action
9191
className={cn(
9292
buttonVariants(),
93-
"bg-vscode-button-background text-vscode-button-foreground hover:bg-vscode-button-hoverBackground h-6 px-3 py-1",
93+
"bg-vscode-button-background text-vscode-button-foreground hover:bg-vscode-button-hoverBackground h-6 px-3 py-1 border",
9494
className,
9595
)}
9696
{...props}
@@ -103,7 +103,7 @@ function AlertDialogCancel({ className, ...props }: React.ComponentProps<typeof
103103
<AlertDialogPrimitive.Cancel
104104
className={cn(
105105
buttonVariants({ variant: "outline" }),
106-
"bg-vscode-button-secondaryBackground text-vscode-button-secondaryForeground hover:bg-vscode-button-secondaryHoverBackground h-6 px-3 py-1",
106+
"bg-vscode-button-secondaryBackground text-vscode-button-secondaryForeground hover:bg-vscode-button-secondaryHoverBackground h-6 px-3 py-1 border",
107107
className,
108108
)}
109109
{...props}

webview-ui/src/components/ui/button.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ const buttonVariants = cva(
99
{
1010
variants: {
1111
variant: {
12-
default: "bg-primary text-primary-foreground hover:bg-primary/90",
12+
default: "border border-vscode-input-border bg-primary text-primary-foreground hover:bg-primary/90",
1313
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
14-
outline: "bg-transparent hover:bg-accent hover:text-accent-foreground",
15-
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
14+
outline:
15+
"border border-vscode-input-border bg-transparent hover:bg-accent hover:text-accent-foreground",
16+
secondary:
17+
"border border-vscode-input-border bg-secondary text-secondary-foreground hover:bg-secondary/80",
1618
ghost: "hover:bg-accent hover:text-accent-foreground",
1719
link: "text-primary underline-offset-4 hover:underline",
1820
combobox:

webview-ui/src/components/ui/slider.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ const Slider = React.forwardRef<
1111
ref={ref}
1212
className={cn("relative flex w-full touch-none select-none items-center", className)}
1313
{...props}>
14-
<SliderPrimitive.Track className="relative w-full h-[8px] grow overflow-hidden bg-accent rounded-sm">
14+
<SliderPrimitive.Track className="relative w-full h-[8px] grow overflow-hidden bg-accent rounded-sm border">
1515
<SliderPrimitive.Range className="absolute h-full bg-vscode-button-background" />
1616
</SliderPrimitive.Track>
17-
<SliderPrimitive.Thumb className="block h-3 w-3 rounded-full border bg-primary transition-colors cursor-pointer focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50" />
17+
<SliderPrimitive.Thumb className="block h-3 w-3 rounded-full border border-primary/50 bg-vscode-button-background transition-colors cursor-pointer focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50" />
1818
</SliderPrimitive.Root>
1919
))
2020
Slider.displayName = SliderPrimitive.Root.displayName

webview-ui/src/components/ui/textarea.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const Textarea = React.forwardRef<HTMLTextAreaElement, React.ComponentProps<"tex
77
return (
88
<textarea
99
className={cn(
10-
"flex min-h-[60px] w-full rounded-xs px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus:outline-0 focus-visible:outline-none focus-visible:border-vscode-focusBorder disabled:cursor-not-allowed disabled:opacity-50",
10+
"flex min-h-[60px] w-full rounded-xs px-3 py-2 text-base placeholder:text-muted-foreground focus:outline-0 focus-visible:outline-none focus-visible:border-vscode-focusBorder disabled:cursor-not-allowed disabled:opacity-50",
1111
"border border-[var(--vscode-input-border,var(--vscode-input-background))] focus-visible:border-vscode-focusBorder",
1212
"bg-vscode-input-background",
1313
"text-vscode-input-foreground",

webview-ui/src/i18n/locales/ca/prompts.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"editModesConfig": "Editar configuració de modes",
88
"editGlobalModes": "Editar modes globals",
99
"editProjectModes": "Editar modes de projecte (.roomodes)",
10-
"createModeHelpText": "Feu clic a + per crear un nou mode personalitzat, o simplement demaneu a Roo al xat que en creï un per a vostè!"
10+
"createModeHelpText": "Feu clic a + per crear un nou mode personalitzat, o simplement demaneu a Roo al xat que en creï un per a vostè!",
11+
"selectMode": "Cerqueu modes"
1112
},
1213
"apiConfiguration": {
1314
"title": "Configuració d'API",

webview-ui/src/i18n/locales/de/prompts.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"editModesConfig": "Moduskonfiguration bearbeiten",
88
"editGlobalModes": "Globale Modi bearbeiten",
99
"editProjectModes": "Projektmodi bearbeiten (.roomodes)",
10-
"createModeHelpText": "Klicke auf +, um einen neuen benutzerdefinierten Modus zu erstellen, oder bitte Roo einfach im Chat, einen für dich zu erstellen!"
10+
"createModeHelpText": "Klicke auf +, um einen neuen benutzerdefinierten Modus zu erstellen, oder bitte Roo einfach im Chat, einen für dich zu erstellen!",
11+
"selectMode": "Modi suchen"
1112
},
1213
"apiConfiguration": {
1314
"title": "API-Konfiguration",

webview-ui/src/i18n/locales/en/prompts.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"editModesConfig": "Edit modes configuration",
88
"editGlobalModes": "Edit Global Modes",
99
"editProjectModes": "Edit Project Modes (.roomodes)",
10-
"createModeHelpText": "Hit the + to create a new custom mode, or just ask Roo in chat to create one for you!"
10+
"createModeHelpText": "Hit the + to create a new custom mode, or just ask Roo in chat to create one for you!",
11+
"selectMode": "Search modes"
1112
},
1213
"apiConfiguration": {
1314
"title": "API Configuration",

webview-ui/src/i18n/locales/es/prompts.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"editModesConfig": "Editar configuración de modos",
88
"editGlobalModes": "Editar modos globales",
99
"editProjectModes": "Editar modos del proyecto (.roomodes)",
10-
"createModeHelpText": "¡Haz clic en + para crear un nuevo modo personalizado, o simplemente pídele a Roo en el chat que te cree uno!"
10+
"createModeHelpText": "¡Haz clic en + para crear un nuevo modo personalizado, o simplemente pídele a Roo en el chat que te cree uno!",
11+
"selectMode": "Buscar modos"
1112
},
1213
"apiConfiguration": {
1314
"title": "Configuración de API",

0 commit comments

Comments
 (0)