merge #254: mobile explain unavailable sidebar and prevent overflow

# Conflicts:
#	README.md
#	README_EN.md
#	dsh.plugin.json
#	package.json
#	src/client/service.ts
This commit is contained in:
HuanLinOTO
2026-08-23 20:22:49 +08:00
4 changed files with 10 additions and 6 deletions
+4 -2
View File
@@ -1030,18 +1030,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 {...osFileDragShield}>
<div className={css.toggleCluster} data-dsh-toggle-cluster>
{!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>
+4 -2
View File
@@ -105,17 +105,19 @@
color var(--ds-transition-duration-slow) var(--ds-ease-in-out);
}
.toggleButton:hover:not(:disabled) {
.toggleButton:hover:not(:disabled):not([aria-disabled='true']) {
background: var(--dsw-alias-interactive-bg-hover);
color: var(--dsw-alias-label-primary);
}
.toggleButton:disabled {
.toggleButton:disabled,
.toggleButton[aria-disabled='true'] {
opacity: 0.4;
cursor: default;
}
.panel {
box-sizing: border-box;
position: absolute;
top: 0;
right: 0;