From 24a2f7403551872d0777250e37731ca88878672e Mon Sep 17 00:00:00 2001 From: yiling Date: Wed, 17 Jun 2026 11:54:42 +0800 Subject: [PATCH 1/2] update ui --- packages/webui/components/file-browser/file-card.tsx | 12 ++++++------ packages/webui/components/sprite-scrubber.tsx | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/webui/components/file-browser/file-card.tsx b/packages/webui/components/file-browser/file-card.tsx index cc5f710b..01ebb4e1 100644 --- a/packages/webui/components/file-browser/file-card.tsx +++ b/packages/webui/components/file-browser/file-card.tsx @@ -6,11 +6,11 @@ import { Badge } from '@/ui/components/ui/badge' import { Button } from '@/ui/components/ui/button' import { Checkbox } from '@/ui/components/ui/checkbox' import { - DropdownMenu, - DropdownMenuContent, - DropdownMenuItem, - DropdownMenuSeparator, - DropdownMenuTrigger, + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuSeparator, + DropdownMenuTrigger, } from '@/ui/components/ui/dropdown-menu' import { EditableText } from '@/ui/components/ui/editable-text' import { Skeleton } from '@/ui/components/ui/skeleton' @@ -23,7 +23,7 @@ import type { DragState } from '../dnd-types' import FieldRenderer from '../field-renderer' import { FilePreview } from './file-preview' -import { type FieldInfo as MetadataFieldInfo, FieldType } from '@shumai/dtos' +import { FieldType, type FieldInfo as MetadataFieldInfo } from '@shumai/dtos' import { FIELD_TYPE_ICONS } from '../fields-manager' interface FileCardProps { diff --git a/packages/webui/components/sprite-scrubber.tsx b/packages/webui/components/sprite-scrubber.tsx index d60fb061..cad0bb86 100644 --- a/packages/webui/components/sprite-scrubber.tsx +++ b/packages/webui/components/sprite-scrubber.tsx @@ -159,7 +159,7 @@ export const SpriteScrubber: React.FC = ({ return (
Date: Wed, 17 Jun 2026 15:22:46 +0800 Subject: [PATCH 2/2] feat(webui): replace hardcoded colors with system tokens in settings components --- .../components/settings/ProvidersSettings.tsx | 132 +++++++++--------- .../components/settings/SandboxSettings.tsx | 26 ++-- .../components/settings/SkillsConfigCard.tsx | 52 +++---- 3 files changed, 103 insertions(+), 107 deletions(-) diff --git a/packages/webui/components/settings/ProvidersSettings.tsx b/packages/webui/components/settings/ProvidersSettings.tsx index 5b16f3cb..1ffc48f6 100644 --- a/packages/webui/components/settings/ProvidersSettings.tsx +++ b/packages/webui/components/settings/ProvidersSettings.tsx @@ -1,62 +1,62 @@ import { client } from '@/ui/api/client' -import { Card, CardContent } from '@/ui/components/ui/card' +import { + AlertDialog, + AlertDialogAction, + AlertDialogCancel, + AlertDialogContent, + AlertDialogDescription, + AlertDialogFooter, + AlertDialogHeader, + AlertDialogTitle, +} from '@/ui/components/ui/alert-dialog' +import { Badge } from '@/ui/components/ui/badge' import { Button } from '@/ui/components/ui/button' +import { Card, CardContent } from '@/ui/components/ui/card' +import { + Dialog, + DialogContent, + DialogDescription, + DialogFooter, + DialogHeader, + DialogTitle, +} from '@/ui/components/ui/dialog' +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuTrigger, +} from '@/ui/components/ui/dropdown-menu' +import { Field, FieldDescription, FieldError, FieldLabel } from '@/ui/components/ui/field' import { Input } from '@/ui/components/ui/input' import { Label } from '@/ui/components/ui/label' import { - Dialog, - DialogContent, - DialogDescription, - DialogFooter, - DialogHeader, - DialogTitle, -} from '@/ui/components/ui/dialog' -import { Field, FieldLabel, FieldDescription, FieldError } from '@/ui/components/ui/field' -import { - Select, - SelectContent, - SelectItem, - SelectTrigger, - SelectValue, + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, } from '@/ui/components/ui/select' import { Switch } from '@/ui/components/ui/switch' -import { Badge } from '@/ui/components/ui/badge' -import { - AlertDialog, - AlertDialogAction, - AlertDialogCancel, - AlertDialogContent, - AlertDialogDescription, - AlertDialogFooter, - AlertDialogHeader, - AlertDialogTitle, -} from '@/ui/components/ui/alert-dialog' -import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query' -import { useForm } from '@tanstack/react-form' -import { - DropdownMenu, - DropdownMenuContent, - DropdownMenuItem, - DropdownMenuTrigger, -} from '@/ui/components/ui/dropdown-menu' -import { - Loader2, - Plus, - Trash2, - Cpu, - Globe, - ChevronRight, - Info, - DollarSign, - Maximize2, - Zap, - Search, - MoreVertical, -} from 'lucide-react' -import { useState, useMemo, useEffect } from 'react' -import { toast } from 'sonner' -import { InferResponseType } from 'hono/client' import { providerConfigSchema, providerModelSchema } from '@shumai/dtos' +import { useForm } from '@tanstack/react-form' +import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query' +import { InferResponseType } from 'hono/client' +import { + ChevronRight, + Cpu, + DollarSign, + Globe, + Info, + Loader2, + Maximize2, + MoreVertical, + Plus, + Search, + Trash2, + Zap, +} from 'lucide-react' +import { useEffect, useMemo, useState } from 'react' +import { toast } from 'sonner' import { z } from 'zod' const providerFormSchemaBase = z.object({ @@ -379,7 +379,7 @@ export function ProvidersSettings({ teamId }: ProvidersSettingsProps) { setProviderToDelete(null)}>Cancel { if (providerToDelete) { deleteMutation.mutate(providerToDelete.id) @@ -507,7 +507,7 @@ function ProviderFormDialog({ >
{/* Row 1: Basic Config */} -
+
{ @@ -586,8 +586,8 @@ function ProviderFormDialog({
{/* Row 2: API Key Card */} - - + + { @@ -609,13 +609,9 @@ function ProviderFormDialog({ /> You can provide a literal value (e.g.{' '} - - sk-... - - ) or an Environment variable name (e.g.{' '} - - MY_API_KEY - + sk-...) or an + Environment variable name (e.g.{' '} + MY_API_KEY ). {isInvalid && } @@ -664,7 +660,7 @@ function ProviderFormDialog({ {modelsField.state.value.map((_, index) => (
{/* Row 1: ID and Name */}
@@ -728,7 +724,7 @@ function ProviderFormDialog({ children={(field) => ( Reasoning Support modelsField.removeValue(index)} > @@ -890,7 +886,7 @@ function ProviderFormDialog({
- + @@ -899,7 +895,7 @@ function ProviderFormDialog({ children={([canSubmit, isSubmitting]) => (
))} {sandbox?.allowedDomains.length === 0 && ( -
No custom domains allowed
+
No custom domains allowed
)}
@@ -136,10 +136,10 @@ export function SandboxSettings({ teamId }: { teamId: string }) { {/* Pending Domains Section */} - +
- + Pending Domain Approvals
@@ -150,20 +150,20 @@ export function SandboxSettings({ teamId }: { teamId: string }) {
{sandbox?.pendingDomains && sandbox.pendingDomains.length > 0 ? ( -
+
{sandbox.pendingDomains.map((domain) => (
- + {domain}
) : ( -
+
No pending domains requiring approval
)} diff --git a/packages/webui/components/settings/SkillsConfigCard.tsx b/packages/webui/components/settings/SkillsConfigCard.tsx index a4ff0f50..c9f7459c 100644 --- a/packages/webui/components/settings/SkillsConfigCard.tsx +++ b/packages/webui/components/settings/SkillsConfigCard.tsx @@ -172,7 +172,7 @@ export const SkillsConfigCard: React.FC = ({ teamId }) => Cancel { if (selectedSkill) { deleteMutation.mutate(selectedSkill.id) @@ -222,7 +222,7 @@ const SkillItem = ({ e.stopPropagation() onDelete() }} - className="text-red-500 focus:text-red-500 gap-2 cursor-pointer" + className="text-destructive focus:text-destructive gap-2 cursor-pointer" > Delete @@ -382,8 +382,8 @@ const AddSkillDialog = ({ className={cn( 'group relative h-32 border-2 border-dashed rounded-xl flex flex-col items-center justify-center transition-all cursor-pointer', isProcessing - ? 'opacity-50 cursor-not-allowed bg-slate-50 dark:bg-slate-900 border-slate-200 dark:border-slate-800' - : 'hover:bg-blue-50/50 dark:hover:bg-blue-900/10 hover:border-blue-500/50 border-slate-200 dark:border-slate-800', + ? 'opacity-50 cursor-not-allowed bg-muted/50 border-border' + : 'hover:bg-primary/5 hover:border-primary/50 border-border', )} > handleFileUpload(e.target.files)} /> -
- +
+
-

+

Select ZIP file

-

+

Packages must contain a SKILL.md

{isProcessing && !githubUrl && ( -
+
Processing package...
@@ -415,10 +415,10 @@ const AddSkillDialog = ({
- +
- OR + OR
@@ -428,7 +428,7 @@ const AddSkillDialog = ({
- +
-

+

Example: https://github.com/google/gemini-cli

@@ -540,7 +540,7 @@ const ConfigSkillDialog = ({
- + Configure Skill: {skill.name}
@@ -551,8 +551,8 @@ const ConfigSkillDialog = ({
{envVars.length === 0 ? ( -
-

+

+

No environment variables found. Click "Add Variable" to create one.

@@ -560,38 +560,38 @@ const ConfigSkillDialog = ({ envVars.map((env: { name: string; default?: string | undefined }, index: number) => (
-
-
@@ -600,12 +600,12 @@ const ConfigSkillDialog = ({ )}
- + @@ -616,7 +616,7 @@ const ConfigSkillDialog = ({