Repository navigation
Commit f898981
committed
fix(dashboard): offer Exit edit mode when there is nothing to discard
Follow-up to #40832, which disabled the Discard button when a dashboard
edit session has no unsaved changes. That fixed the misleading label but
left the toolbar with no way back to view mode on a pristine session
(Save and Discard both disabled, and the actions menu has no exit item).
Keep the button always enabled instead, labeled Discard when there are
unsaved changes and Exit edit mode when there are none. The handler is
unchanged in both cases: it drops the ?edit param and returns to view
mode.
Co-Authored-By: Claude Fable 5 <[email protected]>1 parent 751f5eb commit f898981
2 files changed
Lines changed: 13 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
522 | 522 | | |
523 | 523 | | |
524 | 524 | | |
525 | | - | |
| 525 | + | |
526 | 526 | | |
527 | | - | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
528 | 531 | | |
529 | 532 | | |
530 | | - | |
| 533 | + | |
531 | 534 | | |
532 | 535 | | |
533 | 536 | | |
| |||
537 | 540 | | |
538 | 541 | | |
539 | 542 | | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
540 | 546 | | |
541 | 547 | | |
542 | 548 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
722 | 722 | | |
723 | 723 | | |
724 | 724 | | |
725 | | - | |
726 | 725 | | |
727 | 726 | | |
728 | 727 | | |
729 | | - | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
730 | 731 | | |
731 | | - | |
| 732 | + | |
732 | 733 | | |
733 | 734 | | |
734 | 735 | | |
| |||
0 commit comments