Skip to content

Commit 3595a85

Browse files
committed
added menu items to drop down logged in user menu
1 parent 63bd00c commit 3595a85

1 file changed

Lines changed: 49 additions & 1 deletion

File tree

src/mainPage/header.ts

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ import { setActiveMenuPane } from './menu'
66
import type { OutlineManager } from '../outline/manager'
77

88
import '~icons/lucide/user'
9+
import '~icons/lucide/users'
10+
import '~icons/lucide/folder-open'
11+
import '~icons/lucide/layout-dashboard'
12+
import '~icons/lucide/settings-2'
913
import '../components/header'
1014

1115
export async function createHeader (outliner: OutlineManager) {
@@ -28,7 +32,51 @@ export async function createHeader (outliner: OutlineManager) {
2832
setActiveMenuPane('profile')
2933
}
3034
}
31-
}
35+
},
36+
{
37+
label: html`<icon-lucide-users slot="left-icon"></icon-lucide-users> Friends`,
38+
onSelected () {
39+
const currentUser = authn.currentUser()
40+
41+
if (currentUser) {
42+
outliner.showDashboard(currentUser, { pane: 'social' })
43+
setActiveMenuPane('social')
44+
}
45+
}
46+
},
47+
{
48+
label: html`<icon-lucide-folder-open slot="left-icon"></icon-lucide-folder-open> Storage`,
49+
onSelected () {
50+
const currentUser = authn.currentUser()
51+
52+
if (currentUser) {
53+
outliner.showDashboard(currentUser, { pane: 'folder' })
54+
setActiveMenuPane('folder')
55+
}
56+
}
57+
},
58+
{
59+
label: html`<icon-lucide-layout-dashboard slot="left-icon"></icon-lucide-layout-dashboard> Dashboard`,
60+
onSelected () {
61+
const currentUser = authn.currentUser()
62+
63+
if (currentUser) {
64+
outliner.showDashboard(currentUser, { pane: 'home' })
65+
setActiveMenuPane('home')
66+
}
67+
}
68+
},
69+
{
70+
label: html`<icon-lucide-settings-2 slot="left-icon"></icon-lucide-settings-2> Preferences`,
71+
onSelected () {
72+
const currentUser = authn.currentUser()
73+
74+
if (currentUser) {
75+
outliner.showDashboard(currentUser, { pane: 'basicPreferences' })
76+
setActiveMenuPane('basicPreferences')
77+
}
78+
}
79+
},
3280
]
3381

3482
render(

0 commit comments

Comments
 (0)