P2: file operations with dialogs (mkdir, new file, rename, delete, chmod)

- prompt/confirm/chmod dialogs (signals-driven via DialogsService)
- FileActionsService: acts on selection or cursor row of the active panel
- function bar + F2/F7/F8/Delete keys; delete confirms and recurses
- verified provider ops + walkTree + removeRecursive on a scratch tree

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Jokin
2026-07-11 13:38:40 +02:00
co-authored by Claude Fable 5
parent a150c5ee2e
commit b907e0a4ce
10 changed files with 519 additions and 2 deletions
+40
View File
@@ -0,0 +1,40 @@
import { Injectable, signal } from '@angular/core';
export interface PromptRequest {
title: string;
placeholder?: string;
initial?: string;
confirmLabel: string;
onConfirm: (value: string) => void;
}
export interface ConfirmRequest {
title: string;
body: string;
confirmLabel: string;
destructive?: boolean;
onConfirm: () => void;
}
export interface ChmodRequest {
targets: string[]; // display names
initialMode: number;
onConfirm: (mode: number) => void;
}
@Injectable({ providedIn: 'root' })
export class DialogsService {
readonly prompt = signal<PromptRequest | null>(null);
readonly confirm = signal<ConfirmRequest | null>(null);
readonly chmod = signal<ChmodRequest | null>(null);
get anyOpen(): boolean {
return !!(this.prompt() || this.confirm() || this.chmod());
}
closeAll(): void {
this.prompt.set(null);
this.confirm.set(null);
this.chmod.set(null);
}
}