@@ -131,127 +131,136 @@ function App() {
131131
132132 return (
133133 < div
134- className = "flex h-dvh w-screen select-none"
135- style = { { maxWidth : "100vw" } }
134+ className = "flex w-screen select-none"
135+ style = { { maxWidth : "100vw" , height : "calc(100dvh - 2rem)" } }
136136 >
137- < div className = "relative flex h-full flex-col !border-r-small border-divider transition-width pb-6 pt-9 items-center" >
138- < div className = "flex items-center gap-0 px-3 justify-center" >
139- < div className = "flex h-8 w-8" >
140- < img src = { icon } alt = "icon" className = "h-8 w-8" />
137+ < div className = "flex w-full" >
138+ < div className = "relative flex flex-col !border-r-small border-divider transition-width pb-6 pt-4 items-center" >
139+ < div className = "flex items-center gap-0 px-3 justify-center" >
140+ < div className = "flex h-8 w-8" >
141+ < img src = { icon } alt = "icon" className = "h-8 w-8" />
142+ </ div >
141143 </ div >
142- </ div >
143-
144- < ScrollShadow className = "-mr-6 h-full max-h-full py-6 pr-6" >
145- < Sidebar
146- defaultSelectedKey = "home"
147- isCompact = { true }
148- items = { navigation }
149- />
150- </ ScrollShadow >
151144
152- < Spacer y = { 2 } />
145+ < ScrollShadow className = "-mr-6 h-full max-h-full py-6 pr-6" >
146+ < Sidebar
147+ defaultSelectedKey = "home"
148+ isCompact = { true }
149+ items = { navigation }
150+ className = "z-50"
151+ />
152+ </ ScrollShadow >
153153
154- < div className = "flex items-center gap-3 px-3" >
155- < Dropdown showArrow placement = "right-start" >
156- < DropdownTrigger >
157- < Button disableRipple isIconOnly radius = "full" variant = "light" >
158- < Avatar
159- isBordered
160- className = "flex-none"
161- size = "sm"
162- name = { user . username || "" }
163- />
164- </ Button >
165- </ DropdownTrigger >
166- < DropdownMenu aria-label = "Custom item styles" >
167- < DropdownItem
168- key = "profile"
169- isReadOnly
170- className = "h-14 opacity-100"
171- textValue = "Signed in as"
172- >
173- < User
174- avatarProps = { {
175- size : "sm" ,
176- name : user . username || "Anonymous User" ,
177- showFallback : true ,
178- imgProps : {
179- className : "transition-none" ,
180- } ,
181- } }
182- classNames = { {
183- name : "text-default-600" ,
184- description : "text-default-500" ,
185- } }
186- description = {
187- user . bio || ( user . username && "No bio" ) || "Sign up now"
188- }
189- name = { user . username || "Anonymous User" }
190- />
191- </ DropdownItem >
154+ < Spacer y = { 2 } />
192155
193- < DropdownItem
194- key = "settings"
195- description = "Configure Atuin"
196- startContent = { < Icon icon = "solar:settings-linear" width = { 24 } /> }
197- >
198- Settings
199- </ DropdownItem >
156+ < div className = "flex items-center gap-3 px-3" >
157+ < Dropdown showArrow placement = "right-start" >
158+ < DropdownTrigger >
159+ < Button disableRipple isIconOnly radius = "full" variant = "light" >
160+ < Avatar
161+ isBordered
162+ className = "flex-none"
163+ size = "sm"
164+ name = { user . username || "" }
165+ />
166+ </ Button >
167+ </ DropdownTrigger >
168+ < DropdownMenu aria-label = "Custom item styles" >
169+ < DropdownItem
170+ key = "profile"
171+ isReadOnly
172+ className = "h-14 opacity-100"
173+ textValue = "Signed in as"
174+ >
175+ < User
176+ avatarProps = { {
177+ size : "sm" ,
178+ name : user . username || "Anonymous User" ,
179+ showFallback : true ,
180+ imgProps : {
181+ className : "transition-none" ,
182+ } ,
183+ } }
184+ classNames = { {
185+ name : "text-default-600" ,
186+ description : "text-default-500" ,
187+ } }
188+ description = {
189+ user . bio || ( user . username && "No bio" ) || "Sign up now"
190+ }
191+ name = { user . username || "Anonymous User" }
192+ />
193+ </ DropdownItem >
200194
201- < DropdownSection aria-label = "Help & Feedback" >
202195 < DropdownItem
203- key = "help_and_feedback"
204- description = "Get in touch"
205- onPress = { ( ) => open ( "https://forum.atuin.sh" ) }
196+ key = "settings"
197+ description = "Configure Atuin"
206198 startContent = {
207- < Icon width = { 24 } icon = "solar:question-circle- linear" />
199+ < Icon icon = "solar:settings- linear" width = { 24 } />
208200 }
209201 >
210- Help & Feedback
202+ Settings
211203 </ DropdownItem >
212204
213- { ( user . username && (
205+ < DropdownSection aria-label = "Help & Feedback" >
214206 < DropdownItem
215- key = "logout"
207+ key = "help_and_feedback"
208+ description = "Get in touch"
209+ onPress = { ( ) => open ( "https://forum.atuin.sh" ) }
216210 startContent = {
217- < Icon width = { 24 } icon = "solar:logout-broken " />
211+ < Icon width = { 24 } icon = "solar:question-circle-linear " />
218212 }
219- onClick = { ( ) => {
220- logout ( ) ;
221- refreshUser ( ) ;
222- } }
223- >
224- Log Out
225- </ DropdownItem >
226- ) ) || (
227- < DropdownItem
228- key = "signup"
229- description = "Sync, backup and share your data"
230- className = "bg-emerald-100"
231- startContent = { < KeyRoundIcon size = "18px" /> }
232- onPress = { onOpen }
233213 >
234- Log in or Register
214+ Help & Feedback
235215 </ DropdownItem >
236- ) }
237- </ DropdownSection >
238- </ DropdownMenu >
239- </ Dropdown >
216+
217+ { ( user . username && (
218+ < DropdownItem
219+ key = "logout"
220+ startContent = {
221+ < Icon width = { 24 } icon = "solar:logout-broken" />
222+ }
223+ onClick = { ( ) => {
224+ logout ( ) ;
225+ refreshUser ( ) ;
226+ } }
227+ >
228+ Log Out
229+ </ DropdownItem >
230+ ) ) || (
231+ < DropdownItem
232+ key = "signup"
233+ description = "Sync, backup and share your data"
234+ className = "bg-emerald-100"
235+ startContent = { < KeyRoundIcon size = "18px" /> }
236+ onPress = { onOpen }
237+ >
238+ Log in or Register
239+ </ DropdownItem >
240+ ) }
241+ </ DropdownSection >
242+ </ DropdownMenu >
243+ </ Dropdown >
244+ </ div >
240245 </ div >
241- </ div >
242246
243- { renderMain ( section ) }
247+ { renderMain ( section ) }
244248
245- < Toaster />
246- < Modal isOpen = { isOpen } onOpenChange = { onOpenChange } placement = "top-center" >
247- < ModalContent className = "p-8" >
248- { ( onClose ) => (
249- < >
250- < LoginOrRegister onClose = { onClose } />
251- </ >
252- ) }
253- </ ModalContent >
254- </ Modal >
249+ < Toaster />
250+ < Modal
251+ isOpen = { isOpen }
252+ onOpenChange = { onOpenChange }
253+ placement = "top-center"
254+ >
255+ < ModalContent className = "p-8" >
256+ { ( onClose ) => (
257+ < >
258+ < LoginOrRegister onClose = { onClose } />
259+ </ >
260+ ) }
261+ </ ModalContent >
262+ </ Modal >
263+ </ div >
255264 </ div >
256265 ) ;
257266}
0 commit comments