tweak(app): keep file tree toggle visible
Always show the titlebar file tree button (and space the right-side icon buttons at 4px) so it stays accessible regardless of the review panel state.
This commit is contained in:
@@ -553,7 +553,7 @@ export function SessionHeader() {
|
|||||||
</div>
|
</div>
|
||||||
</Show>
|
</Show>
|
||||||
<div class="flex items-center gap-1">
|
<div class="flex items-center gap-1">
|
||||||
<div class="hidden md:flex items-center gap-3 shrink-0">
|
<div class="hidden md:flex items-center gap-1 shrink-0">
|
||||||
<TooltipKeybind
|
<TooltipKeybind
|
||||||
title={language.t("command.terminal.toggle")}
|
title={language.t("command.terminal.toggle")}
|
||||||
keybind={command.keybind("terminal.toggle")}
|
keybind={command.keybind("terminal.toggle")}
|
||||||
@@ -585,8 +585,7 @@ export function SessionHeader() {
|
|||||||
</div>
|
</div>
|
||||||
</Button>
|
</Button>
|
||||||
</TooltipKeybind>
|
</TooltipKeybind>
|
||||||
</div>
|
|
||||||
<div class="hidden md:block shrink-0">
|
|
||||||
<TooltipKeybind
|
<TooltipKeybind
|
||||||
title={language.t("command.review.toggle")}
|
title={language.t("command.review.toggle")}
|
||||||
keybind={command.keybind("review.toggle")}
|
keybind={command.keybind("review.toggle")}
|
||||||
@@ -618,23 +617,7 @@ export function SessionHeader() {
|
|||||||
</div>
|
</div>
|
||||||
</Button>
|
</Button>
|
||||||
</TooltipKeybind>
|
</TooltipKeybind>
|
||||||
</div>
|
|
||||||
<div class="hidden md:block shrink-0">
|
|
||||||
<div
|
|
||||||
aria-hidden={!view().reviewPanel.opened()}
|
|
||||||
class="overflow-hidden transition-[width,margin-left] duration-200 ease-out motion-reduce:transition-none"
|
|
||||||
classList={{
|
|
||||||
"w-8 ml-0": view().reviewPanel.opened(),
|
|
||||||
"w-0 -ml-1": !view().reviewPanel.opened(),
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
class="transition-[opacity,transform] duration-200 ease-out origin-center motion-reduce:transition-none"
|
|
||||||
classList={{
|
|
||||||
"opacity-100 scale-100": view().reviewPanel.opened(),
|
|
||||||
"opacity-0 scale-90": !view().reviewPanel.opened(),
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<TooltipKeybind
|
<TooltipKeybind
|
||||||
title={language.t("command.fileTree.toggle")}
|
title={language.t("command.fileTree.toggle")}
|
||||||
keybind={command.keybind("fileTree.toggle")}
|
keybind={command.keybind("fileTree.toggle")}
|
||||||
@@ -643,11 +626,9 @@ export function SessionHeader() {
|
|||||||
variant="ghost"
|
variant="ghost"
|
||||||
class="titlebar-icon w-8 h-6 p-0 box-border"
|
class="titlebar-icon w-8 h-6 p-0 box-border"
|
||||||
onClick={() => layout.fileTree.toggle()}
|
onClick={() => layout.fileTree.toggle()}
|
||||||
disabled={!view().reviewPanel.opened()}
|
|
||||||
aria-label={language.t("command.fileTree.toggle")}
|
aria-label={language.t("command.fileTree.toggle")}
|
||||||
aria-expanded={layout.fileTree.opened()}
|
aria-expanded={layout.fileTree.opened()}
|
||||||
aria-controls="file-tree-panel"
|
aria-controls="file-tree-panel"
|
||||||
tabIndex={view().reviewPanel.opened() ? undefined : -1}
|
|
||||||
>
|
>
|
||||||
<div class="relative flex items-center justify-center size-4">
|
<div class="relative flex items-center justify-center size-4">
|
||||||
<Icon
|
<Icon
|
||||||
@@ -664,8 +645,6 @@ export function SessionHeader() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</Portal>
|
</Portal>
|
||||||
)}
|
)}
|
||||||
</Show>
|
</Show>
|
||||||
|
|||||||
Reference in New Issue
Block a user