mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 08:37:22 +00:00
Always display icons for providers
This commit is contained in:
5 files changed
+37
-3
No files matched your search
Generated
+27
@@ -47,6 +47,7 @@
|
|||||||
"@radix-ui/react-toggle-group": "^1.1.0",
|
"@radix-ui/react-toggle-group": "^1.1.0",
|
||||||
"@radix-ui/react-tooltip": "^1.1.4",
|
"@radix-ui/react-tooltip": "^1.1.4",
|
||||||
"@std/encoding": "npm:@jsr/std__encoding@^1.0.10",
|
"@std/encoding": "npm:@jsr/std__encoding@^1.0.10",
|
||||||
|
"@tabler/icons-react": "^3.35.0",
|
||||||
"@tanstack/react-query": "^5.56.2",
|
"@tanstack/react-query": "^5.56.2",
|
||||||
"@unhead/addons": "^2.0.10",
|
"@unhead/addons": "^2.0.10",
|
||||||
"@unhead/react": "^2.0.10",
|
"@unhead/react": "^2.0.10",
|
||||||
@@ -3487,6 +3488,32 @@
|
|||||||
"@swc/counter": "^0.1.3"
|
"@swc/counter": "^0.1.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@tabler/icons": {
|
||||||
|
"version": "3.35.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tabler/icons/-/icons-3.35.0.tgz",
|
||||||
|
"integrity": "sha512-yYXe+gJ56xlZFiXwV9zVoe3FWCGuZ/D7/G4ZIlDtGxSx5CGQK110wrnT29gUj52kEZoxqF7oURTk97GQxELOFQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"funding": {
|
||||||
|
"type": "github",
|
||||||
|
"url": "https://github.com/sponsors/codecalm"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@tabler/icons-react": {
|
||||||
|
"version": "3.35.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tabler/icons-react/-/icons-react-3.35.0.tgz",
|
||||||
|
"integrity": "sha512-XG7t2DYf3DyHT5jxFNp5xyLVbL4hMJYJhiSdHADzAjLRYfL7AnjlRfiHDHeXxkb2N103rEIvTsBRazxXtAUz2g==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@tabler/icons": "3.35.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "github",
|
||||||
|
"url": "https://github.com/sponsors/codecalm"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"react": ">= 16"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@tailwindcss/typography": {
|
"node_modules/@tailwindcss/typography": {
|
||||||
"version": "0.5.16",
|
"version": "0.5.16",
|
||||||
"resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.16.tgz",
|
"resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.16.tgz",
|
||||||
|
|||||||
@@ -50,6 +50,7 @@
|
|||||||
"@radix-ui/react-toggle-group": "^1.1.0",
|
"@radix-ui/react-toggle-group": "^1.1.0",
|
||||||
"@radix-ui/react-tooltip": "^1.1.4",
|
"@radix-ui/react-tooltip": "^1.1.4",
|
||||||
"@std/encoding": "npm:@jsr/std__encoding@^1.0.10",
|
"@std/encoding": "npm:@jsr/std__encoding@^1.0.10",
|
||||||
|
"@tabler/icons-react": "^3.35.0",
|
||||||
"@tanstack/react-query": "^5.56.2",
|
"@tanstack/react-query": "^5.56.2",
|
||||||
"@unhead/addons": "^2.0.10",
|
"@unhead/addons": "^2.0.10",
|
||||||
"@unhead/react": "^2.0.10",
|
"@unhead/react": "^2.0.10",
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import {
|
|||||||
useSortable,
|
useSortable,
|
||||||
} from '@dnd-kit/sortable';
|
} from '@dnd-kit/sortable';
|
||||||
import { CSS } from '@dnd-kit/utilities';
|
import { CSS } from '@dnd-kit/utilities';
|
||||||
|
import { IconMasksTheater } from '@tabler/icons-react';
|
||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import { Input } from '@/components/ui/input';
|
import { Input } from '@/components/ui/input';
|
||||||
import { PasswordInput } from '@/components/ui/password-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) {
|
function renderIcon(providerId: string, size = 16) {
|
||||||
switch (providerId) {
|
switch (providerId) {
|
||||||
|
case 'shakespeare':
|
||||||
|
return <IconMasksTheater size={size} />;
|
||||||
case 'openai':
|
case 'openai':
|
||||||
return <SiOpenai size={size} />;
|
return <SiOpenai size={size} />;
|
||||||
case 'anthropic':
|
case 'anthropic':
|
||||||
@@ -48,7 +51,7 @@ function renderIcon(providerId: string, size = 16) {
|
|||||||
case 'xai':
|
case 'xai':
|
||||||
return <SiX size={size} />;
|
return <SiX size={size} />;
|
||||||
default:
|
default:
|
||||||
return null;
|
return <Bot size={size} />;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import {
|
|||||||
useSortable,
|
useSortable,
|
||||||
} from '@dnd-kit/sortable';
|
} from '@dnd-kit/sortable';
|
||||||
import { CSS } from '@dnd-kit/utilities';
|
import { CSS } from '@dnd-kit/utilities';
|
||||||
|
import { IconMasksTheater } from '@tabler/icons-react';
|
||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import { Input } from '@/components/ui/input';
|
import { Input } from '@/components/ui/input';
|
||||||
import { PasswordInput } from '@/components/ui/password-input';
|
import { PasswordInput } from '@/components/ui/password-input';
|
||||||
@@ -273,12 +274,14 @@ function generateCustomProviderId(type: string): string {
|
|||||||
|
|
||||||
function renderIcon(providerId: string, size = 16) {
|
function renderIcon(providerId: string, size = 16) {
|
||||||
switch (providerId) {
|
switch (providerId) {
|
||||||
|
case 'shakespeare':
|
||||||
|
return <IconMasksTheater size={size} />;
|
||||||
case 'netlify':
|
case 'netlify':
|
||||||
return <SiNetlify size={size} />;
|
return <SiNetlify size={size} />;
|
||||||
case 'vercel':
|
case 'vercel':
|
||||||
return <SiVercel size={size} />;
|
return <SiVercel size={size} />;
|
||||||
default:
|
default:
|
||||||
return null;
|
return <Rocket size={size} />;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ function renderIcon(providerId: string, size = 16) {
|
|||||||
case 'gitlab':
|
case 'gitlab':
|
||||||
return <SiGitlab size={size} />;
|
return <SiGitlab size={size} />;
|
||||||
default:
|
default:
|
||||||
return null;
|
return <GitBranch size={size} />;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user