mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 08:23:34 +00:00
Always display icons for providers
This commit is contained in:
5 files changed
+37
-3
No files matched your search
@@ -21,6 +21,7 @@ import {
|
||||
useSortable,
|
||||
} from '@dnd-kit/sortable';
|
||||
import { CSS } from '@dnd-kit/utilities';
|
||||
import { IconMasksTheater } from '@tabler/icons-react';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { PasswordInput } from '@/components/ui/password-input';
|
||||
@@ -39,6 +40,8 @@ import { AI_PROVIDER_PRESETS, type PresetProvider } from '@/lib/aiProviderPreset
|
||||
|
||||
function renderIcon(providerId: string, size = 16) {
|
||||
switch (providerId) {
|
||||
case 'shakespeare':
|
||||
return <IconMasksTheater size={size} />;
|
||||
case 'openai':
|
||||
return <SiOpenai size={size} />;
|
||||
case 'anthropic':
|
||||
@@ -48,7 +51,7 @@ function renderIcon(providerId: string, size = 16) {
|
||||
case 'xai':
|
||||
return <SiX size={size} />;
|
||||
default:
|
||||
return null;
|
||||
return <Bot size={size} />;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ import {
|
||||
useSortable,
|
||||
} from '@dnd-kit/sortable';
|
||||
import { CSS } from '@dnd-kit/utilities';
|
||||
import { IconMasksTheater } from '@tabler/icons-react';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { PasswordInput } from '@/components/ui/password-input';
|
||||
@@ -273,12 +274,14 @@ function generateCustomProviderId(type: string): string {
|
||||
|
||||
function renderIcon(providerId: string, size = 16) {
|
||||
switch (providerId) {
|
||||
case 'shakespeare':
|
||||
return <IconMasksTheater size={size} />;
|
||||
case 'netlify':
|
||||
return <SiNetlify size={size} />;
|
||||
case 'vercel':
|
||||
return <SiVercel size={size} />;
|
||||
default:
|
||||
return null;
|
||||
return <Rocket size={size} />;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ function renderIcon(providerId: string, size = 16) {
|
||||
case 'gitlab':
|
||||
return <SiGitlab size={size} />;
|
||||
default:
|
||||
return null;
|
||||
return <GitBranch size={size} />;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user