mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-28 20:04:26 +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:
@@ -0,0 +1,210 @@
|
||||
// @vitest-environment happy-dom
|
||||
import { cleanup, fireEvent, render, screen, waitFor } from '@testing-library/react'
|
||||
import React from 'react'
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
|
||||
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
|
||||
import { GotenbergSettingsCard } from './GotenbergSettingsCard'
|
||||
import type { GotenbergSettingsResponse } from '@shumai/dtos'
|
||||
|
||||
const mockGetSettings = vi.fn()
|
||||
const mockPutSettings = vi.fn()
|
||||
const mockTestSettings = vi.fn()
|
||||
|
||||
vi.mock('@/ui/api/client', () => ({
|
||||
client: {
|
||||
api: {
|
||||
teams: {
|
||||
':teamId': {
|
||||
'gotenberg-settings': {
|
||||
$get: () => mockGetSettings(),
|
||||
$put: (args: unknown) => mockPutSettings(args),
|
||||
test: {
|
||||
$post: (args: unknown) => mockTestSettings(args),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}))
|
||||
|
||||
vi.mock('sonner', () => ({
|
||||
toast: {
|
||||
success: vi.fn(),
|
||||
error: vi.fn(),
|
||||
},
|
||||
}))
|
||||
|
||||
vi.mock('@/ui/paraglide/messages.js', () => ({
|
||||
m: {
|
||||
gotenberg_settings: () => 'Gotenberg Document Converter',
|
||||
gotenberg_settings_description: () => 'Configure external Gotenberg service',
|
||||
gotenberg_env_configured: () => 'Configured via Environment',
|
||||
gotenberg_server_url: () => 'Server URL',
|
||||
gotenberg_server_url_placeholder: () => 'http://localhost:3000',
|
||||
gotenberg_username: () => 'Username',
|
||||
gotenberg_password: () => 'Password',
|
||||
gotenberg_password_placeholder: () => 'Saved password',
|
||||
gotenberg_test_connection: () => 'Test Connection',
|
||||
gotenberg_testing: () => 'Testing...',
|
||||
gotenberg_connection_success: () => 'Connection successful',
|
||||
gotenberg_connection_failed: () => 'Connection failed',
|
||||
save: () => 'Save',
|
||||
settings_updated: () => 'Settings updated',
|
||||
failed_update_settings: () => 'Failed to update settings',
|
||||
},
|
||||
}))
|
||||
|
||||
const createWrapper = () => {
|
||||
const queryClient = new QueryClient({
|
||||
defaultOptions: {
|
||||
queries: { retry: false },
|
||||
mutations: { retry: false },
|
||||
},
|
||||
})
|
||||
return ({ children }: { children: React.ReactNode }) => (
|
||||
<QueryClientProvider client={queryClient}>{children}</QueryClientProvider>
|
||||
)
|
||||
}
|
||||
|
||||
describe('GotenbergSettingsCard', () => {
|
||||
beforeEach(() => {
|
||||
vi.clearAllMocks()
|
||||
})
|
||||
|
||||
afterEach(() => {
|
||||
cleanup()
|
||||
})
|
||||
|
||||
it('renders loaded settings with URL and username', async () => {
|
||||
const settings: GotenbergSettingsResponse = {
|
||||
isEnvConfigured: false,
|
||||
url: 'http://gotenberg.local:3000',
|
||||
username: 'gotenberg-user',
|
||||
hasPassword: true,
|
||||
}
|
||||
|
||||
mockGetSettings.mockResolvedValueOnce({
|
||||
ok: true,
|
||||
json: async () => settings,
|
||||
})
|
||||
|
||||
render(<GotenbergSettingsCard teamId="team-123" />, { wrapper: createWrapper() })
|
||||
|
||||
await waitFor(() => {
|
||||
expect(screen.getByDisplayValue('http://gotenberg.local:3000')).toBeDefined()
|
||||
expect(screen.getByDisplayValue('gotenberg-user')).toBeDefined()
|
||||
})
|
||||
})
|
||||
|
||||
it('disables inputs and displays badge when configured via environment', async () => {
|
||||
const settings: GotenbergSettingsResponse = {
|
||||
isEnvConfigured: true,
|
||||
url: 'http://env-gotenberg:3000',
|
||||
username: 'env-user',
|
||||
hasPassword: true,
|
||||
}
|
||||
|
||||
mockGetSettings.mockResolvedValueOnce({
|
||||
ok: true,
|
||||
json: async () => settings,
|
||||
})
|
||||
|
||||
render(<GotenbergSettingsCard teamId="team-123" />, { wrapper: createWrapper() })
|
||||
|
||||
await waitFor(() => {
|
||||
expect(screen.getByText('Configured via Environment')).toBeDefined()
|
||||
const urlInput = screen.getByDisplayValue('http://env-gotenberg:3000') as HTMLInputElement
|
||||
expect(urlInput.disabled).toBe(true)
|
||||
const saveBtn = screen.getByRole('button', { name: 'Save' }) as HTMLButtonElement
|
||||
expect(saveBtn.disabled).toBe(true)
|
||||
})
|
||||
})
|
||||
|
||||
it('saves updated settings', async () => {
|
||||
const settings: GotenbergSettingsResponse = {
|
||||
isEnvConfigured: false,
|
||||
url: '',
|
||||
username: '',
|
||||
hasPassword: false,
|
||||
}
|
||||
|
||||
mockGetSettings.mockResolvedValueOnce({
|
||||
ok: true,
|
||||
json: async () => settings,
|
||||
})
|
||||
|
||||
mockPutSettings.mockResolvedValueOnce({
|
||||
ok: true,
|
||||
json: async () => ({
|
||||
isEnvConfigured: false,
|
||||
url: 'http://custom:3000',
|
||||
username: 'user1',
|
||||
hasPassword: true,
|
||||
}),
|
||||
})
|
||||
|
||||
render(<GotenbergSettingsCard teamId="team-123" />, { wrapper: createWrapper() })
|
||||
|
||||
await waitFor(() => {
|
||||
expect(screen.getByLabelText('Server URL')).toBeDefined()
|
||||
})
|
||||
|
||||
const urlInput = screen.getByLabelText('Server URL')
|
||||
const usernameInput = screen.getByLabelText('Username')
|
||||
const passwordInput = document.getElementById('gotenberg-password') as HTMLInputElement
|
||||
|
||||
fireEvent.change(urlInput, { target: { value: 'http://custom:3000' } })
|
||||
fireEvent.change(usernameInput, { target: { value: 'user1' } })
|
||||
fireEvent.change(passwordInput, { target: { value: 'newpass' } })
|
||||
|
||||
const saveBtn = screen.getByRole('button', { name: 'Save' })
|
||||
fireEvent.click(saveBtn)
|
||||
|
||||
await waitFor(() => {
|
||||
expect(mockPutSettings).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
param: { teamId: 'team-123' },
|
||||
json: {
|
||||
url: 'http://custom:3000',
|
||||
username: 'user1',
|
||||
password: 'newpass',
|
||||
},
|
||||
}),
|
||||
)
|
||||
})
|
||||
})
|
||||
|
||||
it('handles test connection with success result', async () => {
|
||||
const settings: GotenbergSettingsResponse = {
|
||||
isEnvConfigured: false,
|
||||
url: 'http://test-gotenberg:3000',
|
||||
username: 'user',
|
||||
hasPassword: false,
|
||||
}
|
||||
|
||||
mockGetSettings.mockResolvedValueOnce({
|
||||
ok: true,
|
||||
json: async () => settings,
|
||||
})
|
||||
|
||||
mockTestSettings.mockResolvedValueOnce({
|
||||
ok: true,
|
||||
json: async () => ({ ok: true, version: '8.3.0' }),
|
||||
})
|
||||
|
||||
render(<GotenbergSettingsCard teamId="team-123" />, { wrapper: createWrapper() })
|
||||
|
||||
await waitFor(() => {
|
||||
expect(screen.getByDisplayValue('http://test-gotenberg:3000')).toBeDefined()
|
||||
})
|
||||
|
||||
const testBtn = screen.getByRole('button', { name: 'Test Connection' })
|
||||
fireEvent.click(testBtn)
|
||||
|
||||
await waitFor(() => {
|
||||
expect(screen.getByText(/Connection successful/)).toBeDefined()
|
||||
expect(screen.getByText(/\(v8\.3\.0\)/)).toBeDefined()
|
||||
})
|
||||
})
|
||||
})
|
||||
@@ -0,0 +1,242 @@
|
||||
import React, { useState, useEffect } from 'react'
|
||||
import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query'
|
||||
import { client } from '@/ui/api/client'
|
||||
import {
|
||||
Card,
|
||||
CardHeader,
|
||||
CardTitle,
|
||||
CardDescription,
|
||||
CardContent,
|
||||
CardFooter,
|
||||
} from '@/ui/components/ui/card'
|
||||
import { Input } from '@/ui/components/ui/input'
|
||||
import { Button } from '@/ui/components/ui/button'
|
||||
import { Badge } from '@/ui/components/ui/badge'
|
||||
import { Loader2, CheckCircle2, XCircle, Info } from 'lucide-react'
|
||||
import { toast } from 'sonner'
|
||||
import { m } from '@/ui/paraglide/messages.js'
|
||||
|
||||
interface GotenbergSettingsCardProps {
|
||||
teamId: string
|
||||
}
|
||||
|
||||
export const GotenbergSettingsCard: React.FC<GotenbergSettingsCardProps> = ({ teamId }) => {
|
||||
const queryClient = useQueryClient()
|
||||
|
||||
const [url, setUrl] = useState('')
|
||||
const [username, setUsername] = useState('')
|
||||
const [password, setPassword] = useState('')
|
||||
const [testResult, setTestResult] = useState<{
|
||||
ok: boolean
|
||||
version?: string
|
||||
error?: string
|
||||
} | null>(null)
|
||||
const [isTesting, setIsTesting] = useState(false)
|
||||
|
||||
const { data: gotenbergSettings, isLoading } = useQuery({
|
||||
queryKey: ['teams', teamId, 'gotenberg-settings'],
|
||||
queryFn: async () => {
|
||||
const res = await client.api.teams[':teamId']['gotenberg-settings'].$get({
|
||||
param: { teamId },
|
||||
})
|
||||
if (!res.ok) throw new Error('Failed to load gotenberg settings')
|
||||
return await res.json()
|
||||
},
|
||||
enabled: !!teamId,
|
||||
})
|
||||
|
||||
useEffect(() => {
|
||||
if (gotenbergSettings) {
|
||||
setUrl(gotenbergSettings.url || '')
|
||||
setUsername(gotenbergSettings.username || '')
|
||||
setPassword('')
|
||||
setTestResult(null)
|
||||
}
|
||||
}, [gotenbergSettings])
|
||||
|
||||
const { mutateAsync: saveSettings, isPending: isSaving } = useMutation({
|
||||
mutationFn: async () => {
|
||||
const res = await client.api.teams[':teamId']['gotenberg-settings'].$put({
|
||||
param: { teamId },
|
||||
json: {
|
||||
url: url.trim(),
|
||||
username: username.trim() || undefined,
|
||||
password: password || undefined,
|
||||
},
|
||||
})
|
||||
if (!res.ok) {
|
||||
const err = await res.json().catch(() => ({}))
|
||||
throw new Error(
|
||||
(err as { message?: string }).message || 'Failed to update gotenberg settings',
|
||||
)
|
||||
}
|
||||
return await res.json()
|
||||
},
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ['teams', teamId, 'gotenberg-settings'],
|
||||
})
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ['teams', teamId, 'settings'],
|
||||
})
|
||||
toast.success(m.settings_updated())
|
||||
},
|
||||
onError: (err: Error) => {
|
||||
toast.error(err.message || m.failed_update_settings())
|
||||
},
|
||||
})
|
||||
|
||||
const handleTestConnection = async () => {
|
||||
setIsTesting(true)
|
||||
setTestResult(null)
|
||||
try {
|
||||
const res = await client.api.teams[':teamId']['gotenberg-settings'].test.$post({
|
||||
param: { teamId },
|
||||
json: {
|
||||
url: url.trim() || undefined,
|
||||
username: username.trim() || undefined,
|
||||
password: password || undefined,
|
||||
},
|
||||
})
|
||||
if (!res.ok) {
|
||||
const err = await res.json().catch(() => ({}))
|
||||
const errorMsg = (err as { message?: string }).message || 'Request failed'
|
||||
setTestResult({ ok: false, error: errorMsg })
|
||||
toast.error(m.gotenberg_connection_failed())
|
||||
return
|
||||
}
|
||||
const data = await res.json()
|
||||
setTestResult(data)
|
||||
if (data.ok) {
|
||||
toast.success(m.gotenberg_connection_success())
|
||||
} else {
|
||||
toast.error(data.error || m.gotenberg_connection_failed())
|
||||
}
|
||||
} catch (err) {
|
||||
const msg = err instanceof Error ? err.message : String(err)
|
||||
setTestResult({ ok: false, error: msg })
|
||||
toast.error(m.gotenberg_connection_failed())
|
||||
} finally {
|
||||
setIsTesting(false)
|
||||
}
|
||||
}
|
||||
|
||||
const isEnvConfigured = Boolean(gotenbergSettings?.isEnvConfigured)
|
||||
|
||||
return (
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<div className="flex items-center justify-between">
|
||||
<CardTitle>{m.gotenberg_settings()}</CardTitle>
|
||||
{isEnvConfigured && (
|
||||
<Badge variant="secondary" className="gap-1">
|
||||
<Info className="w-3 h-3" />
|
||||
{m.gotenberg_env_configured()}
|
||||
</Badge>
|
||||
)}
|
||||
</div>
|
||||
<CardDescription>{m.gotenberg_settings_description()}</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent className="space-y-4">
|
||||
{isLoading ? (
|
||||
<div className="flex items-center justify-center py-6">
|
||||
<Loader2 className="w-6 h-6 animate-spin text-muted-foreground" />
|
||||
</div>
|
||||
) : (
|
||||
<>
|
||||
<div className="space-y-1.5">
|
||||
<label htmlFor="gotenberg-url" className="text-sm font-medium">
|
||||
{m.gotenberg_server_url()}
|
||||
</label>
|
||||
<Input
|
||||
id="gotenberg-url"
|
||||
value={url}
|
||||
onChange={(e) => setUrl(e.target.value)}
|
||||
placeholder={m.gotenberg_server_url_placeholder()}
|
||||
disabled={isEnvConfigured || isSaving}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
||||
<div className="space-y-1.5">
|
||||
<label htmlFor="gotenberg-username" className="text-sm font-medium">
|
||||
{m.gotenberg_username()}
|
||||
</label>
|
||||
<Input
|
||||
id="gotenberg-username"
|
||||
value={username}
|
||||
onChange={(e) => setUsername(e.target.value)}
|
||||
placeholder="admin"
|
||||
disabled={isEnvConfigured || isSaving}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="space-y-1.5">
|
||||
<label htmlFor="gotenberg-password" className="text-sm font-medium">
|
||||
{m.gotenberg_password()}
|
||||
</label>
|
||||
<Input
|
||||
id="gotenberg-password"
|
||||
type="password"
|
||||
value={password}
|
||||
onChange={(e) => setPassword(e.target.value)}
|
||||
placeholder={
|
||||
gotenbergSettings?.hasPassword ? m.gotenberg_password_placeholder() : '••••••••'
|
||||
}
|
||||
disabled={isEnvConfigured || isSaving}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{testResult && (
|
||||
<div
|
||||
className={`flex items-center gap-2 p-3 rounded-lg border text-sm ${
|
||||
testResult.ok
|
||||
? 'border-emerald-500/30 bg-emerald-500/10 text-emerald-600 dark:text-emerald-400'
|
||||
: 'border-destructive/30 bg-destructive/10 text-destructive'
|
||||
}`}
|
||||
>
|
||||
{testResult.ok ? (
|
||||
<>
|
||||
<CheckCircle2 className="w-4 h-4 shrink-0" />
|
||||
<span>
|
||||
{m.gotenberg_connection_success()}
|
||||
{testResult.version ? ` (v${testResult.version})` : ''}
|
||||
</span>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<XCircle className="w-4 h-4 shrink-0" />
|
||||
<span>
|
||||
{m.gotenberg_connection_failed()}: {testResult.error}
|
||||
</span>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</CardContent>
|
||||
<CardFooter className="flex justify-between border-t border-border pt-4">
|
||||
<Button
|
||||
type="button"
|
||||
variant="outline"
|
||||
onClick={handleTestConnection}
|
||||
disabled={isLoading || isTesting || !url.trim()}
|
||||
>
|
||||
{isTesting && <Loader2 className="w-4 h-4 mr-2 animate-spin" />}
|
||||
{isTesting ? m.gotenberg_testing() : m.gotenberg_test_connection()}
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
type="button"
|
||||
onClick={() => saveSettings()}
|
||||
disabled={isEnvConfigured || isSaving || isLoading}
|
||||
>
|
||||
{isSaving && <Loader2 className="w-4 h-4 mr-2 animate-spin" />}
|
||||
{m.save()}
|
||||
</Button>
|
||||
</CardFooter>
|
||||
</Card>
|
||||
)
|
||||
}
|
||||
@@ -60,8 +60,8 @@ export const TurntableSettingsCard: React.FC<TurntableSettingsCardProps> = ({ te
|
||||
const res = await client.api.teams[':teamId']['turntable-settings'].$put({
|
||||
param: { teamId },
|
||||
json: {
|
||||
url: url || undefined,
|
||||
username: username || undefined,
|
||||
url: url.trim(),
|
||||
username: username.trim() || undefined,
|
||||
password: password || undefined,
|
||||
},
|
||||
})
|
||||
|
||||
@@ -269,6 +269,20 @@
|
||||
"turntable_connection_success": "Connected successfully",
|
||||
"turntable_connection_failed": "Connection failed",
|
||||
"turntable_testing": "Testing...",
|
||||
"integrations": "Integrations",
|
||||
"integrations_settings_description": "Configure third-party service integrations for media rendering and document processing.",
|
||||
"gotenberg_settings": "Gotenberg Document Converter",
|
||||
"gotenberg_settings_description": "Configure the external Gotenberg service for converting Office documents, Markdown, and HTML to PDF.",
|
||||
"gotenberg_server_url": "Server URL",
|
||||
"gotenberg_server_url_placeholder": "e.g. http://localhost:3000",
|
||||
"gotenberg_username": "Username",
|
||||
"gotenberg_password": "Password",
|
||||
"gotenberg_password_placeholder": "Leave blank to keep existing password",
|
||||
"gotenberg_env_configured": "Configured via environment variables (Read-only)",
|
||||
"gotenberg_test_connection": "Test Connection",
|
||||
"gotenberg_connection_success": "Connected successfully",
|
||||
"gotenberg_connection_failed": "Connection failed",
|
||||
"gotenberg_testing": "Testing...",
|
||||
"hardware_acceleration_section_description": "Configure hardware-accelerated video encoding to offload workloads to GPUs, or use CPU software encoding.",
|
||||
"mp4_transcoding": "MP4 Transcoding",
|
||||
"mp4_transcoding_description": "Generate web-compatible MP4 files for file downloads and standard video playback.",
|
||||
|
||||
@@ -269,6 +269,20 @@
|
||||
"turntable_connection_success": "连接成功",
|
||||
"turntable_connection_failed": "连接失败",
|
||||
"turntable_testing": "正在测试...",
|
||||
"integrations": "集成",
|
||||
"integrations_settings_description": "配置用于媒体渲染与文档处理的第三方服务集成。",
|
||||
"gotenberg_settings": "Gotenberg 文档转换服务",
|
||||
"gotenberg_settings_description": "配置用于将 Office 文档、Markdown 及 HTML 转换为 PDF 的外部 Gotenberg 服务。",
|
||||
"gotenberg_server_url": "服务地址",
|
||||
"gotenberg_server_url_placeholder": "例如 http://localhost:3000",
|
||||
"gotenberg_username": "用户名",
|
||||
"gotenberg_password": "密码",
|
||||
"gotenberg_password_placeholder": "留空以保留当前密码",
|
||||
"gotenberg_env_configured": "已通过环境变量配置(只读)",
|
||||
"gotenberg_test_connection": "测试连接",
|
||||
"gotenberg_connection_success": "连接成功",
|
||||
"gotenberg_connection_failed": "连接失败",
|
||||
"gotenberg_testing": "正在测试...",
|
||||
"hardware_acceleration_section_description": "配置硬件加速视频编码以将工作负载分流至 GPU,或使用 CPU 软件编码。",
|
||||
"mp4_transcoding": "MP4 转码",
|
||||
"mp4_transcoding_description": "生成适用于文件下载和标准视频播放的 Web 兼容 MP4 文件。",
|
||||
|
||||
@@ -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