mirror of
https://github.com/ruvnet/RuVector.git
synced 2026-05-24 22:15:18 +00:00
Major additions: - Complete Next.js studio application with 1600+ components - Docker support (Dockerfile.combined, docker-compose.yml) - GCP deployment documentation and benchmarks - SQL benchmark scripts for performance testing - Sentry integration for monitoring - Comprehensive test suite and mocks Studio features: - Dashboard and admin interfaces - Data visualization components - Authentication and user management - API integration with RuVector backend - Static data and public assets 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
83 lines
2.3 KiB
TypeScript
83 lines
2.3 KiB
TypeScript
import Link from 'next/link'
|
|
import { PropsWithChildren } from 'react'
|
|
|
|
import { useParams } from 'common'
|
|
import { useCurrentPath } from 'hooks/misc/useCurrentPath'
|
|
import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled'
|
|
import { NavMenu, NavMenuItem } from 'ui'
|
|
import { ScaffoldContainerLegacy, ScaffoldTitle } from '../Scaffold'
|
|
|
|
function OrganizationSettingsLayout({ children }: PropsWithChildren) {
|
|
const { slug } = useParams()
|
|
// Get the path without any hash values
|
|
const fullCurrentPath = useCurrentPath()
|
|
const [currentPath] = fullCurrentPath.split('#')
|
|
|
|
const {
|
|
organizationShowSsoSettings: showSsoSettings,
|
|
organizationShowSecuritySettings: showSecuritySettings,
|
|
organizationShowLegalDocuments: showLegalDocuments,
|
|
} = useIsFeatureEnabled([
|
|
'organization:show_sso_settings',
|
|
'organization:show_security_settings',
|
|
'organization:show_legal_documents',
|
|
])
|
|
|
|
const navMenuItems = [
|
|
{
|
|
label: 'General',
|
|
href: `/org/${slug}/general`,
|
|
},
|
|
...(showSecuritySettings
|
|
? [
|
|
{
|
|
label: 'Security',
|
|
href: `/org/${slug}/security`,
|
|
},
|
|
]
|
|
: []),
|
|
{
|
|
label: 'OAuth Apps',
|
|
href: `/org/${slug}/apps`,
|
|
},
|
|
...(showSsoSettings
|
|
? [
|
|
{
|
|
label: 'SSO',
|
|
href: `/org/${slug}/sso`,
|
|
},
|
|
]
|
|
: []),
|
|
|
|
{
|
|
label: 'Audit Logs',
|
|
href: `/org/${slug}/audit`,
|
|
},
|
|
...(showLegalDocuments
|
|
? [
|
|
{
|
|
label: 'Legal Documents',
|
|
href: `/org/${slug}/documents`,
|
|
},
|
|
]
|
|
: []),
|
|
]
|
|
|
|
return (
|
|
<>
|
|
<ScaffoldContainerLegacy className="mb-0">
|
|
<ScaffoldTitle>Organization Settings</ScaffoldTitle>
|
|
<NavMenu className="overflow-x-auto" aria-label="Organization menu navigation">
|
|
{(navMenuItems.filter(Boolean) as { label: string; href: string }[]).map((item) => (
|
|
<NavMenuItem key={item.label} active={currentPath === item.href}>
|
|
<Link href={item.href}>{item.label}</Link>
|
|
</NavMenuItem>
|
|
))}
|
|
</NavMenu>
|
|
</ScaffoldContainerLegacy>
|
|
<div className="h-full w-full overflow-y-auto">{children}</div>
|
|
</>
|
|
)
|
|
}
|
|
|
|
export default OrganizationSettingsLayout
|