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}}
|
||||
</h1>
|
||||
<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}}
|
||||
</div>
|
||||
<div mat-dialog-actions *ngIf="this.allowCancel" class="busy-dialog-actions">
|
||||
<button mat-flat-button (click)="this.dialogRef.close(false)">
|
||||
<div *ngIf="this.allowCancel" class="busy-dialog-actions" mat-dialog-actions>
|
||||
<button (click)="this.dialogRef.close(false)" mat-flat-button>
|
||||
Cancel
|
||||
</button>
|
||||
</div>
|
||||
|
@ -1,6 +1,24 @@
|
||||
<app-context-menu #contextMenu>
|
||||
<ng-content select="[content-before]"></ng-content>
|
||||
<button (click)="this.copyFileHash()" mat-menu-item>Copy Hash</button>
|
||||
<button (click)="this.exportFile()" mat-menu-item>Save As...</button>
|
||||
<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.exportFile()" mat-menu-item>Save As...</button>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
<ng-content></ng-content>
|
||||
</app-context-menu>
|
||||
|
Loading…
Reference in New Issue