@@ -44,13 +44,37 @@ export function AppHeader({ title, icon, className, actions }: AppHeaderProps) {
44
44
< header className = "flex h-10 items-center gap-2 px-2 coarse:h-14" >
45
45
< div className = "hidden items-center empty:hidden sm:flex" >
46
46
{ sidebar === "collapsed" ? (
47
- < IconButton
48
- aria-label = "Expand sidebar"
49
- size = "small"
50
- onClick = { ( ) => setSidebar ( "expanded" ) }
51
- >
52
- < SidebarIcon16 />
53
- </ IconButton >
47
+ < >
48
+ < IconButton
49
+ aria-label = "Expand sidebar"
50
+ size = "small"
51
+ onClick = { ( ) => setSidebar ( "expanded" ) }
52
+ >
53
+ < SidebarIcon16 />
54
+ </ IconButton >
55
+ < IconButton
56
+ aria-label = "New note"
57
+ shortcut = { [ "⌘" , "⇧" , "O" ] }
58
+ size = "small"
59
+ onClick = { ( ) => {
60
+ navigate ( {
61
+ to : "/notes/$" ,
62
+ params : { _splat : `${ Date . now ( ) } ` } ,
63
+ search : {
64
+ mode : "write" ,
65
+ query : undefined ,
66
+ view : "grid" ,
67
+ } ,
68
+ } )
69
+ } }
70
+ >
71
+ < PlusIcon16 />
72
+ </ IconButton >
73
+ < div
74
+ role = "separator"
75
+ className = { cx ( "mx-2 hidden h-5 w-px bg-border-secondary sm:block" ) }
76
+ />
77
+ </ >
54
78
) : null }
55
79
< IconButton
56
80
aria-label = "Go back"
@@ -78,35 +102,7 @@ export function AppHeader({ title, icon, className, actions }: AppHeaderProps) {
78
102
< div className = "truncate font-content font-bold" > { title } </ div >
79
103
</ div >
80
104
< div className = "flex items-center gap-2 justify-self-end" >
81
- { actions ? (
82
- < >
83
- < div className = "flex items-center" > { actions } </ div >
84
- < div
85
- role = "separator"
86
- className = { cx ( "hidden h-5 w-px bg-border-secondary sm:block" ) }
87
- />
88
- </ >
89
- ) : null }
90
- < div className = "hidden items-center sm:flex" >
91
- < IconButton
92
- aria-label = "New note"
93
- shortcut = { [ "⌘" , "⇧" , "O" ] }
94
- size = "small"
95
- onClick = { ( ) => {
96
- navigate ( {
97
- to : "/notes/$" ,
98
- params : { _splat : `${ Date . now ( ) } ` } ,
99
- search : {
100
- mode : "write" ,
101
- query : undefined ,
102
- view : "grid" ,
103
- } ,
104
- } )
105
- } }
106
- >
107
- < PlusIcon16 />
108
- </ IconButton >
109
- </ div >
105
+ { actions ? < div className = "flex items-center" > { actions } </ div > : null }
110
106
</ div >
111
107
</ header >
112
108
</ div >
0 commit comments