feat: settings modal improvements — borderless profile, remove descriptions, bump ui to 0.0.91
- Add borderless prop passthrough to ProfileSettings - Remove section descriptions from SettingsModalWrapper sidebar - Bump @ciphera-net/ui to ^0.0.91
This commit is contained in:
@@ -10,9 +10,10 @@ import { registerPasskey, listPasskeys, deletePasskey } from '@/lib/api/webauthn
|
|||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
activeTab?: 'profile' | 'security' | 'preferences'
|
activeTab?: 'profile' | 'security' | 'preferences'
|
||||||
|
borderless?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function ProfileSettings({ activeTab }: Props = {}) {
|
export default function ProfileSettings({ activeTab, borderless }: Props = {}) {
|
||||||
const { user, refresh, logout } = useAuth()
|
const { user, refresh, logout } = useAuth()
|
||||||
|
|
||||||
if (!user) return null
|
if (!user) return null
|
||||||
@@ -61,6 +62,7 @@ export default function ProfileSettings({ activeTab }: Props = {}) {
|
|||||||
activeTab={activeTab}
|
activeTab={activeTab}
|
||||||
hideNav={activeTab !== undefined}
|
hideNav={activeTab !== undefined}
|
||||||
hideNotifications
|
hideNotifications
|
||||||
|
borderless={borderless}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,19 +91,17 @@ export default function SettingsModalWrapper() {
|
|||||||
{
|
{
|
||||||
id: 'pulse',
|
id: 'pulse',
|
||||||
label: 'Pulse Settings',
|
label: 'Pulse Settings',
|
||||||
description: 'Profile and preferences',
|
|
||||||
icon: UserIcon,
|
icon: UserIcon,
|
||||||
defaultExpanded: true,
|
defaultExpanded: true,
|
||||||
items: [
|
items: [
|
||||||
{ id: 'profile', label: 'Profile', content: <ProfileSettings activeTab="profile" /> },
|
{ id: 'profile', label: 'Profile', content: <ProfileSettings activeTab="profile" borderless /> },
|
||||||
{ id: 'security', label: 'Security', content: <ProfileSettings activeTab="security" /> },
|
{ id: 'security', label: 'Security', content: <ProfileSettings activeTab="security" borderless /> },
|
||||||
{ id: 'preferences', label: 'Preferences', content: <ProfileSettings activeTab="preferences" /> },
|
{ id: 'preferences', label: 'Preferences', content: <ProfileSettings activeTab="preferences" borderless /> },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'security-section',
|
id: 'security-section',
|
||||||
label: 'Security',
|
label: 'Security',
|
||||||
description: 'Devices and activity',
|
|
||||||
icon: LockIcon,
|
icon: LockIcon,
|
||||||
items: [
|
items: [
|
||||||
{ id: 'devices', label: 'Trusted Devices', content: <TrustedDevicesCard /> },
|
{ id: 'devices', label: 'Trusted Devices', content: <TrustedDevicesCard /> },
|
||||||
@@ -113,7 +111,6 @@ export default function SettingsModalWrapper() {
|
|||||||
{
|
{
|
||||||
id: 'notifications',
|
id: 'notifications',
|
||||||
label: 'Notifications',
|
label: 'Notifications',
|
||||||
description: 'Email and in-app notifications',
|
|
||||||
icon: BellIcon,
|
icon: BellIcon,
|
||||||
items: [
|
items: [
|
||||||
{ id: 'security-alerts', label: 'Security Alerts', content: <SecurityAlertsCard /> },
|
{ id: 'security-alerts', label: 'Security Alerts', content: <SecurityAlertsCard /> },
|
||||||
|
|||||||
8
package-lock.json
generated
8
package-lock.json
generated
@@ -8,7 +8,7 @@
|
|||||||
"name": "pulse-frontend",
|
"name": "pulse-frontend",
|
||||||
"version": "0.13.0-alpha",
|
"version": "0.13.0-alpha",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ciphera-net/ui": "^0.0.89",
|
"@ciphera-net/ui": "^0.0.91",
|
||||||
"@ducanh2912/next-pwa": "^10.2.9",
|
"@ducanh2912/next-pwa": "^10.2.9",
|
||||||
"@radix-ui/react-icons": "^1.3.0",
|
"@radix-ui/react-icons": "^1.3.0",
|
||||||
"@simplewebauthn/browser": "^13.2.2",
|
"@simplewebauthn/browser": "^13.2.2",
|
||||||
@@ -1665,9 +1665,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@ciphera-net/ui": {
|
"node_modules/@ciphera-net/ui": {
|
||||||
"version": "0.0.89",
|
"version": "0.0.91",
|
||||||
"resolved": "https://npm.pkg.github.com/download/@ciphera-net/ui/0.0.89/2c528b440d3984e20a524be8a1d458df0aa8597e",
|
"resolved": "https://npm.pkg.github.com/download/@ciphera-net/ui/0.0.91/7576638f924b0fe731de561d668315f61b5b5590",
|
||||||
"integrity": "sha512-Ax4EMJCbWeEaCkoQqFCbl28QE5TnS0OY2nPNQiLVdLcG3xyiAgGL7MPpewo1RAUOrYm1/cr3F4Z3iiX7VAeSMA==",
|
"integrity": "sha512-PIG+zxGW8LCXbC3tFkvN0d7B+axcyXsZm3/GI96gC9px8YPDNYDiFSJXM2VH4ls+DeNBpCiykfKdgujD9IcxNw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@radix-ui/react-icons": "^1.3.0",
|
"@radix-ui/react-icons": "^1.3.0",
|
||||||
"clsx": "^2.1.0",
|
"clsx": "^2.1.0",
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
"test:watch": "vitest"
|
"test:watch": "vitest"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ciphera-net/ui": "^0.0.89",
|
"@ciphera-net/ui": "^0.0.91",
|
||||||
"@ducanh2912/next-pwa": "^10.2.9",
|
"@ducanh2912/next-pwa": "^10.2.9",
|
||||||
"@radix-ui/react-icons": "^1.3.0",
|
"@radix-ui/react-icons": "^1.3.0",
|
||||||
"@simplewebauthn/browser": "^13.2.2",
|
"@simplewebauthn/browser": "^13.2.2",
|
||||||
|
|||||||
Reference in New Issue
Block a user