-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
offline playlists: export to external device (pendrive, external hd) …
…or any other location, bug fixes & enhancements
- Loading branch information
1 parent
dfc5afb
commit 03615da
Showing
52 changed files
with
480 additions
and
6,065 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,3 @@ | ||
<router-outlet></router-outlet> | ||
<audio-player></audio-player> | ||
<audio-player></audio-player> | ||
<loader-overlay></loader-overlay> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { MatIconRegistry } from "@angular/material/icon"; | ||
import { DomSanitizer } from "@angular/platform-browser"; | ||
|
||
export function RegisterCustomIcons(matIconRegistry: MatIconRegistry, domSanitizer: DomSanitizer) { | ||
matIconRegistry.addSvgIcon( | ||
'github', | ||
domSanitizer.bypassSecurityTrustResourceUrl('http://localhost:8080/static/frontend/dist/assets/icons/github.svg') | ||
) | ||
} |
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,3 +1,5 @@ | ||
export * from './audio-player/audio-player.component'; | ||
export * from './settings/settings.component'; | ||
export * from './updater/updater.component'; | ||
export * from './loader/loader.component'; | ||
export * from './confirmation-dialog/confirmation-dialog.component'; |
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,33 @@ | ||
<div class="loader-overlay" [hidden]="isHidden()"> | ||
<div class="content-template"> | ||
<ng-container | ||
*ngTemplateOutlet="loadingState.templateRef ? loadingState.templateRef : templatesMap[loadingState.templateName]; context: {label: loadingState.label, data: loadingState.data}" | ||
></ng-container> | ||
</div> | ||
</div> | ||
|
||
<ng-template #defaultLoaderTpl let-label="label"> | ||
<div class="sk-cube-grid"> | ||
<div class="sk-cube sk-cube1"></div> | ||
<div class="sk-cube sk-cube2"></div> | ||
<div class="sk-cube sk-cube3"></div> | ||
<div class="sk-cube sk-cube4"></div> | ||
<div class="sk-cube sk-cube5"></div> | ||
<div class="sk-cube sk-cube6"></div> | ||
<div class="sk-cube sk-cube7"></div> | ||
<div class="sk-cube sk-cube8"></div> | ||
<div class="sk-cube sk-cube9"></div> | ||
</div> | ||
<div class="label" *ngIf="label">{{ label }}</div> | ||
</ng-template> | ||
|
||
<ng-template #cardLoaderTpl let-label="label"> | ||
<mat-card class="card-tpl"> | ||
<mat-card-header *ngIf="label"> | ||
<mat-card-title>{{ label }}</mat-card-title> | ||
</mat-card-header> | ||
<mat-card-content> | ||
<mat-progress-bar mode="indeterminate"></mat-progress-bar> | ||
</mat-card-content> | ||
</mat-card> | ||
</ng-template> |
107 changes: 107 additions & 0 deletions
107
frontend/src/app/components/loader/loader.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
.loader-overlay { | ||
&::before { | ||
content: ""; | ||
display: block; | ||
width: 100%; | ||
height: 100%; | ||
background-color: #2c3e50; | ||
opacity: 0.6; | ||
z-index: 9998; | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
} | ||
|
||
.label { | ||
text-align: center; | ||
color: #fff; | ||
font-size: 18px; | ||
z-index: 9999; | ||
padding-top: 110px; | ||
} | ||
|
||
.content-template { | ||
position: fixed; | ||
text-align: center; | ||
top: 50%; | ||
transform: translate(-50%, -50%); | ||
left: 50%; | ||
color: #fff; | ||
z-index: 9999; | ||
|
||
.card-tpl { | ||
max-width: 30vw; | ||
width: fit-content; | ||
min-width: 100px; | ||
} | ||
} | ||
} | ||
|
||
.sk-cube-grid { | ||
width: 75px; | ||
height: 75px; | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
overflow: visible; | ||
margin: auto; | ||
bottom: 0; | ||
right: 0; | ||
z-index: 9999; | ||
} | ||
|
||
.sk-cube-grid .sk-cube { | ||
width: 33%; | ||
height: 33%; | ||
background-color: #fff ; | ||
float: left; | ||
-webkit-animation: sk-cubeGridScaleDelay 1.3s infinite ease-in-out; | ||
animation: sk-cubeGridScaleDelay 1.3s infinite ease-in-out; | ||
} | ||
.sk-cube-grid .sk-cube1 { | ||
-webkit-animation-delay: 0.2s; | ||
animation-delay: 0.2s; } | ||
.sk-cube-grid .sk-cube2 { | ||
-webkit-animation-delay: 0.3s; | ||
animation-delay: 0.3s; } | ||
.sk-cube-grid .sk-cube3 { | ||
-webkit-animation-delay: 0.4s; | ||
animation-delay: 0.4s; } | ||
.sk-cube-grid .sk-cube4 { | ||
-webkit-animation-delay: 0.1s; | ||
animation-delay: 0.1s; } | ||
.sk-cube-grid .sk-cube5 { | ||
-webkit-animation-delay: 0.2s; | ||
animation-delay: 0.2s; } | ||
.sk-cube-grid .sk-cube6 { | ||
-webkit-animation-delay: 0.3s; | ||
animation-delay: 0.3s; } | ||
.sk-cube-grid .sk-cube7 { | ||
-webkit-animation-delay: 0s; | ||
animation-delay: 0s; } | ||
.sk-cube-grid .sk-cube8 { | ||
-webkit-animation-delay: 0.1s; | ||
animation-delay: 0.1s; } | ||
.sk-cube-grid .sk-cube9 { | ||
-webkit-animation-delay: 0.2s; | ||
animation-delay: 0.2s; } | ||
|
||
@-webkit-keyframes sk-cubeGridScaleDelay { | ||
0%, 70%, 100% { | ||
-webkit-transform: scale3D(1, 1, 1); | ||
transform: scale3D(1, 1, 1); | ||
} 35% { | ||
-webkit-transform: scale3D(0, 0, 1); | ||
transform: scale3D(0, 0, 1); | ||
} | ||
} | ||
|
||
@keyframes sk-cubeGridScaleDelay { | ||
0%, 70%, 100% { | ||
-webkit-transform: scale3D(1, 1, 1); | ||
transform: scale3D(1, 1, 1); | ||
} 35% { | ||
-webkit-transform: scale3D(0, 0, 1); | ||
transform: scale3D(0, 0, 1); | ||
} | ||
} |
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,55 @@ | ||
import { Component, OnInit, OnDestroy, TemplateRef, ChangeDetectionStrategy, ChangeDetectorRef, QueryList, ViewChildren, ViewChild, AfterViewInit } from '@angular/core'; | ||
import { Subscription } from 'rxjs'; | ||
import { LoaderService, LoaderState } from 'app/services/loader.service'; | ||
|
||
@Component({ | ||
selector: 'loader-overlay', | ||
templateUrl: './loader.component.html', | ||
styleUrls: ['./loader.component.scss'], | ||
changeDetection: ChangeDetectionStrategy.OnPush | ||
}) | ||
export class LoaderOverlayComponent implements OnInit, AfterViewInit, OnDestroy { | ||
|
||
public loadingState: LoaderState; | ||
|
||
public defaultTpl: "default" | "card" = 'card'; | ||
|
||
public templatesMap: {[key: string]: TemplateRef<any>} = {}; | ||
|
||
private subscription: Subscription; | ||
|
||
@ViewChild('defaultLoaderTpl') | ||
private _defaultLoaderTpl: TemplateRef<any>; | ||
|
||
@ViewChild('cardLoaderTpl') | ||
private _cardLoaderTpl: TemplateRef<any>; | ||
|
||
constructor( | ||
private _cdr: ChangeDetectorRef, | ||
private _loaderService: LoaderService | ||
) { } | ||
|
||
ngOnInit(): void { | ||
this.subscription = this._loaderService.loaderState$.subscribe( | ||
state => { | ||
this.loadingState = state; | ||
this._cdr.detectChanges(); | ||
} | ||
); | ||
} | ||
|
||
ngAfterViewInit(): void { | ||
this.templatesMap = { | ||
'default': this._defaultLoaderTpl, | ||
'card': this._cardLoaderTpl | ||
} | ||
} | ||
|
||
isHidden(): boolean { | ||
return !this.loadingState.isLoading || !this.loadingState.show; | ||
} | ||
|
||
ngOnDestroy(): void { | ||
this.subscription.unsubscribe(); | ||
} | ||
} |
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.