mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-02 22:14:50 +00:00
feat(team): add integrations settings with turntable and gotenberg (#471)
* feat(team): add integrations settings with turntable and gotenberg * fix(upload): pass teamId to gotenberg availability check during upload preflight
This commit is contained in:
@@ -24,11 +24,13 @@ import { AppearanceSettings } from '@/ui/components/settings/AppearanceSettings'
|
||||
import { EmailNotificationSettings } from '@/ui/components/settings/EmailNotificationSettings'
|
||||
import { ImageVideoGenerationSettings } from '@/ui/components/settings/ImageVideoGenerationSettings'
|
||||
import { TurntableSettingsCard } from '@/ui/components/settings/TurntableSettingsCard'
|
||||
import { GotenbergSettingsCard } from '@/ui/components/settings/GotenbergSettingsCard'
|
||||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/ui/components/ui/card'
|
||||
import { Slider } from '@/ui/components/ui/slider'
|
||||
import { cn } from '@/ui/lib/utils'
|
||||
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'
|
||||
import {
|
||||
Blocks,
|
||||
Bot,
|
||||
Cpu,
|
||||
Film,
|
||||
@@ -67,6 +69,7 @@ type SettingsTab =
|
||||
| 'quotas'
|
||||
| 'appearance'
|
||||
| 'email'
|
||||
| 'integrations'
|
||||
| 'skills'
|
||||
| 'mcp'
|
||||
| 'providers'
|
||||
@@ -82,6 +85,7 @@ const VALID_SETTINGS_TABS: readonly SettingsTab[] = [
|
||||
'quotas',
|
||||
'appearance',
|
||||
'email',
|
||||
'integrations',
|
||||
'skills',
|
||||
'mcp',
|
||||
'providers',
|
||||
@@ -647,6 +651,22 @@ export function TeamSettingsPage() {
|
||||
<div className="ml-auto w-1.5 h-1.5 rounded-full bg-sidebar-primary" />
|
||||
)}
|
||||
</button>
|
||||
|
||||
<button
|
||||
onClick={() => handleTabChange('integrations')}
|
||||
className={cn(
|
||||
'w-full flex items-center gap-3 px-4 py-3 text-sm font-medium rounded-lg transition-all',
|
||||
activeTab === 'integrations'
|
||||
? 'bg-sidebar-accent text-sidebar-accent-foreground ring-1 ring-sidebar-border'
|
||||
: 'text-sidebar-foreground/75 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',
|
||||
)}
|
||||
>
|
||||
<Blocks className="w-5 h-5" />
|
||||
{m.integrations()}
|
||||
{activeTab === 'integrations' && (
|
||||
<div className="ml-auto w-1.5 h-1.5 rounded-full bg-sidebar-primary" />
|
||||
)}
|
||||
</button>
|
||||
</>
|
||||
)}
|
||||
|
||||
@@ -768,6 +788,7 @@ export function TeamSettingsPage() {
|
||||
{activeTab === 'quotas' && m.resource_quotas()}
|
||||
{activeTab === 'appearance' && m.appearance_settings()}
|
||||
{activeTab === 'email' && m.email_notifications()}
|
||||
{activeTab === 'integrations' && m.integrations()}
|
||||
{activeTab === 'skills' && m.skills_management()}
|
||||
{activeTab === 'mcp' && m.mcp_servers()}
|
||||
{activeTab === 'providers' && m.ai_providers()}
|
||||
@@ -783,6 +804,7 @@ export function TeamSettingsPage() {
|
||||
{activeTab === 'quotas' && m.resource_quotas_description()}
|
||||
{activeTab === 'appearance' && m.appearance_settings_description()}
|
||||
{activeTab === 'email' && m.email_notifications_description()}
|
||||
{activeTab === 'integrations' && m.integrations_settings_description()}
|
||||
{activeTab === 'skills' && m.skills_description()}
|
||||
{activeTab === 'mcp' && m.mcp_servers_description()}
|
||||
{activeTab === 'providers' && m.providers_description()}
|
||||
@@ -1148,9 +1170,6 @@ export function TeamSettingsPage() {
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
{/* 3D Turntable Renderer Card */}
|
||||
<TurntableSettingsCard teamId={teamId} />
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -1191,6 +1210,13 @@ export function TeamSettingsPage() {
|
||||
{activeTab === 'appearance' && <AppearanceSettings teamId={teamId} />}
|
||||
|
||||
{activeTab === 'email' && <EmailNotificationSettings teamId={teamId} />}
|
||||
|
||||
{activeTab === 'integrations' && (
|
||||
<div className="h-full overflow-y-auto space-y-6 pr-1">
|
||||
<TurntableSettingsCard teamId={teamId} />
|
||||
<GotenbergSettingsCard teamId={teamId} />
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
Reference in New Issue
Block a user