-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #439 from DigitalExcellence/develop
- Loading branch information
Showing
33 changed files
with
594 additions
and
63 deletions.
There are no files selected for viewing
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
33 changes: 26 additions & 7 deletions
33
src/app/components/file-uploader/file-uploader.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,30 +1,49 @@ | ||
<!-- | ||
Digital Excellence Copyright (C) 2020 Brend Smits | ||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU Lesser General Public License as published | ||
by the Free Software Foundation version 3 of the License. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty | ||
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
See the GNU Lesser General Public License for more details. | ||
You can find a copy of the GNU Lesser General Public License | ||
along with this program, in the LICENSE.md file in the root project directory. | ||
If not, see https://www.gnu.org/licenses/lgpl-3.0.txt | ||
--> | ||
|
||
<div class="container" DndDirective> | ||
<input type="file" #fileDropRef id="fileDropRef" (change)="fileBrowseHandler($event.target)" | ||
[multiple]="acceptMultiple" [accept]="acceptedTypes.join(',')" /> | ||
<img src="assets/images/file-dnd.svg" alt="file-dnd-icon"> | ||
<label for="fileDropRef"> | ||
<strong>Choose a file</strong> | ||
<span class="box__dragndrop"> or drag it here</span>. | ||
<strong>Choose a file</strong> | ||
<span class="box__dragndrop"> or drag it here</span>. | ||
</label> | ||
</div> | ||
<div class="files-list"> | ||
<div class="single-file" *ngFor="let file of files; let i = index"> | ||
<div class="file-info"> | ||
<button type="button" class="btn btn-icon btn-danger" aria-label="error" | ||
(click)="deleteFile(i)"><span aria-hidden="true">×</span> | ||
<button type="button" class="btn btn-icon btn-danger" aria-label="error" (click)="deleteFile(i)"><span | ||
aria-hidden="true">×</span> | ||
</button> | ||
<img alt="image-preview" class="file-icon" [src]=file?.preview > | ||
<img alt="image-preview" class="file-icon" [src]=file?.preview> | ||
<h4 class="file-name"> | ||
{{ file?.name }} | ||
</h4> | ||
<h4 class="file-size"> | ||
{{ file?.readableSize }} | ||
</h4> | ||
</div> | ||
<div *ngIf="file.progress" class="file-progress" > | ||
<div *ngIf="file.progress" class="file-progress"> | ||
<div class="progress-bar" id="progress-bar-{{i}}" [style.width]="file.progress + '%'">{{file.progress}}% | ||
</div> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
</div> |
18 changes: 18 additions & 0 deletions
18
src/app/components/file-uploader/file-uploader.component.scss
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
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
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
Oops, something went wrong.