|
2 | 2 | ArrowLeftIcon, |
3 | 3 | ArrowUpDownIcon, |
4 | 4 | ChevronRightIcon, |
| 5 | + EyeIcon, |
| 6 | + EyeOffIcon, |
5 | 7 | FolderIcon, |
6 | 8 | GitMergeIcon, |
7 | 9 | GitPullRequestIcon, |
@@ -47,7 +49,7 @@ import { |
47 | 49 | useAppSettings, |
48 | 50 | } from "../appSettings"; |
49 | 51 | import { isElectron } from "../env"; |
50 | | -import { APP_STAGE_LABEL, APP_VERSION } from "../branding"; |
| 52 | +import { APP_VERSION } from "../branding"; |
51 | 53 | import { cn, isLinuxPlatform, isMacPlatform, newCommandId, newProjectId } from "../lib/utils"; |
52 | 54 | import { useStore } from "../store"; |
53 | 55 | import { shortcutLabelForCommand } from "../keybindings"; |
@@ -1362,7 +1364,7 @@ export default function Sidebar() { |
1362 | 1364 | <SidebarMenuButton |
1363 | 1365 | ref={isManualProjectSorting ? dragHandleProps?.setActivatorNodeRef : undefined} |
1364 | 1366 | size="sm" |
1365 | | - className={`gap-2 px-2 py-2 text-left hover:bg-accent group-hover/project-header:bg-accent group-hover/project-header:text-sidebar-accent-foreground ${ |
| 1367 | + className={`gap-2 rounded-lg border border-transparent px-2.5 py-2.5 text-left bg-accent/40 hover:bg-accent/70 group-hover/project-header:bg-accent/70 group-hover/project-header:text-sidebar-accent-foreground dark:bg-accent/30 dark:hover:bg-accent/50 dark:group-hover/project-header:bg-accent/50 ${ |
1366 | 1368 | isManualProjectSorting ? "cursor-grab active:cursor-grabbing" : "cursor-pointer" |
1367 | 1369 | }`} |
1368 | 1370 | {...(isManualProjectSorting && dragHandleProps ? dragHandleProps.attributes : {})} |
@@ -1401,7 +1403,7 @@ export default function Sidebar() { |
1401 | 1403 | /> |
1402 | 1404 | )} |
1403 | 1405 | <ProjectFavicon cwd={project.cwd} /> |
1404 | | - <span className="flex-1 truncate text-xs font-semibold tracking-[0.01em] text-foreground"> |
| 1406 | + <span className="flex-1 truncate text-[13px] font-semibold tracking-[0.01em] text-foreground"> |
1405 | 1407 | {project.name} |
1406 | 1408 | </span> |
1407 | 1409 | </SidebarMenuButton> |
@@ -1441,7 +1443,7 @@ export default function Sidebar() { |
1441 | 1443 | <CollapsibleContent> |
1442 | 1444 | <SidebarMenuSub |
1443 | 1445 | ref={attachThreadListAutoAnimateRef} |
1444 | | - className="mx-1 my-0 w-full translate-x-0 gap-0.5 px-1.5 py-0" |
| 1446 | + className="relative mx-1.5 my-1 w-auto translate-x-0 gap-0.5 rounded-lg border border-border/40 bg-background/50 px-1 py-1 dark:border-border/30 dark:bg-background/30" |
1445 | 1447 | > |
1446 | 1448 | {renderedThreads.map((thread) => renderThreadRow(thread))} |
1447 | 1449 |
|
@@ -1477,8 +1479,8 @@ export default function Sidebar() { |
1477 | 1479 | )} |
1478 | 1480 | </SidebarMenuSub> |
1479 | 1481 |
|
1480 | | - {project.expanded && activeProjectThread ? ( |
1481 | | - <div className="mx-2 mt-2 border-sidebar-border/50 border-t pt-2"> |
| 1482 | + {project.expanded && activeProjectThread && !appSettings.sidebarHideFiles ? ( |
| 1483 | + <div className="mx-1.5 mt-1 rounded-lg border border-border/40 bg-background/50 p-2 dark:border-border/30 dark:bg-background/30"> |
1482 | 1484 | <button |
1483 | 1485 | type="button" |
1484 | 1486 | className="mb-1.5 flex w-full items-center gap-1.5 px-2 text-[10px] uppercase tracking-[0.14em] text-muted-foreground/58 hover:text-muted-foreground/80" |
@@ -1728,9 +1730,6 @@ export default function Sidebar() { |
1728 | 1730 | <span className="truncate text-sm font-medium tracking-tight text-muted-foreground"> |
1729 | 1731 | Code |
1730 | 1732 | </span> |
1731 | | - <span className="rounded-full bg-muted/50 px-1.5 py-0.5 text-[8px] font-medium uppercase tracking-[0.18em] text-muted-foreground/60"> |
1732 | | - {APP_STAGE_LABEL} |
1733 | | - </span> |
1734 | 1733 | </div> |
1735 | 1734 | } |
1736 | 1735 | /> |
@@ -1863,6 +1862,35 @@ export default function Sidebar() { |
1863 | 1862 | Projects |
1864 | 1863 | </span> |
1865 | 1864 | <div className="flex items-center gap-1"> |
| 1865 | + <Tooltip> |
| 1866 | + <TooltipTrigger |
| 1867 | + render={ |
| 1868 | + <button |
| 1869 | + type="button" |
| 1870 | + aria-label={appSettings.sidebarHideFiles ? "Show files" : "Hide files"} |
| 1871 | + aria-pressed={appSettings.sidebarHideFiles} |
| 1872 | + className={cn( |
| 1873 | + "inline-flex size-5 cursor-pointer items-center justify-center rounded-md transition-colors hover:bg-accent hover:text-foreground", |
| 1874 | + appSettings.sidebarHideFiles |
| 1875 | + ? "text-muted-foreground/40" |
| 1876 | + : "text-muted-foreground/60", |
| 1877 | + )} |
| 1878 | + onClick={() => |
| 1879 | + updateSettings({ sidebarHideFiles: !appSettings.sidebarHideFiles }) |
| 1880 | + } |
| 1881 | + /> |
| 1882 | + } |
| 1883 | + > |
| 1884 | + {appSettings.sidebarHideFiles ? ( |
| 1885 | + <EyeOffIcon className="size-3.5" /> |
| 1886 | + ) : ( |
| 1887 | + <EyeIcon className="size-3.5" /> |
| 1888 | + )} |
| 1889 | + </TooltipTrigger> |
| 1890 | + <TooltipPopup side="top"> |
| 1891 | + {appSettings.sidebarHideFiles ? "Show files" : "Hide files"} |
| 1892 | + </TooltipPopup> |
| 1893 | + </Tooltip> |
1866 | 1894 | <ProjectSortMenu |
1867 | 1895 | projectSortOrder={appSettings.sidebarProjectSortOrder} |
1868 | 1896 | threadSortOrder={appSettings.sidebarThreadSortOrder} |
@@ -2006,9 +2034,9 @@ export default function Sidebar() { |
2006 | 2034 | </SidebarMenu> |
2007 | 2035 | </DndContext> |
2008 | 2036 | ) : ( |
2009 | | - <SidebarMenu ref={attachProjectListAutoAnimateRef}> |
| 2037 | + <SidebarMenu ref={attachProjectListAutoAnimateRef} className="gap-2"> |
2010 | 2038 | {sortedProjects.map((project) => ( |
2011 | | - <SidebarMenuItem key={project.id} className="rounded-md mt-1.5 first:mt-0"> |
| 2039 | + <SidebarMenuItem key={project.id} className="rounded-lg"> |
2012 | 2040 | {renderProjectItem(project, null)} |
2013 | 2041 | </SidebarMenuItem> |
2014 | 2042 | ))} |
|
0 commit comments