New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(archive): new archive representation view (DEV-1084) #785
Merged
Merged
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
a11bfb2
feat(archive): add new view for archive representation
mdelez e989b28
feat(archive): add toolbar to archive representation & make minor adj…
mdelez 49ee07c
remove unnecessary class
mdelez 22b53b6
test(archive): remove now irrelevant tests
mdelez 91c1640
style(_elements): fix css
mdelez c5b0428
Merge branch 'main' into wip/dsp-1084-archive-action-bar
mdelez 998546e
clarify comment
mdelez File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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"> | ||
<!-- vertical more button with 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the word "vertical" does not make sense for me in this sentence. In the outer div there is "horizontal" written
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It refers to the three dots menu which has three vertical dots but I can see how it can be confusing with the "horizontal" class name right above it. I'll clarify the comment.