summaryrefslogtreecommitdiffhomepage
path: root/packages/app/src/components/titlebar.tsx
diff options
context:
space:
mode:
authorDavid Hill <[email protected]>2026-03-12 18:26:50 +0000
committerGitHub <[email protected]>2026-03-12 18:26:50 +0000
commit184732fc2097166921dd46fbb9a8ce433a96b237 (patch)
tree6dd45cc5483f968fe4ad3c19456eb62c54b97b94 /packages/app/src/components/titlebar.tsx
parentb66222baf7a09af692e8de06179c1c3e51715269 (diff)
downloadopencode-184732fc2097166921dd46fbb9a8ce433a96b237.tar.gz
opencode-184732fc2097166921dd46fbb9a8ce433a96b237.zip
fix(app): titlebar cleanup (#17206)
Diffstat (limited to 'packages/app/src/components/titlebar.tsx')
-rw-r--r--packages/app/src/components/titlebar.tsx23
1 files changed, 9 insertions, 14 deletions
diff --git a/packages/app/src/components/titlebar.tsx b/packages/app/src/components/titlebar.tsx
index 3e2374f43..3ab811e92 100644
--- a/packages/app/src/components/titlebar.tsx
+++ b/packages/app/src/components/titlebar.tsx
@@ -58,6 +58,12 @@ export function Titlebar() {
})
const path = () => `${location.pathname}${location.search}${location.hash}`
+ const creating = createMemo(() => {
+ if (!params.dir) return false
+ if (params.id) return false
+ const parts = location.pathname.replace(/\/+$/, "").split("/")
+ return parts.at(-1) === "session"
+ })
createEffect(() => {
const current = path()
@@ -206,19 +212,7 @@ export function Titlebar() {
aria-label={language.t("command.sidebar.toggle")}
aria-expanded={layout.sidebar.opened()}
>
- <div class="relative flex items-center justify-center size-4 [&>*]:absolute [&>*]:inset-0">
- <Icon
- size="small"
- name={layout.sidebar.opened() ? "layout-left-partial" : "layout-left"}
- class="group-hover/sidebar-toggle:hidden"
- />
- <Icon size="small" name="layout-left-partial" class="hidden group-hover/sidebar-toggle:inline-block" />
- <Icon
- size="small"
- name={layout.sidebar.opened() ? "layout-left" : "layout-left-partial"}
- class="hidden group-active/sidebar-toggle:inline-block"
- />
- </div>
+ <Icon size="small" name={layout.sidebar.opened() ? "sidebar-active" : "sidebar"} />
</Button>
</TooltipKeybind>
<div class="hidden xl:flex items-center shrink-0">
@@ -231,13 +225,14 @@ export function Titlebar() {
>
<Button
variant="ghost"
- icon="new-session"
+ icon={creating() ? "new-session-active" : "new-session"}
class="titlebar-icon w-8 h-6 p-0 box-border"
onClick={() => {
if (!params.dir) return
navigate(`/${params.dir}/session`)
}}
aria-label={language.t("command.session.new")}
+ aria-current={creating() ? "page" : undefined}
/>
</TooltipKeybind>
</Show>