mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 16:23:36 +00:00
Add provider icons
This commit is contained in:
6 files changed
+49
-17
No files matched your search
@@ -1,6 +1,7 @@
|
||||
import { useState, useEffect, useCallback } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Rocket, ExternalLink, AlertCircle } from 'lucide-react';
|
||||
import { SiNetlify, SiVercel } from '@icons-pack/react-simple-icons';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@@ -331,12 +332,24 @@ export function DeployDialog({ projectId, projectName, open, onOpenChange }: Dep
|
||||
<Label htmlFor="provider">Select Provider</Label>
|
||||
<Select value={selectedProviderId} onValueChange={setSelectedProviderId}>
|
||||
<SelectTrigger id="provider">
|
||||
<SelectValue placeholder="Choose a deployment provider..." />
|
||||
{selectedProvider ? (
|
||||
<div className="flex items-center gap-2">
|
||||
{selectedProvider.id === 'netlify' && <SiNetlify size={14} />}
|
||||
{selectedProvider.id === 'vercel' && <SiVercel size={14} />}
|
||||
<span>{selectedProvider.name}</span>
|
||||
</div>
|
||||
) : (
|
||||
<SelectValue placeholder="Choose a deployment provider..." />
|
||||
)}
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{settings.providers.map((provider) => (
|
||||
<SelectItem key={provider.id} value={provider.id}>
|
||||
{provider.name}
|
||||
<div className="flex items-center gap-2">
|
||||
{provider.id === 'netlify' && <SiNetlify size={14} />}
|
||||
{provider.id === 'vercel' && <SiVercel size={14} />}
|
||||
<span>{provider.name}</span>
|
||||
</div>
|
||||
</SelectItem>
|
||||
))}
|
||||
</SelectContent>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Check, Bot, ArrowLeft, Trash2, GripVertical } from 'lucide-react';
|
||||
import { SiOpenai, SiAnthropic, SiGoogle } from '@icons-pack/react-simple-icons';
|
||||
import {
|
||||
DndContext,
|
||||
closestCenter,
|
||||
@@ -358,7 +359,12 @@ export function AISettings() {
|
||||
return (
|
||||
<div key={preset.id} className="border rounded-lg p-4 space-y-3">
|
||||
<div className="flex items-center justify-between">
|
||||
<h5 className="font-medium">{preset.name}</h5>
|
||||
<div className="flex items-center gap-2">
|
||||
{preset.id === 'openai' && <SiOpenai size={16} />}
|
||||
{preset.id === 'anthropic' && <SiAnthropic size={16} />}
|
||||
{preset.id === 'google' && <SiGoogle size={16} />}
|
||||
<h5 className="font-medium">{preset.name}</h5>
|
||||
</div>
|
||||
{(preset.apiKeysURL && preset.id !== "routstr") && (
|
||||
<button
|
||||
type="button"
|
||||
|
||||
@@ -2,6 +2,7 @@ import { useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Rocket, ArrowLeft, Trash2, Check, GripVertical } from 'lucide-react';
|
||||
import { Checkbox } from '@/components/ui/checkbox';
|
||||
import { SiNetlify, SiVercel } from '@icons-pack/react-simple-icons';
|
||||
import {
|
||||
DndContext,
|
||||
closestCenter,
|
||||
@@ -462,7 +463,11 @@ export function DeploySettings() {
|
||||
return (
|
||||
<div key={preset.id} className="border rounded-lg p-4 space-y-3">
|
||||
<div className="flex items-center justify-between">
|
||||
<h5 className="font-medium">{preset.name}</h5>
|
||||
<div className="flex items-center gap-2">
|
||||
{preset.id === 'netlify' && <SiNetlify size={16} />}
|
||||
{preset.id === 'vercel' && <SiVercel size={16} />}
|
||||
<h5 className="font-medium">{preset.name}</h5>
|
||||
</div>
|
||||
{preset.apiKeyURL && !isOAuthConfigured && (
|
||||
<button
|
||||
type="button"
|
||||
@@ -501,16 +506,8 @@ export function DeploySettings() {
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
{preset.type === 'netlify' && (
|
||||
<svg className="h-4 w-4" viewBox="0 0 24 24" fill="currentColor">
|
||||
<path d="M16.934 8.519a1.044 1.044 0 0 1 .303.23l2.349 2.348a1 1 0 0 1 0 1.414l-2.348 2.349a1.044 1.044 0 0 1-.231.303 1.042 1.042 0 0 1-1.473-1.473l.527-.527H11a1 1 0 1 1 0-2h5.061l-.527-.527a1.042 1.042 0 0 1 1.4-1.517zM7.066 15.481a1.044 1.044 0 0 1-.303-.23l-2.349-2.348a1 1 0 0 1 0-1.414l2.348-2.349a1.044 1.044 0 0 1 .231-.303 1.042 1.042 0 0 1 1.473 1.473l-.527.527H13a1 1 0 0 1 0 2H7.939l.527.527a1.042 1.042 0 0 1-1.4 1.517z" />
|
||||
</svg>
|
||||
)}
|
||||
{preset.type === 'vercel' && (
|
||||
<svg className="h-4 w-4" viewBox="0 0 24 24" fill="currentColor">
|
||||
<path d="M12 1.5L24 22.5H0L12 1.5z" />
|
||||
</svg>
|
||||
)}
|
||||
{preset.id === 'netlify' && <SiNetlify size={16} />}
|
||||
{preset.id === 'vercel' && <SiVercel size={16} />}
|
||||
<span className="truncate text-ellipsis overflow-hidden">
|
||||
Connect to {preset.name}
|
||||
</span>
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Check, GitBranch, ArrowLeft, Github, Trash2 } from 'lucide-react';
|
||||
import { Check, GitBranch, ArrowLeft, Trash2 } from 'lucide-react';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { SiGithub, SiGitlab } from '@icons-pack/react-simple-icons';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { Label } from '@/components/ui/label';
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
@@ -212,7 +213,11 @@ export function GitSettings() {
|
||||
{availablePresets.map((preset) => (
|
||||
<div key={preset.id} className="border rounded-lg p-4 space-y-3">
|
||||
<div className="flex items-center justify-between">
|
||||
<h5 className="font-medium">{preset.name}</h5>
|
||||
<div className="flex items-center gap-2">
|
||||
{preset.id === 'github' && <SiGithub size={16} />}
|
||||
{preset.id === 'gitlab' && <SiGitlab size={16} />}
|
||||
<h5 className="font-medium">{preset.name}</h5>
|
||||
</div>
|
||||
{preset.tokenURL && (preset.id !== 'github' || !isOAuthConfigured) && (
|
||||
<button
|
||||
type="button"
|
||||
@@ -241,7 +246,7 @@ export function GitSettings() {
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<Github className="h-4 w-4" />
|
||||
<SiGithub size={16} />
|
||||
<span className="truncate text-ellipsis overflow-hidden">
|
||||
Connect to GitHub
|
||||
</span>
|
||||
|
||||
Reference in new issue
Block a user