mirror of
https://github.com/siteboon/claudecodeui.git
synced 2026-04-04 12:47:28 +00:00
feat: moving new session button higher
This commit is contained in:
@@ -80,6 +80,29 @@ export default function SidebarProjectSessions({
|
||||
|
||||
return (
|
||||
<div className="ml-3 space-y-1 border-l border-border pl-3">
|
||||
<div className="px-3 pb-1 pt-1 md:hidden">
|
||||
<button
|
||||
className="flex h-8 w-full items-center justify-center gap-2 rounded-md bg-primary text-xs font-medium text-primary-foreground transition-all duration-150 hover:bg-primary/90 active:scale-[0.98]"
|
||||
onClick={() => {
|
||||
onProjectSelect(project);
|
||||
onNewSession(project);
|
||||
}}
|
||||
>
|
||||
<Plus className="h-3 w-3" />
|
||||
{t('sessions.newSession')}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<Button
|
||||
variant="default"
|
||||
size="sm"
|
||||
className="hidden h-8 w-full justify-start gap-2 bg-primary text-xs font-medium text-primary-foreground transition-colors hover:bg-primary/90 md:flex"
|
||||
onClick={() => onNewSession(project)}
|
||||
>
|
||||
<Plus className="h-3 w-3" />
|
||||
{t('sessions.newSession')}
|
||||
</Button>
|
||||
|
||||
{!initialSessionsLoaded ? (
|
||||
<SessionListSkeleton />
|
||||
) : !hasSessions && !isLoadingSessions ? (
|
||||
@@ -129,29 +152,6 @@ export default function SidebarProjectSessions({
|
||||
)}
|
||||
</Button>
|
||||
)}
|
||||
|
||||
<div className="px-3 pb-2 md:hidden">
|
||||
<button
|
||||
className="flex h-8 w-full items-center justify-center gap-2 rounded-md bg-primary text-xs font-medium text-primary-foreground transition-all duration-150 hover:bg-primary/90 active:scale-[0.98]"
|
||||
onClick={() => {
|
||||
onProjectSelect(project);
|
||||
onNewSession(project);
|
||||
}}
|
||||
>
|
||||
<Plus className="h-3 w-3" />
|
||||
{t('sessions.newSession')}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<Button
|
||||
variant="default"
|
||||
size="sm"
|
||||
className="mt-1 hidden h-8 w-full justify-start gap-2 bg-primary text-xs font-medium text-primary-foreground transition-colors hover:bg-primary/90 md:flex"
|
||||
onClick={() => onNewSession(project)}
|
||||
>
|
||||
<Plus className="h-3 w-3" />
|
||||
{t('sessions.newSession')}
|
||||
</Button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user