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
+50
View File
@@ -19,6 +19,56 @@
<app-file-panel side="left" />
<app-file-panel side="right" />
</main>
<!-- function bar: acts on the active panel -->
<footer class="flex items-center gap-1 border-t border-border px-2 py-1">
<button
(click)="actions.rename()"
title="Rename (F2)"
class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-muted-foreground hover:bg-accent hover:text-foreground"
>
<ng-icon name="mynaEdit" size="0.9rem" /> Rename
</button>
<button
(click)="actions.mkdir()"
title="New folder (F7)"
class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-muted-foreground hover:bg-accent hover:text-foreground"
>
<ng-icon name="mynaFolderPlus" size="0.9rem" /> Folder
</button>
<button
(click)="actions.createFile()"
title="New file"
class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-muted-foreground hover:bg-accent hover:text-foreground"
>
<ng-icon name="mynaFilePlus" size="0.9rem" /> File
</button>
<button
(click)="actions.chmod()"
title="Permissions"
class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-muted-foreground hover:bg-accent hover:text-foreground"
>
<ng-icon name="mynaLock" size="0.9rem" /> Permissions
</button>
<button
(click)="actions.delete()"
title="Delete (F8 / Del)"
class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-muted-foreground hover:bg-accent hover:text-destructive"
>
<ng-icon name="mynaTrash" size="0.9rem" /> Delete
</button>
</footer>
}
<!-- dialogs -->
@if (dialogs.prompt(); as req) {
<app-prompt-dialog [request]="req" />
}
@if (dialogs.confirm(); as req) {
<app-confirm-dialog [request]="req" />
}
@if (dialogs.chmod(); as req) {
<app-chmod-dialog [request]="req" />
}
<!-- toasts -->