feat: add email connector route and sidebar navigation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,7 @@ import {
|
|||||||
Sidebar,
|
Sidebar,
|
||||||
TopBar,
|
TopBar,
|
||||||
} from '@cameleer/design-system';
|
} from '@cameleer/design-system';
|
||||||
import { LayoutDashboard, ShieldCheck, Users, Settings, Shield, Building, ScrollText } from 'lucide-react';
|
import { LayoutDashboard, ShieldCheck, Users, Settings, Shield, Building, ScrollText, Mail } from 'lucide-react';
|
||||||
import { useQuery } from '@tanstack/react-query';
|
import { useQuery } from '@tanstack/react-query';
|
||||||
import { useAuth } from '../auth/useAuth';
|
import { useAuth } from '../auth/useAuth';
|
||||||
import { useScopes } from '../auth/useScopes';
|
import { useScopes } from '../auth/useScopes';
|
||||||
@@ -125,11 +125,20 @@ export function Layout() {
|
|||||||
>
|
>
|
||||||
Infrastructure
|
Infrastructure
|
||||||
</div>
|
</div>
|
||||||
|
<div
|
||||||
|
style={{ padding: '6px 12px 6px 36px', fontSize: 13, cursor: 'pointer',
|
||||||
|
fontWeight: isActive(location, '/vendor/email') ? 600 : 400,
|
||||||
|
color: isActive(location, '/vendor/email') ? 'var(--amber)' : 'var(--text-muted)' }}
|
||||||
|
onClick={() => navigate('/vendor/email')}
|
||||||
|
>
|
||||||
|
<Mail size={12} style={{ marginRight: 6, verticalAlign: -1 }} />
|
||||||
|
Email Connector
|
||||||
|
</div>
|
||||||
<div
|
<div
|
||||||
style={{ padding: '6px 12px 6px 36px', fontSize: 13, cursor: 'pointer', color: 'var(--text-muted)' }}
|
style={{ padding: '6px 12px 6px 36px', fontSize: 13, cursor: 'pointer', color: 'var(--text-muted)' }}
|
||||||
onClick={() => window.open(`${window.location.protocol}//${window.location.hostname}:3002`, '_blank', 'noopener')}
|
onClick={() => window.open(`${window.location.protocol}//${window.location.hostname}:3002`, '_blank', 'noopener')}
|
||||||
>
|
>
|
||||||
Identity (Logto)
|
Logto Console
|
||||||
</div>
|
</div>
|
||||||
</Sidebar.Section>
|
</Sidebar.Section>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import { VendorAuditPage } from './pages/vendor/VendorAuditPage';
|
|||||||
import { CertificatesPage } from './pages/vendor/CertificatesPage';
|
import { CertificatesPage } from './pages/vendor/CertificatesPage';
|
||||||
import { InfrastructurePage } from './pages/vendor/InfrastructurePage';
|
import { InfrastructurePage } from './pages/vendor/InfrastructurePage';
|
||||||
import { VendorMetricsPage } from './pages/vendor/VendorMetricsPage';
|
import { VendorMetricsPage } from './pages/vendor/VendorMetricsPage';
|
||||||
|
import { EmailConfigPage } from './pages/vendor/EmailConfigPage';
|
||||||
import { TenantDashboardPage } from './pages/tenant/TenantDashboardPage';
|
import { TenantDashboardPage } from './pages/tenant/TenantDashboardPage';
|
||||||
import { TenantLicensePage } from './pages/tenant/TenantLicensePage';
|
import { TenantLicensePage } from './pages/tenant/TenantLicensePage';
|
||||||
import { SsoPage } from './pages/tenant/SsoPage';
|
import { SsoPage } from './pages/tenant/SsoPage';
|
||||||
@@ -102,6 +103,11 @@ export function AppRouter() {
|
|||||||
<InfrastructurePage />
|
<InfrastructurePage />
|
||||||
</RequireScope>
|
</RequireScope>
|
||||||
} />
|
} />
|
||||||
|
<Route path="/vendor/email" element={
|
||||||
|
<RequireScope scope="platform:admin" fallback={<Navigate to="/tenant" replace />}>
|
||||||
|
<EmailConfigPage />
|
||||||
|
</RequireScope>
|
||||||
|
} />
|
||||||
|
|
||||||
{/* Tenant portal */}
|
{/* Tenant portal */}
|
||||||
<Route path="/tenant" element={<TenantDashboardPage />} />
|
<Route path="/tenant" element={<TenantDashboardPage />} />
|
||||||
|
|||||||
Reference in New Issue
Block a user