Add status handling to file context menu
Signed-off-by: trivernis <trivernis@protonmail.com>pull/4/head
parent
981e23a192
commit
1d69eb4a46
@ -1,12 +1,12 @@
|
|||||||
<h1 mat-dialog-title class="title">
|
<h1 class="title" mat-dialog-title>
|
||||||
{{title}}
|
{{title}}
|
||||||
</h1>
|
</h1>
|
||||||
<div class="content" mat-dialog-content>
|
<div class="content" mat-dialog-content>
|
||||||
<mat-progress-spinner mode="indeterminate" color="primary"></mat-progress-spinner>
|
<mat-progress-bar [mode]="this.mode" [value]="this.progress" color="primary"></mat-progress-bar>
|
||||||
{{message}}
|
{{message}}
|
||||||
</div>
|
</div>
|
||||||
<div mat-dialog-actions *ngIf="this.allowCancel" class="busy-dialog-actions">
|
<div *ngIf="this.allowCancel" class="busy-dialog-actions" mat-dialog-actions>
|
||||||
<button mat-flat-button (click)="this.dialogRef.close(false)">
|
<button (click)="this.dialogRef.close(false)" mat-flat-button>
|
||||||
Cancel
|
Cancel
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,6 +1,24 @@
|
|||||||
<app-context-menu #contextMenu>
|
<app-context-menu #contextMenu>
|
||||||
<ng-content select="[content-before]"></ng-content>
|
<ng-content select="[content-before]"></ng-content>
|
||||||
|
<ng-container *ngIf="this.files">
|
||||||
|
<button (click)="this.updateStatus('Archived')" *ngIf="actionArchive" mat-menu-item>Archive
|
||||||
|
</button>
|
||||||
|
<button (click)="this.updateStatus('Imported')" *ngIf="actionImported" mat-menu-item>Back to
|
||||||
|
imported
|
||||||
|
</button>
|
||||||
|
<button (click)="this.updateStatus('Deleted')"
|
||||||
|
*ngIf="actionDelete"
|
||||||
|
mat-menu-item>Delete
|
||||||
|
</button>
|
||||||
|
<button (click)="this.deletePermanently()" *ngIf="actionDeletePermantently" mat-menu-item>Delete permanently
|
||||||
|
</button>
|
||||||
|
<button (click)="this.updateStatus('Archived')" *ngIf="actionRestore" mat-menu-item>Restore</button>
|
||||||
|
|
||||||
|
<!-- everything that only applies to a single file -->
|
||||||
|
<ng-container>
|
||||||
<button (click)="this.copyFileHash()" mat-menu-item>Copy Hash</button>
|
<button (click)="this.copyFileHash()" mat-menu-item>Copy Hash</button>
|
||||||
<button (click)="this.exportFile()" mat-menu-item>Save As...</button>
|
<button (click)="this.exportFile()" mat-menu-item>Save As...</button>
|
||||||
|
</ng-container>
|
||||||
|
</ng-container>
|
||||||
<ng-content></ng-content>
|
<ng-content></ng-content>
|
||||||
</app-context-menu>
|
</app-context-menu>
|
||||||
|
Loading…
Reference in New Issue