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:
@@ -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}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -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 /> },
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
8
package-lock.json
generated
8
package-lock.json
generated
@@ -8,7 +8,7 @@
|
||||
"name": "pulse-frontend",
|
||||
"version": "0.13.0-alpha",
|
||||
"dependencies": {
|
||||
"@ciphera-net/ui": "^0.0.91",
|
||||
"@ciphera-net/ui": "^0.0.92",
|
||||
"@ducanh2912/next-pwa": "^10.2.9",
|
||||
"@radix-ui/react-icons": "^1.3.0",
|
||||
"@simplewebauthn/browser": "^13.2.2",
|
||||
@@ -1665,9 +1665,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@ciphera-net/ui": {
|
||||
"version": "0.0.91",
|
||||
"resolved": "https://npm.pkg.github.com/download/@ciphera-net/ui/0.0.91/7576638f924b0fe731de561d668315f61b5b5590",
|
||||
"integrity": "sha512-PIG+zxGW8LCXbC3tFkvN0d7B+axcyXsZm3/GI96gC9px8YPDNYDiFSJXM2VH4ls+DeNBpCiykfKdgujD9IcxNw==",
|
||||
"version": "0.0.92",
|
||||
"resolved": "https://npm.pkg.github.com/download/@ciphera-net/ui/0.0.92/68088da543459b34ab9fe780713537713b5e0673",
|
||||
"integrity": "sha512-R+8fyvz7DhqHyJ2gai6ssRY3rE2OQlNt3ZepcpMeZouhujSNLO7KtApS4AP2qvJhKuWTnPNLj/B+kOWC3L4LMA==",
|
||||
"dependencies": {
|
||||
"@radix-ui/react-icons": "^1.3.0",
|
||||
"clsx": "^2.1.0",
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
"test:watch": "vitest"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ciphera-net/ui": "^0.0.91",
|
||||
"@ciphera-net/ui": "^0.0.92",
|
||||
"@ducanh2912/next-pwa": "^10.2.9",
|
||||
"@radix-ui/react-icons": "^1.3.0",
|
||||
"@simplewebauthn/browser": "^13.2.2",
|
||||
|
||||
Reference in New Issue
Block a user