fix(web): allow closing diff panel in non-git projects (#2413)
This commit is contained in:
1 file changed
+2
-2
@@ -149,14 +149,14 @@ export const ChatHeader = memo(function ChatHeader({
|
||||
aria-label="Toggle diff panel"
|
||||
variant="outline"
|
||||
size="xs"
|
||||
disabled={!isGitRepo}
|
||||
disabled={!isGitRepo && !diffOpen}
|
||||
>
|
||||
<DiffIcon className="size-3" />
|
||||
</Toggle>
|
||||
}
|
||||
/>
|
||||
<TooltipPopup side="bottom">
|
||||
{!isGitRepo
|
||||
{!isGitRepo && !diffOpen
|
||||
? "Diff panel is unavailable because this project is not a git repository."
|
||||
: diffToggleShortcutLabel
|
||||
? `Toggle diff panel (${diffToggleShortcutLabel})`
|
||||
|
||||
Reference in new issue
Block a user