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:
@@ -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 -->
|
||||
|
||||
Reference in New Issue
Block a user