@@ -11,6 +11,7 @@ import { ScrollArea } from "@/app/components/ui/scroll-area";
1111import { Sheet , SheetContent } from "@/app/components/ui/sheet" ;
1212import { useAuth } from "@/app/hooks/useAuth" ;
1313import { cn } from "@/app/lib/utils" ;
14+ import { mode } from "@/server/lib/env" ;
1415import type { chatService } from "@/server/service/chat" ;
1516import { useNavigate } from "@tanstack/react-router" ;
1617import { MoreVertical , Palette , PanelLeftClose , PanelRightClose , Plus , Settings , Trash2 } from "lucide-react" ;
@@ -199,49 +200,51 @@ export function ChatSidebar({
199200 </ div >
200201 </ div >
201202 { /* BOTTOM SECTION - Fixed height at bottom (User Profile or Login) */ }
202- < div className = "mt-auto flex-shrink-0 border-border border-t bg-muted/30" >
203- < div className = "p-4" >
204- { isAuthenticated ? (
205- /* Logged in user profile */
206- < div className = "flex items-center gap-3" >
207- < Avatar className = "h-9 w-9 ring-2 ring-primary/20" >
208- < AvatarImage src = { user . avatar } alt = { t ( "user.avatar" ) } />
209- < AvatarFallback className = "bg-gradient-to-br from-primary to-primary/80 font-semibold text-primary-foreground text-sm" >
210- { user . nickname . charAt ( 0 ) . toUpperCase ( ) }
211- </ AvatarFallback >
212- </ Avatar >
213- < div className = "flex-1 overflow-hidden" >
214- < div className = "truncate font-medium text-sm leading-tight" > { user . nickname } </ div >
215- < div className = "mt-1 flex items-center gap-1.5" >
216- < div className = "h-2 w-2 rounded-full bg-green-500" />
217- < span className = "text-muted-foreground text-xs" > { t ( "user.online" ) } </ span >
203+ { mode !== "client" && (
204+ < div className = "mt-auto flex-shrink-0 border-border border-t bg-muted/30" >
205+ < div className = "p-4" >
206+ { isAuthenticated ? (
207+ /* Logged in user profile */
208+ < div className = "flex items-center gap-3" >
209+ < Avatar className = "h-9 w-9 ring-2 ring-primary/20" >
210+ < AvatarImage src = { user . avatar } alt = { t ( "user.avatar" ) } />
211+ < AvatarFallback className = "bg-gradient-to-br from-primary to-primary/80 font-semibold text-primary-foreground text-sm" >
212+ { user . nickname . charAt ( 0 ) . toUpperCase ( ) }
213+ </ AvatarFallback >
214+ </ Avatar >
215+ < div className = "flex-1 overflow-hidden" >
216+ < div className = "truncate font-medium text-sm leading-tight" > { user . nickname } </ div >
217+ < div className = "mt-1 flex items-center gap-1.5" >
218+ < div className = "h-2 w-2 rounded-full bg-green-500" />
219+ < span className = "text-muted-foreground text-xs" > { t ( "user.online" ) } </ span >
220+ </ div >
218221 </ div >
222+ < Button
223+ variant = "ghost"
224+ size = "sm"
225+ onClick = { ( ) => {
226+ navigate ( { to : "/settings" , search : { } } ) ;
227+ if ( isMobile ) closeSidebar ( ) ;
228+ } }
229+ className = "h-8 w-8 transition-colors hover:bg-accent"
230+ title = { t ( "settings.title" ) }
231+ >
232+ < Settings className = "h-4 w-4" />
233+ </ Button >
219234 </ div >
220- < Button
221- variant = "ghost"
222- size = "sm"
223- onClick = { ( ) => {
224- navigate ( { to : "/settings" , search : { } } ) ;
225- if ( isMobile ) closeSidebar ( ) ;
226- } }
227- className = "h-8 w-8 transition-colors hover:bg-accent"
228- title = { t ( "settings.title" ) }
229- >
230- < Settings className = "h-4 w-4" />
231- </ Button >
232- </ div >
233- ) : (
234- /* Login prompt for non-authenticated users */
235- < div className = "space-y-3" >
236- < div className = "text-center" >
237- < p className = "font-medium text-sm" > { t ( "auth.welcomeMessage" ) } </ p >
238- < p className = "text-muted-foreground text-xs" > { t ( "auth.loginToSave" ) } </ p >
235+ ) : (
236+ /* Login prompt for non-authenticated users */
237+ < div className = "space-y-3" >
238+ < div className = "text-center" >
239+ < p className = "font-medium text-sm" > { t ( "auth.welcomeMessage" ) } </ p >
240+ < p className = "text-muted-foreground text-xs" > { t ( "auth.loginToSave" ) } </ p >
241+ </ div >
242+ < LoginButton className = "w-full" />
239243 </ div >
240- < LoginButton className = "w-full" />
241- </ div >
242- ) }
244+ ) }
245+ </ div >
243246 </ div >
244- </ div >
247+ ) }
245248 </ div >
246249 ) ;
247250 // Mobile: Use Sheet (drawer) - controlled by hooks
0 commit comments