Decouple dialog refocus from PanelsService via FocusService

Dialogs only needed refocus(); injecting PanelsService boots a whole
workspace, which secondary windows must not do.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Jokin
2026-07-13 23:02:25 +02:00
co-authored by Claude Fable 5
parent 93a9b07722
commit 62ff845944
6 changed files with 33 additions and 15 deletions
+3 -3
View File
@@ -8,7 +8,7 @@ import {
viewChild,
} from '@angular/core';
import { DialogsService, type PromptRequest } from '../dialogs.service';
import { PanelsService } from '../panels.service';
import { FocusService } from '../focus.service';
@Component({
selector: 'app-prompt-dialog',
@@ -54,7 +54,7 @@ export class PromptDialog {
private readonly box = viewChild.required<ElementRef<HTMLInputElement>>('box');
private readonly dialogs = inject(DialogsService);
private readonly panels = inject(PanelsService);
private readonly focus = inject(FocusService);
constructor() {
afterNextRender(() => {
@@ -79,6 +79,6 @@ export class PromptDialog {
private close(): void {
this.dialogs.prompt.set(null);
this.panels.refocus();
this.focus.bump();
}
}