-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathside-bar.tsx
More file actions
87 lines (83 loc) · 3.86 KB
/
side-bar.tsx
File metadata and controls
87 lines (83 loc) · 3.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
import { User, Building, Settings, Shield, Users } from 'lucide-react';
import React from 'react';
import { useTranslation } from 'react-i18next';
import { Link } from 'react-router-dom';
import { config } from '../config/env';
export const Sidebar: React.FC = () => {
const { t } = useTranslation();
return (
<div className="fixed top-0 left-0 z-40 h-full w-64 bg-white dark:bg-black border-r border-gray-200 dark:border-gray-700 shadow-lg pt-20">
<div className="p-4 space-y-6">
{/* My Account Section */}
{config.features.enableMyAccount && (
<div>
<div className="flex items-center gap-2 mb-3 px-2">
<User className="h-4 w-4 text-gray-600 dark:text-gray-300 flex-shrink-0" />
<h3 className="text-xs font-semibold text-gray-900 dark:text-white uppercase tracking-wider">
{t('sidebar.my-account')}
</h3>
</div>
<ul className="space-y-1">
<li>
<Link
to="/mfa"
className="flex items-center gap-3 px-3 py-2 text-sm text-gray-700 hover:text-gray-900 hover:bg-accent/90 rounded-md dark:text-gray-300 dark:hover:text-white transition-colors"
>
<Shield className="h-4 w-4 flex-shrink-0" />
<span className="truncate">{t('sidebar.multi-factor-authentication')}</span>
</Link>
</li>
</ul>
</div>
)}
{/* My Organization Section */}
<div>
<div className="flex items-center gap-2 mb-3 px-2">
<Building className="h-4 w-4 text-gray-600 dark:text-gray-300 flex-shrink-0" />
<h3 className="text-xs font-semibold text-gray-900 dark:text-white uppercase tracking-wider">
{t('sidebar.my-organization')}
</h3>
</div>
<ul className="space-y-1">
<li>
<Link
to="/organization-management"
className="flex items-center gap-3 px-3 py-2 text-sm text-gray-700 hover:text-gray-900 hover:bg-accent/90 rounded-md dark:text-gray-300 dark:hover:text-white transition-colors cursor-default"
>
<Settings className="h-4 w-4 flex-shrink-0" />
<span className="truncate">{t('sidebar.organization-management')}</span>
</Link>
</li>
<li>
<Link
to="/sso-providers"
className="flex items-center gap-3 px-3 py-2 text-sm text-gray-700 hover:text-gray-900 hover:bg-accent/90 rounded-md dark:text-gray-300 dark:hover:text-white transition-colors cursor-default"
>
<Settings className="h-4 w-4 flex-shrink-0" />
<span className="truncate">{t('sidebar.sso-provider')}</span>
</Link>
</li>
<li>
<Link
to="/domain-management"
className="flex items-center gap-3 px-3 py-2 text-sm text-gray-700 hover:text-gray-900 hover:bg-accent/90 rounded-md dark:text-gray-300 dark:hover:text-white transition-colors cursor-default"
>
<Settings className="h-4 w-4 flex-shrink-0" />
<span className="truncate">{t('sidebar.domain-management')}</span>
</Link>
</li>
<li>
<Link
to="/member-management"
className="flex items-center gap-3 px-3 py-2 text-sm text-gray-700 hover:text-gray-900 hover:bg-accent/90 rounded-md dark:text-gray-300 dark:hover:text-white transition-colors cursor-default"
>
<Users className="h-4 w-4 flex-shrink-0" />
<span className="truncate">{t('sidebar.member-management')}</span>
</Link>
</li>
</ul>
</div>
</div>
</div>
);
};