-
Notifications
You must be signed in to change notification settings - Fork 2
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 #351 from bcgov/upload-listings-hotfix
DSS-453: Listing file upload: Improving User Experience During Large File Uploads
- Loading branch information
Showing
9 changed files
with
153 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,13 @@ | ||
<app-layout *ngIf="currentUserLoaded"></app-layout> | ||
<div *ngIf="!currentUserLoaded">Loading...</div> | ||
<div *ngIf="!currentUserLoaded">Loading...</div> | ||
<div class="loader" *ngIf="isLoading"> | ||
<div class="spinner"> | ||
<div class="lds-ring"> | ||
<div></div> | ||
<div></div> | ||
<div></div> | ||
<div></div> | ||
</div> | ||
</div> | ||
<div class="title">{{loaderTitle}}</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,72 @@ | ||
:host { | ||
overflow: auto; | ||
|
||
.loader { | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
width: 100vw; | ||
height: 100vh; | ||
background-color: #333333AA; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
z-index: 9999; | ||
|
||
.spinner { | ||
|
||
.lds-ring, | ||
.lds-ring div { | ||
box-sizing: border-box; | ||
} | ||
|
||
.lds-ring { | ||
display: inline-block; | ||
position: relative; | ||
width: 80px; | ||
height: 80px; | ||
} | ||
|
||
.lds-ring div { | ||
box-sizing: border-box; | ||
display: block; | ||
position: absolute; | ||
width: 64px; | ||
height: 64px; | ||
margin: 8px; | ||
border: 8px solid #FFFFFF; | ||
border-radius: 50%; | ||
animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite; | ||
border-color: #FFFFFF transparent transparent transparent; | ||
} | ||
|
||
.lds-ring div:nth-child(1) { | ||
animation-delay: -0.45s; | ||
} | ||
|
||
.lds-ring div:nth-child(2) { | ||
animation-delay: -0.3s; | ||
} | ||
|
||
.lds-ring div:nth-child(3) { | ||
animation-delay: -0.15s; | ||
} | ||
|
||
@keyframes lds-ring { | ||
0% { | ||
transform: rotate(0deg); | ||
} | ||
|
||
100% { | ||
transform: rotate(360deg); | ||
} | ||
} | ||
} | ||
|
||
.title { | ||
color: #FFFFFF; | ||
font-size: 1.75rem; | ||
} | ||
} | ||
} |
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
2 changes: 1 addition & 1 deletion
2
...d/src/app/common/listing-upload-history-table/listing-upload-history-table.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
16 changes: 16 additions & 0 deletions
16
frontend/src/app/common/services/global-loader.service.spec.ts
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,16 @@ | ||
import { TestBed } from '@angular/core/testing'; | ||
|
||
import { GlobalLoaderService } from './global-loader.service'; | ||
|
||
describe('GlobalLoaderService', () => { | ||
let service: GlobalLoaderService; | ||
|
||
beforeEach(() => { | ||
TestBed.configureTestingModule({}); | ||
service = TestBed.inject(GlobalLoaderService); | ||
}); | ||
|
||
it('should be created', () => { | ||
expect(service).toBeTruthy(); | ||
}); | ||
}); |
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,19 @@ | ||
import { Injectable } from '@angular/core'; | ||
import { Subject } from 'rxjs'; | ||
|
||
@Injectable({ | ||
providedIn: 'root' | ||
}) | ||
export class GlobalLoaderService { | ||
loadingNotification = new Subject<{ isLoading: boolean, title?: string }>() | ||
|
||
constructor() { } | ||
|
||
loadingStart(title: string): void { | ||
this.loadingNotification.next({ isLoading: true, title }); | ||
} | ||
|
||
loadingEnd(): void { | ||
this.loadingNotification.next({ isLoading: false, title: '' }); | ||
} | ||
} |
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