The dashboard settings button toggles
It only ever opened, so the way out of the settings panel was somewhere else. Pressing it again closes it, and it carries the pressed state the other dock toggles do. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -638,11 +638,19 @@ export function DashboardEditor({
|
|||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
size="icon"
|
size="icon"
|
||||||
className="size-11 text-muted-foreground md:size-8"
|
className={cn(
|
||||||
|
"size-11 text-muted-foreground md:size-8",
|
||||||
|
settingsOpen && "text-primary",
|
||||||
|
)}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
if (settingsOpen) {
|
||||||
|
setSettingsOpen(false)
|
||||||
|
return
|
||||||
|
}
|
||||||
setSelected(null)
|
setSelected(null)
|
||||||
setSettingsOpen(true)
|
setSettingsOpen(true)
|
||||||
}}
|
}}
|
||||||
|
aria-pressed={settingsOpen}
|
||||||
aria-label="Dashboard settings"
|
aria-label="Dashboard settings"
|
||||||
data-testid="edit-dashboard"
|
data-testid="edit-dashboard"
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user