diff --git a/Front/skydivelogs-app/angular.json b/Front/skydivelogs-app/angular.json index 99a77cc..d9a16a5 100644 --- a/Front/skydivelogs-app/angular.json +++ b/Front/skydivelogs-app/angular.json @@ -20,10 +20,10 @@ "src/assets", "src/favicon.ico" ], - "styles": [{ - "input": "src/custom-theme.scss" - }, - "src/styles.css" + "styles": [ + "src/assets/css/styles-app-loading.scss", + "src/assets/css/custom-theme.scss", + "src/assets/css/styles.css" ], "scripts": [] }, diff --git a/Front/skydivelogs-app/src/app/app.module.ts b/Front/skydivelogs-app/src/app/app.module.ts index 690d3cc..370e34f 100644 --- a/Front/skydivelogs-app/src/app/app.module.ts +++ b/Front/skydivelogs-app/src/app/app.module.ts @@ -37,7 +37,8 @@ import { MatInputModule, MatButtonModule, MatIconModule, - MatAutocompleteModule + MatAutocompleteModule, + MatProgressSpinnerModule } from '@angular/material'; import { RequestCache } from '../services/request-cache.service'; @@ -90,7 +91,8 @@ const appRoutes: Routes = [ MatInputModule, MatButtonModule, MatIconModule, - MatAutocompleteModule + MatAutocompleteModule, + MatProgressSpinnerModule ], exports: [HttpClientModule], providers: [ diff --git a/Front/skydivelogs-app/src/app/list-of-aircrafts/list-of-aircrafts.component.html b/Front/skydivelogs-app/src/app/list-of-aircrafts/list-of-aircrafts.component.html index f6606d5..05b6ad9 100644 --- a/Front/skydivelogs-app/src/app/list-of-aircrafts/list-of-aircrafts.component.html +++ b/Front/skydivelogs-app/src/app/list-of-aircrafts/list-of-aircrafts.component.html @@ -1,7 +1,7 @@ - - -
+ + + @@ -16,6 +16,10 @@
ID
+ +
- -Waiting... + + + + diff --git a/Front/skydivelogs-app/src/app/list-of-aircrafts/list-of-aircrafts.component.ts b/Front/skydivelogs-app/src/app/list-of-aircrafts/list-of-aircrafts.component.ts index 2e8be47..0fb90ec 100644 --- a/Front/skydivelogs-app/src/app/list-of-aircrafts/list-of-aircrafts.component.ts +++ b/Front/skydivelogs-app/src/app/list-of-aircrafts/list-of-aircrafts.component.ts @@ -30,10 +30,12 @@ export class ListOfAircraftsComponent implements OnInit { private getListOfAircrafts() { this.serviceApi.getListOfAircrafts().subscribe(data => { - data.sort((a, b) => (b.name < a.name) ? 1 : -1); - this.dataSourceTable = new MatTableDataSource(data); - this.dataSourceTable.paginator = this.paginator; - this.resultsLength = data.length; + setTimeout(() => { + data.sort((a, b) => (b.name < a.name) ? 1 : -1); + this.dataSourceTable = new MatTableDataSource(data); + this.dataSourceTable.paginator = this.paginator; + this.resultsLength = data.length; + }, 2000); }); } diff --git a/Front/skydivelogs-app/src/app/list-of-dzs/list-of-dzs.component.html b/Front/skydivelogs-app/src/app/list-of-dzs/list-of-dzs.component.html index 1fe59f6..0afee37 100644 --- a/Front/skydivelogs-app/src/app/list-of-dzs/list-of-dzs.component.html +++ b/Front/skydivelogs-app/src/app/list-of-dzs/list-of-dzs.component.html @@ -1,7 +1,7 @@ - - -
+ + + @@ -52,7 +52,11 @@ +
+
- -Waiting... + + + + diff --git a/Front/skydivelogs-app/src/app/list-of-dzs/list-of-dzs.component.ts b/Front/skydivelogs-app/src/app/list-of-dzs/list-of-dzs.component.ts index c91b03b..28e4c39 100644 --- a/Front/skydivelogs-app/src/app/list-of-dzs/list-of-dzs.component.ts +++ b/Front/skydivelogs-app/src/app/list-of-dzs/list-of-dzs.component.ts @@ -41,10 +41,12 @@ export class ListOfDzsComponent implements OnInit { private getListOfDropZones() { this.serviceApiGet.getListOfDropZones().subscribe(data => { - data.sort((a, b) => (b.isFavorite ? 1 : 0) - (a.isFavorite ? 1 : 0)); - this.dataSourceTable = new MatTableDataSource(data); - this.dataSourceTable.paginator = this.paginator; - this.resultsLength = data.length; + setTimeout(() => { + data.sort((a, b) => (b.isFavorite ? 1 : 0) - (a.isFavorite ? 1 : 0)); + this.dataSourceTable = new MatTableDataSource(data); + this.dataSourceTable.paginator = this.paginator; + this.resultsLength = data.length; + }, 2000); }); } diff --git a/Front/skydivelogs-app/src/app/list-of-gears/list-of-gears.component.html b/Front/skydivelogs-app/src/app/list-of-gears/list-of-gears.component.html index fefc0ca..2dc1599 100644 --- a/Front/skydivelogs-app/src/app/list-of-gears/list-of-gears.component.html +++ b/Front/skydivelogs-app/src/app/list-of-gears/list-of-gears.component.html @@ -1,7 +1,7 @@ - - -
+ + + @@ -41,6 +41,9 @@
ID
+
- -Waiting... + + + + diff --git a/Front/skydivelogs-app/src/app/list-of-gears/list-of-gears.component.ts b/Front/skydivelogs-app/src/app/list-of-gears/list-of-gears.component.ts index 6f59655..14ab889 100644 --- a/Front/skydivelogs-app/src/app/list-of-gears/list-of-gears.component.ts +++ b/Front/skydivelogs-app/src/app/list-of-gears/list-of-gears.component.ts @@ -44,9 +44,11 @@ export class ListOfGearsComponent implements OnInit { getListOfGears() { this.serviceApi.getListOfGears().subscribe(data => { - this.dataSourceTable = new MatTableDataSource(data); - this.dataSourceTable.paginator = this.paginator; - this.resultsLength = data.length; + setTimeout(() => { + this.dataSourceTable = new MatTableDataSource(data); + this.dataSourceTable.paginator = this.paginator; + this.resultsLength = data.length; + }, 2000); }); } diff --git a/Front/skydivelogs-app/src/app/list-of-jump-types/list-of-jump-types.component.html b/Front/skydivelogs-app/src/app/list-of-jump-types/list-of-jump-types.component.html index ebd72b2..122b8f8 100644 --- a/Front/skydivelogs-app/src/app/list-of-jump-types/list-of-jump-types.component.html +++ b/Front/skydivelogs-app/src/app/list-of-jump-types/list-of-jump-types.component.html @@ -1,7 +1,7 @@ - - -
+ + + @@ -16,6 +16,9 @@
ID
+
- -Waiting... + + + + diff --git a/Front/skydivelogs-app/src/app/list-of-jump-types/list-of-jump-types.component.ts b/Front/skydivelogs-app/src/app/list-of-jump-types/list-of-jump-types.component.ts index 353875d..fa4bd0f 100644 --- a/Front/skydivelogs-app/src/app/list-of-jump-types/list-of-jump-types.component.ts +++ b/Front/skydivelogs-app/src/app/list-of-jump-types/list-of-jump-types.component.ts @@ -30,10 +30,12 @@ export class ListOfJumpTypesComponent implements OnInit { getListOfJumpTypes() { this.serviceApi.getListOfJumpTypes().subscribe(data => { - data.sort((a, b) => (b.name < a.name) ? 1 : -1); - this.dataSourceTable = new MatTableDataSource(data); - this.dataSourceTable.paginator = this.paginator; - this.resultsLength = data.length; + setTimeout(() => { + data.sort((a, b) => (b.name < a.name) ? 1 : -1); + this.dataSourceTable = new MatTableDataSource(data); + this.dataSourceTable.paginator = this.paginator; + this.resultsLength = data.length; + }, 2000); }); } diff --git a/Front/skydivelogs-app/src/app/list-of-jumps/list-of-jumps.component.html b/Front/skydivelogs-app/src/app/list-of-jumps/list-of-jumps.component.html index f8ae51a..13395eb 100644 --- a/Front/skydivelogs-app/src/app/list-of-jumps/list-of-jumps.component.html +++ b/Front/skydivelogs-app/src/app/list-of-jumps/list-of-jumps.component.html @@ -30,6 +30,9 @@ + - -Waiting... + + + + diff --git a/Front/skydivelogs-app/src/app/list-of-jumps/list-of-jumps.component.ts b/Front/skydivelogs-app/src/app/list-of-jumps/list-of-jumps.component.ts index f2cb56a..fb3898e 100644 --- a/Front/skydivelogs-app/src/app/list-of-jumps/list-of-jumps.component.ts +++ b/Front/skydivelogs-app/src/app/list-of-jumps/list-of-jumps.component.ts @@ -39,10 +39,12 @@ export class ListOfJumpsComponent implements OnInit { getListOfJumps() { this.listOfJumps = this.serviceApi.getListOfJumps(); this.listOfJumps.subscribe(data => { - data.sort((a, b) => b.jumpDate.getTime() - a.jumpDate.getTime()); - this.dataSourceTable = new MatTableDataSource(data); - this.dataSourceTable.paginator = this.paginator; - this.resultsLength = data.length; + setTimeout(() => { + data.sort((a, b) => b.jumpDate.getTime() - a.jumpDate.getTime()); + this.dataSourceTable = new MatTableDataSource(data); + this.dataSourceTable.paginator = this.paginator; + this.resultsLength = data.length; + }, 2000); }); } } diff --git a/Front/skydivelogs-app/src/custom-theme.scss b/Front/skydivelogs-app/src/assets/css/custom-theme.scss similarity index 100% rename from Front/skydivelogs-app/src/custom-theme.scss rename to Front/skydivelogs-app/src/assets/css/custom-theme.scss diff --git a/Front/skydivelogs-app/src/assets/css/styles-app-loading.scss b/Front/skydivelogs-app/src/assets/css/styles-app-loading.scss new file mode 100644 index 0000000..132a053 --- /dev/null +++ b/Front/skydivelogs-app/src/assets/css/styles-app-loading.scss @@ -0,0 +1,62 @@ +.app-loading { + position: relative; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + height: 100%; +} + +.app-loading { + .logo { + width: 100px; + height: 100px; + + // this way asset gets processed by webpack + background: url(assets/img/logo.png) center center no-repeat; + } +} + +.app-loading .spinner { + height: 200px; + width: 200px; + animation: rotate 2s linear infinite; + transform-origin: center center; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + margin: auto; +} + +.app-loading .spinner .path { + stroke-dasharray: 1, 200; + stroke-dashoffset: 0; + animation: dash 1.5s ease-in-out infinite; + stroke-linecap: round; + stroke: #ddd; +} + +@keyframes rotate { + 100% { + transform: rotate(360deg); + } +} + +@keyframes dash { + 0% { + stroke-dasharray: 1, 200; + stroke-dashoffset: 0; + } + + 50% { + stroke-dasharray: 89, 200; + stroke-dashoffset: -35px; + } + + 100% { + stroke-dasharray: 89, 200; + stroke-dashoffset: -124px; + } +} diff --git a/Front/skydivelogs-app/src/styles.css b/Front/skydivelogs-app/src/assets/css/styles.css similarity index 100% rename from Front/skydivelogs-app/src/styles.css rename to Front/skydivelogs-app/src/assets/css/styles.css diff --git a/Front/skydivelogs-app/src/assets/img/logo.png b/Front/skydivelogs-app/src/assets/img/logo.png new file mode 100644 index 0000000..d8849d4 Binary files /dev/null and b/Front/skydivelogs-app/src/assets/img/logo.png differ diff --git a/Front/skydivelogs-app/src/index.html b/Front/skydivelogs-app/src/index.html index 07e37b7..28ba379 100644 --- a/Front/skydivelogs-app/src/index.html +++ b/Front/skydivelogs-app/src/index.html @@ -5,8 +5,6 @@ SkydivelogsApp - - @@ -14,7 +12,15 @@ - + + +
+ + + + +
+