fix: add Escape key to close WorkerDetail modal
Previously Escape only handled view mode changes. Now it first checks if the WorkerDetail modal is visible and closes it before returning to the default view. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
a1856400df
commit
b7ca7ab818
1 changed files with 7 additions and 1 deletions
|
|
@ -448,8 +448,14 @@ export class FabricTuiApp {
|
|||
this.toggleAnalyticsView();
|
||||
});
|
||||
|
||||
// Escape to return to default view
|
||||
// Escape to close modals or return to default view
|
||||
this.screen.key(['escape'], () => {
|
||||
// First, hide worker detail if visible
|
||||
if (this.workerDetail.isVisible()) {
|
||||
this.workerDetail.hide();
|
||||
return;
|
||||
}
|
||||
// Then, return to default view if in another view
|
||||
if (this.viewMode !== 'default') {
|
||||
this.setViewMode('default');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue