fix(mobile): make unavailable sidebar state clear

This commit is contained in:
laoyh
2026-08-20 12:13:49 +08:00
parent 6c891514b5
commit 5be195df18
7 changed files with 21 additions and 9 deletions
+4 -2
View File
@@ -789,18 +789,20 @@ export function Sidebar(props: { ctx: Context; store: SidebarStore }) {
}, [ctx, sessionId, cwd])
if (state === undefined || sessionId === undefined) {
// Keep the unavailable controls focusable: touch users have no hover, so
// focus is the only way the existing Tooltip can explain what is missing.
return (
<div data-dsh-panel-host>
<div className={css.toggleCluster}>
{!narrow && (
<Tooltip label={t('noSession')} side="bottom" delayMs={500}>
<button type="button" className={css.toggleButton} disabled aria-label={t('noSession')}>
<button type="button" className={css.toggleButton} aria-disabled="true" aria-label={t('noSession')}>
<IconPanelBottomOutline16 />
</button>
</Tooltip>
)}
<Tooltip label={t('noSession')} side="bottom" delayMs={500}>
<button type="button" className={css.toggleButton} disabled aria-label={t('noSession')}>
<button type="button" className={css.toggleButton} aria-disabled="true" aria-label={t('noSession')}>
<IconPanelRightOutline16 />
</button>
</Tooltip>