feat: rename section to Account, move Danger Zone to own sidebar item

- Rename "Pulse Settings" to "Account"
- Add hideDangerZone prop to hide it from Profile tab
- Add standalone "Danger Zone" item under Account section
- Bump @ciphera-net/ui to ^0.0.92
This commit is contained in:
Usman Baig
2026-03-06 12:23:00 +01:00
parent 6d360cf1ac
commit acede8ca54
4 changed files with 12 additions and 9 deletions

View File

@@ -9,11 +9,12 @@ import { setup2FA, verify2FA, disable2FA, regenerateRecoveryCodes } from '@/lib/
import { registerPasskey, listPasskeys, deletePasskey } from '@/lib/api/webauthn'
interface Props {
activeTab?: 'profile' | 'security' | 'preferences'
activeTab?: 'profile' | 'security' | 'preferences' | 'danger-zone'
borderless?: boolean
hideDangerZone?: boolean
}
export default function ProfileSettings({ activeTab, borderless }: Props = {}) {
export default function ProfileSettings({ activeTab, borderless, hideDangerZone }: Props = {}) {
const { user, refresh, logout } = useAuth()
if (!user) return null
@@ -63,6 +64,7 @@ export default function ProfileSettings({ activeTab, borderless }: Props = {}) {
hideNav={activeTab !== undefined}
hideNotifications
borderless={borderless}
hideDangerZone={hideDangerZone}
/>
)
}

View File

@@ -90,13 +90,14 @@ export default function SettingsModalWrapper() {
const sections: SettingsSection[] = [
{
id: 'pulse',
label: 'Pulse Settings',
label: 'Account',
icon: UserIcon,
defaultExpanded: true,
items: [
{ id: 'profile', label: 'Profile', content: <ProfileSettings activeTab="profile" borderless /> },
{ id: 'profile', label: 'Profile', content: <ProfileSettings activeTab="profile" borderless hideDangerZone /> },
{ id: 'security', label: 'Security', content: <ProfileSettings activeTab="security" borderless /> },
{ id: 'preferences', label: 'Preferences', content: <ProfileSettings activeTab="preferences" borderless /> },
{ id: 'danger-zone', label: 'Danger Zone', content: <ProfileSettings activeTab="danger-zone" borderless /> },
],
},
{