Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* feat(archive): add new view for archive representation * feat(archive): add toolbar to archive representation & make minor adjustments to video viewer * remove unnecessary class * test(archive): remove now irrelevant tests * style(_elements): fix css * clarify comment
- Loading branch information
Showing
5 changed files
with
82 additions
and
23 deletions.
There are no files selected for viewing
41 changes: 36 additions & 5 deletions
41
src/app/workspace/resource/representation/archive/archive.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,49 @@ | ||
<div *ngIf="src && src.fileValue.fileUrl"> | ||
<!-- in case of an error --> | ||
<app-status [status]="404" [url]="src.fileValue.fileUrl" [representation]="'archive'" *ngIf="failedToLoad"></app-status> | ||
<app-status [status]="404" [url]="src.fileValue.fileUrl" [representation]="'archive'" *ngIf="failedToLoad"> | ||
</app-status> | ||
|
||
<button class="download" mat-button (click)="downloadArchive(src.fileValue.fileUrl)" [disabled]="failedToLoad"> | ||
<div class="file-representation"> | ||
<div class="container"> | ||
<div class="contents"> | ||
<div class="icon"> | ||
<mat-icon> | ||
description | ||
</mat-icon> | ||
</div> | ||
<div class="file"> | ||
<p>{{originalFilename}}</p> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="toolbar"> | ||
<!-- toolbar --> | ||
<div class="action horizontal bottom"> | ||
<!-- three dot menu to downlaod and replace file --> | ||
<button mat-icon-button [matMenuTriggerFor]="more"> | ||
<mat-icon>more_vert</mat-icon> | ||
</button> | ||
<mat-menu #more="matMenu"> | ||
<button mat-menu-item (click)="downloadArchive(src.fileValue.fileUrl)"> | ||
Download file | ||
</button> | ||
<button mat-menu-item (click)="openReplaceFileDialog()"> | ||
Replace file | ||
</button> | ||
</mat-menu> | ||
</div> | ||
</div> | ||
</div> | ||
<!-- <button class="download" mat-button (click)="downloadArchive(src.fileValue.fileUrl)" [disabled]="failedToLoad"> | ||
<mat-icon> | ||
file_download | ||
</mat-icon> | ||
Click to download | ||
</button> | ||
<button mat-button matTooltip="Replace archive file" (click)="openReplaceFileDialog()"> | ||
<mat-icon>cloud_upload</mat-icon> | ||
</button> | ||
</button> --> | ||
</div> | ||
<div *ngIf="!src || !src.fileValue.fileUrl"> | ||
No valid file url found for this resource. | ||
</div> | ||
|
||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
@import "../../../../../assets/style/responsive"; | ||
@import "../../../../../assets/style/config"; | ||
|
||
.file-representation { | ||
width: 100%; | ||
|
||
.container { | ||
background: #292929; | ||
border-radius: 8px 8px 0px 0px; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
padding: 15.5% 0%; | ||
|
||
.contents { | ||
color: #FFFFFF; | ||
|
||
.icon { | ||
mat-icon { | ||
height: 90px; | ||
width: 90px; | ||
font-size: 90px; | ||
line-height: 90px; | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters