[DEV] migrate with succes to angular17

This commit is contained in:
Edouard DUPIN 2024-02-26 00:01:37 +01:00
parent 0af1bbfb52
commit c3e2b7240b
19 changed files with 763 additions and 761 deletions

View File

@ -1,7 +1,7 @@
{ {
"name": "karusic", "name": "karusic",
"version": "0.0.0", "version": "0.0.0",
"license": "MIT", "license": "MPL-2",
"scripts": { "scripts": {
"all": "npm run build && npm run test", "all": "npm run build && npm run test",
"ng": "ng", "ng": "ng",
@ -9,6 +9,7 @@
"build": "ng build --prod", "build": "ng build --prod",
"test": "ng test", "test": "ng test",
"lint": "ng lint", "lint": "ng lint",
"style": "prettier --write .",
"e2e": "ng e2e", "e2e": "ng e2e",
"update_packages": "ncu --upgrade", "update_packages": "ncu --upgrade",
"install_dependency": "npm install" "install_dependency": "npm install"
@ -40,4 +41,4 @@
"@angular/language-service": "^17.2.0", "@angular/language-service": "^17.2.0",
"npm-check-updates": "^16.14.15" "npm-check-updates": "^16.14.15"
} }
} }

View File

@ -1,15 +1,17 @@
<!-- Generig global menu --> <!-- Generig global menu -->
<app-top-menu [menu]="currentMenu" (callback)="eventOnMenu($event)"></app-top-menu> <app-top-menu [menu]="currentMenu" (callback)="eventOnMenu($event)"></app-top-menu>
<!-- all interfaced pages --> <!-- all interfaced pages -->
<div class="main-content" *ngIf="autoConnectedDone"> <div class="main-content">
@if(autoConnectedDone) {
<router-outlet ></router-outlet> <router-outlet ></router-outlet>
</div> }
<div class="main-content" *ngIf="!autoConnectedDone"> @else {
<div class="generic-page"> <div class="generic-page">
<div class="fill-all colomn_mutiple"> <div class="fill-all colomn_mutiple">
<b style="color:red;">Auto-connection in progress</b> <b style="color:red;">Auto-connection in progress</b>
<div class="clear"></div> <div class="clear"></div>
</div> </div>
</div> </div>
}
</div> </div>
<app-element-player-audio></app-element-player-audio> <app-element-player-audio></app-element-player-audio>

View File

@ -20,9 +20,4 @@
<div class="title-small"> <div class="title-small">
{{name}} {{name}}
</div> </div>
<!--
<div class="description-small" *ngIf="description">
{{description}}
</div>
-->
</div> </div>

View File

@ -2,7 +2,9 @@
<div class="season-small"> <div class="season-small">
{{name}} {{name}}
</div> </div>
<div class="description-small" *ngIf="track"> @if(track) {
n° {{track}} <div class="description-small">
</div> n° {{track}}
</div>
}
</div> </div>

View File

@ -1,7 +1,9 @@
<div> <div>
<div class="count-base" *ngIf="counttrack"> @if(counttrack) {
<span class="count">{{counttrack}}</span> <div class="count-base">
</div> <span class="count">{{counttrack}}</span>
</div>
}
<div class="imgContainer-small"> <div class="imgContainer-small">
@if(covers && covers.length > 0) { @if(covers && covers.length > 0) {
<div> <div>
@ -12,7 +14,9 @@
<div class="title-small"> <div class="title-small">
{{name}} {{name}}
</div> </div>
<div class="description-small" *ngIf="description"> @if(description) {
{{description}} <div class="description-small">
</div> {{description}}
</div>
}
</div> </div>

View File

@ -10,15 +10,14 @@
<div class="noImage"></div> <div class="noImage"></div>
} }
</div> </div>
<div class="title-small" *ngIf="data"> @if(data) {
{{episodeDisplay}} {{name}} <div class="title-small">
</div> {{episodeDisplay}} {{name}}
<div class="title-small" *ngIf="!data"> </div>
Error meda: {{element?.id}} }
</div> @else {
<!-- <div class="title-small">
<div class="description-small" *ngIf="description"> Error meda: {{element?.id}}
{{description}} </div>
</div> }
-->
</div> </div>

View File

@ -2,146 +2,160 @@
<div class="title"> <div class="title">
Edit album Edit album
</div> </div>
<div class="fill-all" *ngIf="itemIsRemoved"> @if(itemIsRemoved) {
<div class="message-big"> <div class="fill-all">
<br/><br/><br/> <div class="message-big">
The album has been removed <br/><br/><br/>
<br/><br/><br/> The album has been removed
</div> <br/><br/><br/>
</div>
<div class="fill-all" *ngIf="itemIsNotFound">
<div class="message-big">
<br/><br/><br/>
The album does not exist
<br/><br/><br/>
</div>
</div>
<div class="fill-all" *ngIf="itemIsLoading">
<div class="message-big">
<br/><br/><br/>
Loading ...<br/>
Please wait.
<br/><br/><br/>
</div>
</div>
<div class="fill-all" *ngIf="!itemIsRemoved && !itemIsNotFound && !itemIsLoading">
<div class="request_raw">
<div class="label">
name:
</div>
<div class="input">
<input type="text"
placeholder="Name of the album"
[value]="nameAlbum"
(input)="onName($event.target.value)"
/>
</div> </div>
</div> </div>
<!-- }
@else if (itemIsNotFound) {
<div class="fill-all">
<div class="message-big">
<br/><br/><br/>
The album does not exist
<br/><br/><br/>
</div>
</div>
}
@else if (itemIsLoading) {
<div class="fill-all">
<div class="message-big">
<br/><br/><br/>
Loading ...<br/>
Please wait.
<br/><br/><br/>
</div>
</div>
}
@else {
<div class="fill-all">
<div class="request_raw"> <div class="request_raw">
<div class="label"> <div class="label">
<i class="material-icons">date_range</i> Date: name:
</div> </div>
<div class="input"> <div class="input">
<input type="number" <input type="text"
pattern="[0-9]{0-4}" placeholder="Name of the album"
placeholder="2112" [value]="nameAlbum"
[value]="data.time" (input)="onName($event.target.value)"
(input)="onDate($event.target)"/> />
</div> </div>
</div> </div>
--> <!--
<div class="request_raw"> <div class="request_raw">
<div class="label"> <div class="label">
Description: <i class="material-icons">date_range</i> Date:
</div>
<div class="input">
<input type="text"
placeholder="Description of the Media"
[value]="description"
(input)="onDescription($event.target.value)"/>
</div>
</div>
<div class="send_value">
<button class="button fill-x color-button-validate color-shadow-black" (click)="sendValues()" type="submit"><i class="material-icons">save_alt</i> Save</button>
</div>
<div class="clear"></div>
</div>
<!-- ------------------------- Cover section --------------------------------- -->
<div class="title" *ngIf="!itemIsRemoved && !itemIsNotFound && !itemIsLoading">
Covers
</div>
<div class="fill-all" *ngIf="!itemIsRemoved && !itemIsNotFound && !itemIsLoading">
<div class="hide-element">
<input type="file"
#fileInput
(change)="onChangeCover($event.target)"
placeholder="Select a cover file"
accept=".png,.jpg,.jpeg,.webp"/>
</div>
<div class="request_raw">
<div class="input">
<div class="cover" *ngFor="let element of coversDisplay">
<div class="cover-image">
<img src="{{element.url}}"/>
</div> </div>
<div class="cover-button"> <div class="input">
<button (click)="removeCover(element.id)"> <input type="number"
<i class="material-icons button-remove">highlight_off</i> pattern="[0-9]{0-4}"
placeholder="2112"
[value]="data.time"
(input)="onDate($event.target)"/>
</div>
</div>
-->
<div class="request_raw">
<div class="label">
Description:
</div>
<div class="input">
<input type="text"
placeholder="Description of the Media"
[value]="description"
(input)="onDescription($event.target.value)"/>
</div>
</div>
<div class="send_value">
<button class="button fill-x color-button-validate color-shadow-black" (click)="sendValues()" type="submit"><i class="material-icons">save_alt</i> Save</button>
</div>
<div class="clear"></div>
</div>
<!-- ------------------------- Cover section --------------------------------- -->
<div class="title">
Covers
</div>
<div class="fill-all">
<div class="hide-element">
<input type="file"
#fileInput
(change)="onChangeCover($event.target)"
placeholder="Select a cover file"
accept=".png,.jpg,.jpeg,.webp"/>
</div>
<div class="request_raw">
<div class="input">
@for (element of coversDisplay; track element.id;) {
<div class="cover">
<div class="cover-image">
<img src="{{element.url}}"/>
</div>
<div class="cover-button">
<button (click)="removeCover(element.id)">
<i class="material-icons button-remove">highlight_off</i>
</button>
</div>
</div>
}
<div class="cover">
<div class="cover-no-image">
</div>
<div class="cover-button">
<button (click)="fileInput.click()">
<i class="material-icons button-add">add_circle_outline</i>
</button>
</div>
</div>
</div>
</div>
<div class="clear"></div>
</div>
<!-- ------------------------- ADMIN section --------------------------------- -->
<div class="title">
Administration
</div>
<div class="fill-all">
<div class="request_raw">
<div class="label">
<i class="material-icons">data_usage</i> ID:
</div>
<div class="input">
{{idAlbum}}
</div>
</div>
<div class="clear"></div>
<div class="request_raw">
<div class="label">
Tracks:
</div>
<div class="input">
{{trackCount}}
</div>
</div>
<div class="clear"></div>
<div class="request_raw">
<div class="label">
<i class="material-icons">delete_forever</i> Trash:
</div>
@if(trackCount == '0') {
<div class="input">
<button class="button color-button-cancel color-shadow-black" (click)="removeItem()" type="submit">
<i class="material-icons">delete</i> Remove album
</button> </button>
</div> </div>
</div> }
<div class="cover"> @else {
<div class="cover-no-image"> <div class="input">
<i class="material-icons">new_releases</i> Can not remove album, track depending on it
</div> </div>
<div class="cover-button"> }
<button (click)="fileInput.click()">
<i class="material-icons button-add">add_circle_outline</i>
</button>
</div>
</div>
</div> </div>
<div class="clear"></div>
</div> </div>
<div class="clear"></div> }
</div>
<!-- ------------------------- ADMIN section --------------------------------- -->
<div class="title" *ngIf="!itemIsRemoved && !itemIsNotFound && !itemIsLoading">
Administration
</div>
<div class="fill-all" *ngIf="!itemIsRemoved && !itemIsNotFound && !itemIsLoading">
<div class="request_raw">
<div class="label">
<i class="material-icons">data_usage</i> ID:
</div>
<div class="input">
{{idAlbum}}
</div>
</div>
<div class="clear"></div>
<div class="request_raw">
<div class="label">
Tracks:
</div>
<div class="input">
{{trackCount}}
</div>
</div>
<div class="clear"></div>
<div class="request_raw">
<div class="label">
<i class="material-icons">delete_forever</i> Trash:
</div>
<div class="input" *ngIf="(trackCount == '0')">
<button class="button color-button-cancel color-shadow-black" (click)="removeItem()" type="submit">
<i class="material-icons">delete</i> Remove album
</button>
</div>
<div class="input" *ngIf="(trackCount != '0')">
<i class="material-icons">new_releases</i> Can not remove album, track depending on it
</div>
</div>
<div class="clear"></div>
</div>
</div> </div>
<upload-progress [mediaTitle]="upload.labelMediaTitle" <upload-progress [mediaTitle]="upload.labelMediaTitle"
[mediaUploaded]="upload.mediaSendSize" [mediaUploaded]="upload.mediaSendSize"

View File

@ -5,22 +5,25 @@
[cover1]="covers" [cover1]="covers"
(play)="playAll()" (play)="playAll()"
(shuffle)="playShuffle()"/> (shuffle)="playShuffle()"/>
<div class="fill-content colomn_single" *ngIf="albums"> @if(albums) {
<div class="clear"></div> <div class="fill-content colomn_single">
<div class="title">Album{{albums.length > 1?"s":""}}: <app-entry placeholder="Search..." (changeValue)="onSearch($event)"></app-entry></div> <div class="clear"></div>
<div *ngFor="let data of albums" <div class="title">Album{{albums.length > 1?"s":""}}: <app-entry placeholder="Search..." (changeValue)="onSearch($event)"></app-entry></div>
class="item-list" @for (data of albums; track data.id;) {
(click)="onSelectAlbum($event, data.id)" <div class="item-list"
(auxclick)="onSelectAlbum($event, data.id)" (click)="onSelectAlbum($event, data.id)"
> (auxclick)="onSelectAlbum($event, data.id)"
<app-element-season >
[element]="data" <app-element-season
countSubType="Track" [element]="data"
[countSubTypeCallBack]="countTrack" countSubType="Track"
subValues="Artist" [countSubTypeCallBack]="countTrack"
[subValuesCallBack]="getArtistsString"/> subValues="Artist"
[subValuesCallBack]="getArtistsString"/>
</div>
}
</div> </div>
</div> }
@if(tracks) { @if(tracks) {
<div class="fill-content colomn_mutiple"> <div class="fill-content colomn_mutiple">
<div class="clear"></div> <div class="clear"></div>

View File

@ -2,153 +2,169 @@
<div class="title"> <div class="title">
Edit artist Edit artist
</div> </div>
<div class="fill-all" *ngIf="itemIsRemoved"> @if(itemIsRemoved) {
<div class="message-big"> <div class="fill-all">
<br/><br/><br/> <div class="message-big">
The artist has been removed <br/><br/><br/>
<br/><br/><br/> The artist has been removed
</div> <br/><br/><br/>
</div>
<div class="fill-all" *ngIf="itemIsNotFound">
<div class="message-big">
<br/><br/><br/>
The artist does not exist
<br/><br/><br/>
</div>
</div>
<div class="fill-all" *ngIf="itemIsLoading">
<div class="message-big">
<br/><br/><br/>
Loading ...<br/>
Please wait.
<br/><br/><br/>
</div>
</div>
<div class="fill-all" *ngIf="!itemIsRemoved && !itemIsNotFound && !itemIsLoading">
<div class="request_raw">
<div class="label">
Type:
</div>
<div class="input">
<select [ngModel]="typeId"
(ngModelChange)="onChangeType($event)">
<option *ngFor="let element of listType" [ngValue]="element.value">{{element.label}}</option>
</select>
</div> </div>
</div> </div>
<div class="request_raw"> }
<div class="label"> @else if (itemIsNotFound) {
Name: <div class="fill-all">
</div> <div class="message-big">
<div class="input"> <br/><br/><br/>
<input type="text" The artist does not exist
placeholder="Name of the Artist" <br/><br/><br/>
[value]="name"
(input)="onName($event.target.value)"
/>
</div> </div>
</div> </div>
<div class="request_raw"> }
<div class="label"> @else if (itemIsLoading) {
Description: <div class="fill-all">
</div> <div class="message-big">
<div class="input"> <br/><br/><br/>
<input type="text" Loading ...<br/>
placeholder="Description of the Media" Please wait.
[value]="description" <br/><br/><br/>
(input)="onDescription($event.target.value)"/>
</div> </div>
</div> </div>
<div class="clear"></div> }
<div class="send_value"> @else {
<button class="button fill-x color-button-validate color-shadow-black" (click)="sendValues()" type="submit"><i class="material-icons">save_alt</i> Save</button> <div class="fill-all">
</div> <div class="request_raw">
<div class="clear"></div> <div class="label">
</div> Type:
<!-- ------------------------- Cover section --------------------------------- -->
<div class="title" *ngIf="!itemIsRemoved && !itemIsNotFound && !itemIsLoading">
Covers
</div>
<div class="fill-all" *ngIf="!itemIsRemoved && !itemIsNotFound && !itemIsLoading">
<div class="hide-element">
<input type="file"
#fileInput
(change)="onChangeCover($event.target)"
placeholder="Select a cover file"
accept=".png,.jpg,.jpeg,.webp"/>
</div>
<div class="request_raw">
<div class="input">
<div class="cover" *ngFor="let element of coversDisplay">
<div class="cover-image">
<img src="{{element.url}}"/>
</div>
<div class="cover-button">
<button (click)="removeCover(element.id)">
<i class="material-icons button-remove">highlight_off</i>
</button>
</div>
</div> </div>
<div class="cover"> <div class="input">
<div class="cover-no-image"> <select [ngModel]="typeId"
</div> (ngModelChange)="onChangeType($event)">
<div class="cover-button"> @for (element of listType; track element.value;) {
<button (click)="fileInput.click()"> <option [ngValue]="element.value">{{element.label}}</option>
<i class="material-icons button-add">add_circle_outline</i> }
</button> </select>
</div>
</div>
<div class="request_raw">
<div class="label">
Name:
</div>
<div class="input">
<input type="text"
placeholder="Name of the Artist"
[value]="name"
(input)="onName($event.target.value)"
/>
</div>
</div>
<div class="request_raw">
<div class="label">
Description:
</div>
<div class="input">
<input type="text"
placeholder="Description of the Media"
[value]="description"
(input)="onDescription($event.target.value)"/>
</div>
</div>
<div class="clear"></div>
<div class="send_value">
<button class="button fill-x color-button-validate color-shadow-black" (click)="sendValues()" type="submit"><i class="material-icons">save_alt</i> Save</button>
</div>
<div class="clear"></div>
</div>
<!-- ------------------------- Cover section --------------------------------- -->
<div class="title">
Covers
</div>
<div class="fill-all">
<div class="hide-element">
<input type="file"
#fileInput
(change)="onChangeCover($event.target)"
placeholder="Select a cover file"
accept=".png,.jpg,.jpeg,.webp"/>
</div>
<div class="request_raw">
<div class="input">
@for (element of coversDisplay; track element.id;) {
<div class="cover">
<div class="cover-image">
<img src="{{element.url}}"/>
</div>
<div class="cover-button">
<button (click)="removeCover(element.id)">
<i class="material-icons button-remove">highlight_off</i>
</button>
</div>
</div>
}
<div class="cover">
<div class="cover-no-image">
</div>
<div class="cover-button">
<button (click)="fileInput.click()">
<i class="material-icons button-add">add_circle_outline</i>
</button>
</div>
</div> </div>
</div> </div>
</div> </div>
<div class="clear"></div>
</div> </div>
<div class="clear"></div> <!-- ------------------------- ADMIN section --------------------------------- -->
</div> <div class="title">
<!-- ------------------------- ADMIN section --------------------------------- --> Administration
<div class="title" *ngIf="!itemIsRemoved && !itemIsNotFound && !itemIsLoading">
Administration
</div>
<div class="fill-all" *ngIf="!itemIsRemoved && !itemIsNotFound && !itemIsLoading">
<div class="request_raw">
<div class="label">
<i class="material-icons">data_usage</i> ID:
</div>
<div class="input">
{{idArtist}}
</div>
</div> </div>
<div class="clear"></div> <div class="fill-all">
<div class="request_raw"> <div class="request_raw">
<div class="label"> <div class="label">
Albums: <i class="material-icons">data_usage</i> ID:
</div>
<div class="input">
{{idArtist}}
</div>
</div> </div>
<div class="input"> <div class="clear"></div>
{{albumsCount}} <div class="request_raw">
<div class="label">
Albums:
</div>
<div class="input">
{{albumsCount}}
</div>
</div> </div>
<div class="clear"></div>
<div class="request_raw">
<div class="label">
Tracks:
</div>
<div class="input">
{{trackCount}}
</div>
</div>
<div class="clear"></div>
<div class="request_raw">
<div class="label">
<i class="material-icons">delete_forever</i> Trash:
</div>
@if(trackCount == '0' && albumsCount == '0') {
<div class="input">
<button class="button color-button-cancel color-shadow-black" (click)="removeItem()" type="submit">
<i class="material-icons">delete</i> Remove Artist
</button>
</div>
}
@else {
<div class="input">
<i class="material-icons">new_releases</i> Can not remove album or track depending on it
</div>
}
</div>
<div class="clear"></div>
</div> </div>
<div class="clear"></div> }
<div class="request_raw">
<div class="label">
Tracks:
</div>
<div class="input">
{{trackCount}}
</div>
</div>
<div class="clear"></div>
<div class="request_raw">
<div class="label">
<i class="material-icons">delete_forever</i> Trash:
</div>
<div class="input" *ngIf="(trackCount == '0' && albumsCount == '0')">
<button class="button color-button-cancel color-shadow-black" (click)="removeItem()" type="submit">
<i class="material-icons">delete</i> Remove Artist
</button>
</div>
<div class="input" *ngIf="(trackCount != '0' || albumsCount != '0')">
<i class="material-icons">new_releases</i> Can not remove album or track depending on it
</div>
</div>
<div class="clear"></div>
</div>
</div> </div>
<upload-progress [mediaTitle]="upload.labelMediaTitle" <upload-progress [mediaTitle]="upload.labelMediaTitle"

View File

@ -7,17 +7,19 @@
[cover2]="albumCovers" [cover2]="albumCovers"
(play)="playAll()" (play)="playAll()"
(shuffle)="playShuffle()"/> (shuffle)="playShuffle()"/>
<div class="fill-content colomn_single" *ngIf="tracks"> @if(tracks) {
<div class="clear"></div> <div class="fill-content colomn_single">
<div class="title">Track{{tracks.length > 1?"s":""}}:</div> <div class="clear"></div>
@for (data of tracks; track data.id;) { <div class="title">Track{{tracks.length > 1?"s":""}}:</div>
<app-element-track @for (data of tracks; track data.id;) {
[element]="data" <app-element-track
(click)="onSelectTrack($event, data.id)" [element]="data"
(auxclick)="onSelectTrack($event, data.id)"></app-element-track> (click)="onSelectTrack($event, data.id)"
} @empty { (auxclick)="onSelectTrack($event, data.id)"></app-element-track>
Aucune piste accessible. } @empty {
} Aucune piste accessible.
</div> }
</div>
}
<div class="clear-end"></div> <div class="clear-end"></div>
</div> </div>

View File

@ -9,24 +9,28 @@
<div class="fill-content colomn_single"> <div class="fill-content colomn_single">
<div class="clear"></div> <div class="clear"></div>
<div class="title">Album{{albums.length > 1?"s":""}}:</div> <div class="title">Album{{albums.length > 1?"s":""}}:</div>
<div *ngFor="let data of albums" class="item-list" (click)="onSelectAlbum($event, data.id)" (auxclick)="onSelectAlbum($event, data.id)"> @for (data of albums; track data.id;) {
<app-element-season <div class="item-list" (click)="onSelectAlbum($event, data.id)" (auxclick)="onSelectAlbum($event, data.id)">
[element]="data" <app-element-season
countSubType="Track" [element]="data"
[countSubTypeCallBack]="countTrack" countSubType="Track"
></app-element-season> [countSubTypeCallBack]="countTrack"
</div> ></app-element-season>
</div>
}
</div> </div>
} }
@if(tracks) { @if(tracks) {
<div class="fill-content colomn_mutiple"> <div class="fill-content colomn_mutiple">
<div class="clear"></div> <div class="clear"></div>
<div class="title">Track{{tracks.length > 1?"s":""}}:</div> <div class="title">Track{{tracks.length > 1?"s":""}}:</div>
<div *ngFor="let data of tracks" class="item item-video" (click)="onSelectTrack($event, data.id)" (auxclick)="onSelectTrack($event, data.id)"> @for (data of tracks; track data.id;) {
<app-element-video <div class="item item-video" (click)="onSelectTrack($event, data.id)" (auxclick)="onSelectTrack($event, data.id)">
[element]="data" <app-element-video
></app-element-video> [element]="data"
</div> ></app-element-video>
</div>
}
</div> </div>
} }
<div class="clear-end"></div> <div class="clear-end"></div>

View File

@ -5,20 +5,22 @@
[cover1]="covers" [cover1]="covers"
(play)="playAll()" (play)="playAll()"
(shuffle)="playShuffle()"/> (shuffle)="playShuffle()"/>
<div class="fill-content colomn_single" *ngIf="artists"> @if(artists) {
<div class="clear"></div> <div class="fill-content colomn_single">
<div class="title">Artist{{artists.length > 1?"s":""}}: <app-entry placeholder="Search..." (changeValue)="onSearch($event)"></app-entry></div> <div class="clear"></div>
@for (data of artists; track data.id;) { <div class="title">Artist{{artists.length > 1?"s":""}}: <app-entry placeholder="Search..." (changeValue)="onSearch($event)"></app-entry></div>
<div class="item-list" (click)="onSelectArtist($event, data.id)" (auxclick)="onSelectArtist($event, data.id)"> @for (data of artists; track data.id;) {
<app-element-season <div class="item-list" (click)="onSelectArtist($event, data.id)" (auxclick)="onSelectArtist($event, data.id)">
[element]="data" <app-element-season
countSubType="Album" [element]="data"
[countSubTypeCallBack]="countAlbum" countSubType="Album"
countSubType2="Track" [countSubTypeCallBack]="countAlbum"
[countSubType2CallBack]="countTrack" countSubType2="Track"
></app-element-season> [countSubType2CallBack]="countTrack"
</div> ></app-element-season>
} </div>
</div> }
</div>
}
<div class="clear-end"></div> <div class="clear-end"></div>
</div> </div>

View File

@ -11,9 +11,11 @@
<div class="title"> <div class="title">
{{name}} {{name}}
</div> </div>
<div class="description" *ngIf="description"> @if(description) {
{{description}} <div class="description">
</div> {{description}}
</div>
}
</div> </div>
</div> </div>
<div class="fill-content colomn_mutiple"> <div class="fill-content colomn_mutiple">

View File

@ -2,148 +2,161 @@
<div class="title"> <div class="title">
Edit Media Edit Media
</div> </div>
<div class="fill-all" *ngIf="itemIsRemoved"> @if(itemIsRemoved) {
<div class="message-big"> <div class="fill-all">
<br/><br/><br/> <div class="message-big">
The media has been removed <br/><br/><br/>
<br/><br/><br/> The media has been removed
</div> <br/><br/><br/>
</div>
<div class="fill-all" *ngIf="itemIsNotFound">
<div class="message-big">
<br/><br/><br/>
The media does not exist
<br/><br/><br/>
</div>
</div>
<div class="fill-all" *ngIf="itemIsLoading">
<div class="message-big">
<br/><br/><br/>
Loading ...<br/>
Please wait.
<br/><br/><br/>
</div>
</div>
<div class="fill-all" *ngIf="!itemIsRemoved && !itemIsNotFound && !itemIsLoading">
<div class="request_raw">
<div class="label">
Title:
</div>
<div class="input">
<input type="text"
placeholder="Name of the Media"
[value]="data.name"
(input)="onName($event.target.value)"
/>
</div> </div>
</div> </div>
<div class="request_raw2"> }
<div class="label"> @else if (itemIsNotFound) {
<i class="material-icons">description</i> Description: <div class="fill-all">
</div> <div class="message-big">
<div class="input"> <br/><br/><br/>
<textarea (input)="onDescription($event.target.value)" placeholder="Description of the Media" rows=6>{{data.description}}</textarea> The media does not exist
<!--<input type="text" <br/><br/><br/>
placeholder="Description of the Media"
[value]="data.description"
(input)="onDescription($event.target.value)"/>-->
</div> </div>
</div> </div>
<div class="request_raw"> }
<div class="label"> @else if (itemIsLoading) {
Gender: <div class="fill-all">
</div> <div class="message-big">
<div class="input"> <br/><br/><br/>
<select [ngModel]="data.genderId" Loading ...<br/>
(ngModelChange)="onChangeGender($event)"> Please wait.
<option *ngFor="let element of listGender" [ngValue]="element.value">{{element.label}}</option> <br/><br/><br/>
</select>
</div>
<div class="input_add">
<button class="button color-button-normal color-shadow-black" (click)="newGender()" type="submit">
<i class="material-icons">add_circle_outline</i>
</button>
</div> </div>
</div> </div>
<div class="request_raw"> }
<div class="label"> @else {
Artist: <div class="fill-all">
<div class="request_raw">
<div class="label">
Title:
</div>
<div class="input">
<input type="text"
placeholder="Name of the Media"
[value]="data.name"
(input)="onName($event.target.value)"
/>
</div>
</div> </div>
<div class="input"> <div class="request_raw2">
<select [ngModel]="data.artistId" <div class="label">
(ngModelChange)="onChangeArtist($event)"> <i class="material-icons">description</i> Description:
<option *ngFor="let element of listArtist" [ngValue]="element.value">{{element.label}}</option> </div>
</select> <div class="input">
<textarea (input)="onDescription($event.target.value)" placeholder="Description of the Media" rows=6>{{data.description}}</textarea>
<!--<input type="text"
placeholder="Description of the Media"
[value]="data.description"
(input)="onDescription($event.target.value)"/>-->
</div>
</div> </div>
<div class="input_add"> <div class="request_raw">
<button class="button color-button-normal color-shadow-black" (click)="newArtist()" type="submit"> <div class="label">
<i class="material-icons">add_circle_outline</i> Gender:
</button> </div>
<div class="input">
<select [ngModel]="data.genderId"
(ngModelChange)="onChangeGender($event)">
@for (element of listGender; track element.value;) {
<option [ngValue]="element.value">{{element.label}}</option>
}
</select>
</div>
<div class="input_add">
<button class="button color-button-normal color-shadow-black" (click)="newGender()" type="submit">
<i class="material-icons">add_circle_outline</i>
</button>
</div>
</div> </div>
<div class="request_raw">
<div class="label">
Artist:
</div>
<div class="input">
<select [ngModel]="data.artistId"
(ngModelChange)="onChangeArtist($event)">
@for (element of listArtist; track element.value;) {
<option [ngValue]="element.value">{{element.label}}</option>
}
</select>
</div>
<div class="input_add">
<button class="button color-button-normal color-shadow-black" (click)="newArtist()" type="submit">
<i class="material-icons">add_circle_outline</i>
</button>
</div>
</div>
<div class="request_raw">
<div class="label">
Album:
</div>
<div class="input">
<select [ngModel]="data.albumId"
(ngModelChange)="onChangeAlbum($event)">
@for (element of listAlbum; track element.value;) {
<option [ngValue]="element.value">{{element.label}}</option>
}
</select>
</div>
<div class="input_add">
<button class="button color-button-normal color-shadow-black" (click)="newAlbum()" type="submit">
<i class="material-icons">add_circle_outline</i>
</button>
</div>
</div>
<div class="request_raw">
<div class="label">
Track n°:
</div>
<div class="input">
<input type="number"
pattern="[0-9]{0-4}"
placeholder="5"
[value]="data.track"
(input)="onTrack($event.target)"/>
</div>
</div>
<div class="send_value">
<button class="button fill-x color-button-validate color-shadow-black"
[disabled]="!needSend"
(click)="sendValues()"
type="submit"><i class="material-icons">save_alt</i> Save</button>
</div>
<div class="clear"></div>
</div> </div>
<div class="request_raw"> <!-- ------------------------- ADMIN section --------------------------------- -->
<div class="label"> <div class="title">
Album: Administration
</div>
<div class="input">
<select [ngModel]="data.albumId"
(ngModelChange)="onChangeAlbum($event)">
<option *ngFor="let element of listAlbum" [ngValue]="element.value">{{element.label}}</option>
</select>
</div>
<div class="input_add">
<button class="button color-button-normal color-shadow-black" (click)="newAlbum()" type="submit">
<i class="material-icons">add_circle_outline</i>
</button>
</div>
</div> </div>
<div class="request_raw"> <div class="fill-all">
<div class="label"> <div class="request_raw">
Track n°: <div class="label">
<i class="material-icons">data_usage</i> ID:
</div>
<div class="input">
{{data.dataId}}
</div>
</div> </div>
<div class="input"> <div class="clear"></div>
<input type="number" <div class="request_raw">
pattern="[0-9]{0-4}" <div class="label">
placeholder="5" <i class="material-icons">delete_forever</i> Trash:
[value]="data.track" </div>
(input)="onTrack($event.target)"/> <div class="input">
<button class="button color-button-cancel color-shadow-black" (click)="removeItem()" type="submit">
<i class="material-icons">delete</i> Remove Media
</button>
</div>
</div> </div>
<div class="clear"></div>
</div> </div>
<div class="send_value"> }
<button class="button fill-x color-button-validate color-shadow-black"
[disabled]="!needSend"
(click)="sendValues()"
type="submit"><i class="material-icons">save_alt</i> Save</button>
</div>
<div class="clear"></div>
</div>
<!-- ------------------------- ADMIN section --------------------------------- -->
<div class="title" *ngIf="!itemIsRemoved && !itemIsNotFound && !itemIsLoading">
Administration
</div>
<div class="fill-all" *ngIf="!itemIsRemoved && !itemIsNotFound && !itemIsLoading">
<div class="request_raw">
<div class="label">
<i class="material-icons">data_usage</i> ID:
</div>
<div class="input">
{{data.dataId}}
</div>
</div>
<div class="clear"></div>
<div class="request_raw">
<div class="label">
<i class="material-icons">delete_forever</i> Trash:
</div>
<div class="input">
<button class="button color-button-cancel color-shadow-black" (click)="removeItem()" type="submit">
<i class="material-icons">delete</i> Remove Media
</button>
</div>
</div>
<div class="clear"></div>
</div>
</div> </div>
<create-type ></create-type> <create-type ></create-type>

View File

@ -1,17 +1,21 @@
<div class="main-reduce"> <div class="main-reduce">
<div class="fill-all" *ngIf="mediaIsNotFound"> @if(mediaIsNotFound) {
<div class="title"> <div class="fill-all">
Play media<br/><br/><br/><br/><br/> <div class="title">
The media does not exist Play media<br/><br/><br/><br/><br/>
The media does not exist
</div>
</div> </div>
</div> }
<div class="fill-all" *ngIf="mediaIsLoading"> @if(mediaIsLoading) {
<div class="title"> <div class="fill-all">
Play media<br/><br/><br/><br/><br/> <div class="title">
Loading ...<br/> Play media<br/><br/><br/><br/><br/>
Please wait. Loading ...<br/>
Please wait.
</div>
</div> </div>
</div> }
@if(!mediaIsNotFound && !mediaIsLoading && !playTrack) { @if(!mediaIsNotFound && !mediaIsLoading && !playTrack) {
<div class="fill-all"> <div class="fill-all">
<div class="title"> <div class="title">
@ -20,7 +24,7 @@
<div class="cover-full"> <div class="cover-full">
<div class="cover"> <div class="cover">
@if (covers && covers.length > 0) { @if (covers && covers.length > 0) {
<div class="cover-image" *ngIf=""> <div class="cover-image">
<img src="{{covers[0]}}"/> <img src="{{covers[0]}}"/>
</div> </div>
} }
@ -134,15 +138,16 @@
} }
</div> </div>
} }
@if(!isFullScreen || !isPlaying) {
<div class="title-inline" *ngIf="!isFullScreen || !isPlaying"> <div class="title-inline">
{{generatedName}} {{generatedName}}
</div> </div>
<div class="track-button" *ngIf="!isFullScreen || !isPlaying"> <div class="track-button">
<button (click)="onRequireStop()"> <button (click)="onRequireStop()">
<i class="material-icons big-button">highlight_off</i> <i class="material-icons big-button">highlight_off</i>
</button> </button>
</div> </div>
}
@if (displayVolumeMenu && (!displayNeedHide || !isPlaying)) { @if (displayVolumeMenu && (!displayNeedHide || !isPlaying)) {
<div class="volume"> <div class="volume">
<div class="volume-menu"> <div class="volume-menu">

View File

@ -63,7 +63,9 @@
<td class="right-colomn"> <td class="right-colomn">
<!--<select [ngModel]="genreId"--> <!--<select [ngModel]="genreId"-->
<select (ngModelChange)="onChangeGender($event)"> <select (ngModelChange)="onChangeGender($event)">
<option *ngFor="let element of listGender" [ngValue]="element.value">{{element.label}}</option> @for (element of listGender; track element.value;) {
<option [ngValue]="element.value">{{element.label}}</option>
}
</select> </select>
</td> </td>
<td class="tool-colomn"> <td class="tool-colomn">
@ -89,7 +91,9 @@
<td class="right-colomn"> <td class="right-colomn">
<select [ngModel]="artistId" <select [ngModel]="artistId"
(ngModelChange)="onChangeArtist($event)"> (ngModelChange)="onChangeArtist($event)">
<option *ngFor="let element of listArtist" [ngValue]="element.value">{{element.label}}</option> @for (element of listArtist; track element.value;) {
<option [ngValue]="element.value">{{element.label}}</option>
}
</select> </select>
</td> </td>
<td class="tool-colomn"> <td class="tool-colomn">
@ -115,7 +119,9 @@
<td class="right-colomn"> <td class="right-colomn">
<select [ngModel]="albumId"> <select [ngModel]="albumId">
<!--(ngModelChange)="onChangeAlbum($event)">--> <!--(ngModelChange)="onChangeAlbum($event)">-->
<option *ngFor="let element of listAlbum" [ngValue]="element.value">{{element.label}}</option> @for (element of listAlbum; track element.value;) {
<option [ngValue]="element.value">{{element.label}}</option>
}
</select> </select>
</td> </td>
<td class="tool-colomn"> <td class="tool-colomn">
@ -144,36 +150,40 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr *ngFor="let data of this.parsedElement"> @for (data of parsedElement; track data.trackId;) {
<td class="left-colomn"> <tr>
<input type="number" <td class="left-colomn">
pattern="[0-9]{0-4}" <input type="number"
placeholder="e?" pattern="[0-9]{0-4}"
[value]="data.trackId" placeholder="e?"
(input)="onTrackId(data, $event.target.value)" [value]="data.trackId"
[class.error]="data.trackIdDetected === true" (input)="onTrackId(data, $event.target.value)"
/> [class.error]="data.trackIdDetected === true"
</td>
<td class="right-colomn" >
<input type="text"
placeholder="Name of the Media"
[value]="data.title"
(input)="onTitle(data, $event.target.value)"
[class.error]="data.title === ''"
/> />
<span *ngIf="data.nameDetected === true" class="error"> </td>
^^^This title already exist !!! <td class="right-colomn" >
</span> <input type="text"
</td> placeholder="Name of the Media"
<td class="tool-colomn" > [value]="data.title"
<button class="button color-button-cancel color-shadow-black" (input)="onTitle(data, $event.target.value)"
(click)="removeElmentFromList(data, $event.target.value)" [class.error]="data.title === ''"
type="submit" />
alt="Delete"> @if(data.nameDetected === true) {
<i class="material-icons">delete</i> <span class="error">
</button> ^^^This title already exist !!!
</td> </span>
</tr> }
</td>
<td class="tool-colomn" >
<button class="button color-button-cancel color-shadow-black"
(click)="removeElementFromList(data, $event.target.value)"
type="submit"
alt="Delete">
<i class="material-icons">delete</i>
</button>
</td>
</tr>
}
</tbody> </tbody>
</table> </table>
</div> </div>
@ -187,27 +197,31 @@
</button> </button>
</div> </div>
<div class="clear"></div> <div class="clear"></div>
<div class="request_raw_table" *ngIf="this.listFileInBdd"> @if(listFileInBdd) {
<table> <div class="request_raw_table">
<colgroup> <table>
<col style="width:10%"> <colgroup>
<col style="width:70%"> <col style="width:10%">
<col style="width:10%"> <col style="width:70%">
</colgroup> <col style="width:10%">
<thead> </colgroup>
<tr> <thead>
<th>Track ID:</th> <tr>
<th>Title:</th> <th>Track ID:</th>
</tr> <th>Title:</th>
</thead> </tr>
<tbody> </thead>
<tr *ngFor="let data of this.listFileInBdd"> <tbody>
<td class="left-colomn" [class.error]="data.episodeDetected === true">{{data.episode}}</td> @for (data of listFileInBdd; track data.id;) {
<td class="right-colomn" [class.error]="data.nameDetected === true">{{data.name}}</td> <tr>
</tr> <td class="left-colomn" [class.error]="data.episodeDetected === true">{{data.episode}}</td>
</tbody> <td class="right-colomn" [class.error]="data.nameDetected === true">{{data.name}}</td>
</table> </tr>
</div> }
</tbody>
</table>
</div>
}
</div> </div>
} }
@if(parsedElement.length !== 0) { @if(parsedElement.length !== 0) {
@ -219,20 +233,14 @@
<col style="width:80%"> <col style="width:80%">
</colgroup> </colgroup>
<tbody> <tbody>
<!-- no need @for (data of parsedFailedElement; track data.id;) {
<tr *ngFor="let data of this.parsedElement"> <tr>
<td class="left-colomn">Keep:</td> <td class="left-colomn">Rejected:</td>
<td class="right-colomn"> <td class="right-colomn">
{{data.file.name}} {{data.file.name}}<br/> ==&gt; {{data.reason}}
</td> </td>
</tr> </tr>
--> }
<tr *ngFor="let data of this.parsedFailedElement">
<td class="left-colomn">Rejected:</td>
<td class="right-colomn">
{{data.file.name}}<br/> ==&gt; {{data.reason}}
</td>
</tr>
</tbody> </tbody>
</table> </table>
</div> </div>

View File

@ -6,7 +6,7 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { GenderService, ArtistService, TrackService, ArianeService, AlbumService } from 'app/service'; import { GenderService, ArtistService, TrackService, AlbumService } from 'app/service';
import { NodeData } from 'common/model'; import { NodeData } from 'common/model';
import { UploadProgress } from 'common/popin/upload-progress/upload-progress'; import { UploadProgress } from 'common/popin/upload-progress/upload-progress';
import { PopInService } from 'common/service'; import { PopInService } from 'common/service';
@ -22,28 +22,29 @@ export class ElementList {
export class FileParsedElement { export class FileParsedElement {
public isSended: boolean = false; public isSended: boolean = false;
public nameDetected: boolean = false; public nameDetected: boolean = false;
public episodeDetected: boolean = false;s public trackIdDetected: boolean = false; s
constructor( constructor(
public file: File, public file: File,
public artist: string, public artist: string,
public album: string, public album: string,
public trackId: number, public trackId: number,
public title: string) { public title: string) {
// nothiing to do. // nothing to do.
} }
} }
export class FileFailParsedElement { export class FileFailParsedElement {
constructor( constructor(
public id: number,
public file: File, public file: File,
public reason: string) { public reason: string) {
// nothiing to do. // nothing to do.
} }
} }
@Component({ @Component({
selector: 'app-track-edit', selector: 'app-track-edit',
templateUrl: './upload.html', templateUrl: './upload.html',
styleUrls: [ './upload.less' ] styleUrls: ['./upload.less']
}) })
export class UploadScene implements OnInit { export class UploadScene implements OnInit {
@ -56,11 +57,11 @@ export class UploadScene implements OnInit {
albumId: number = null; albumId: number = null;
needSend: boolean = false; needSend: boolean = false;
// list of all files already registered in the bdd to compare with the curent list of files. // list of all files already registered in the bdd to compare with the current list of files.
listFileInBdd: any[] = undefined; listFileInBdd: any[] = undefined;
// section tha define the upload value to display in the pop-in of upload // section tha define the upload value to display in the pop-in of upload
public upload:UploadProgress = new UploadProgress(); public upload: UploadProgress = new UploadProgress();
listGender: ElementList[] = [ listGender: ElementList[] = [
{ value: null, label: '---' }, { value: null, label: '---' },
@ -74,19 +75,19 @@ export class UploadScene implements OnInit {
/* /*
config = { config = {
displayKey: "label", // if objects array passed which key to be displayed defaults to description displayKey: "label", // if objects array passed which key to be displayed defaults to description
search: true, search: true,
limitTo: 3, limitTo: 3,
}; };
*/ */
config = { config = {
displayKey: 'description', // if objects array passed which key to be displayed defaults to description displayKey: 'description', // if objects array passed which key to be displayed defaults to description
search: true, // true/false for the search functionlity defaults to false, search: true, // true/false for the search functionality defaults to false,
height: 'auto', // height of the list so that if there are more no of items it can show a scroll defaults to auto. With auto height scroll will never appear height: 'auto', // height of the list so that if there are more no of items it can show a scroll defaults to auto. With auto height scroll will never appear
placeholder: 'Select', // text to be displayed when no item is selected defaults to Select, placeholder: 'Select', // text to be displayed when no item is selected defaults to Select,
customComparator: () => {}, // a custom function using which user wants to sort the items. default is undefined and Array.sort() will be used in that case, customComparator: () => { }, // a custom function using which user wants to sort the items. default is undefined and Array.sort() will be used in that case,
limitTo: 10, // number thats limits the no of options displayed in the UI (if zero, options will not be limited) limitTo: 10, // number thats limits the no of options displayed in the UI (if zero, options will not be limited)
moreText: 'more', // text to be displayed whenmore than one items are selected like Option 1 + 5 more moreText: 'more', // text to be displayed when more than one items are selected like Option 1 + 5 more
noResultsFound: 'No results found!', // text to be displayed when no items are found while searching noResultsFound: 'No results found!', // text to be displayed when no items are found while searching
searchPlaceholder: 'Search', // label thats displayed in search input, searchPlaceholder: 'Search', // label thats displayed in search input,
searchOnKey: 'description', // key on which search should be performed this will be selective search. if undefined this will be extensive search on all keys searchOnKey: 'description', // key on which search should be performed this will be selective search. if undefined this will be extensive search on all keys
@ -99,51 +100,45 @@ export class UploadScene implements OnInit {
private artistService: ArtistService, private artistService: ArtistService,
private albumService: AlbumService, private albumService: AlbumService,
private trackService: TrackService, private trackService: TrackService,
private arianeService: ArianeService,
private popInService: PopInService) { private popInService: PopInService) {
// nothing to do. // nothing to do.
} }
updateNeedSend(): boolean { updateNeedSend(): boolean {
if(this.parsedElement.length === 0) { if (this.parsedElement.length === 0) {
this.needSend = false; this.needSend = false;
return; return;
} }
this.needSend = true; this.needSend = true;
for(let iii = 0; iii < this.parsedElement.length; iii++) { for (let iii = 0; iii < this.parsedElement.length; iii++) {
if(isNullOrUndefined(this.parsedElement[iii].title) || this.parsedElement[iii].title === '') { if (isNullOrUndefined(this.parsedElement[iii].title) || this.parsedElement[iii].title === '') {
this.needSend = false; this.needSend = false;
} }
} }
/*
if(isNullOrUndefined(this.genderId)) {
this.needSend = false;
}
*/
return this.needSend; return this.needSend;
} }
ngOnInit() { ngOnInit() {
let self = this; let self = this;
this.listGender = [ { value: null, label: '---' } ]; this.listGender = [{ value: null, label: '---' }];
this.listArtist = [ { value: null, label: '---' } ]; this.listArtist = [{ value: null, label: '---' }];
this.listAlbum = [ { value: null, label: '---' } ]; this.listAlbum = [{ value: null, label: '---' }];
this.artistService.getOrder() this.artistService.getOrder()
.then((response2) => { .then((response2) => {
for(let iii = 0; iii < response2.length; iii++) { for (let iii = 0; iii < response2.length; iii++) {
self.listArtist.push({ value: response2[iii].id, label: response2[iii].name }); self.listArtist.push({ value: response2[iii].id, label: response2[iii].name });
} }
}).catch((response2) => { }).catch((response2) => {
console.log(`get response22 : ${ JSON.stringify(response2, null, 2)}`); console.log(`get response22 : ${JSON.stringify(response2, null, 2)}`);
}); });
this.genderService.getOrder() this.genderService.getOrder()
.then((response2: NodeData[]) => { .then((response2: NodeData[]) => {
//console.error(`Keep gender : ${ JSON.stringify(response2, null, 2)} ==> ${response2.length}`); //console.error(`Keep gender : ${ JSON.stringify(response2, null, 2)} ==> ${response2.length}`);
for(let iii = 0; iii < response2.length; iii++) { for (let iii = 0; iii < response2.length; iii++) {
self.listGender.push({ value: response2[iii].id, label: response2[iii].name }); self.listGender.push({ value: response2[iii].id, label: response2[iii].name });
} }
}).catch((response2) => { }).catch((response2) => {
console.log(`get response22 : ${ JSON.stringify(response2, null, 2)}`); console.log(`get response22 : ${JSON.stringify(response2, null, 2)}`);
}); });
console.log(' END INIT '); console.log(' END INIT ');
} }
@ -151,16 +146,16 @@ export class UploadScene implements OnInit {
onGender(value: any): void { onGender(value: any): void {
this.globalGender = value; this.globalGender = value;
let self = this; let self = this;
if(this.globalGender !== '') { if (this.globalGender !== '') {
this.genderService.getLike(this.globalGender) this.genderService.getLike(this.globalGender)
.then((response: any[]) => { .then((response: any[]) => {
console.log(`find element: ${ response.length}`); console.log(`find element: ${response.length}`);
for(let iii = 0; iii < response.length; iii++) { for (let iii = 0; iii < response.length; iii++) {
console.log(` - ${ JSON.stringify(response[iii])}`); console.log(` - ${JSON.stringify(response[iii])}`);
} }
if(response.length === 0) { if (response.length === 0) {
self.genderId = undefined; self.genderId = undefined;
} else if(response.length === 1) { } else if (response.length === 1) {
self.genderId = response[0].id; self.genderId = response[0].id;
} }
}).catch((response) => { }).catch((response) => {
@ -174,9 +169,9 @@ export class UploadScene implements OnInit {
onChangeGender(value: any): void { onChangeGender(value: any): void {
this.globalGender = value; this.globalGender = value;
if(!isNullOrUndefined(value)) { if (!isNullOrUndefined(value)) {
for(let iii = 0; iii < this.listGender.length; iii++) { for (let iii = 0; iii < this.listGender.length; iii++) {
if(this.listGender[iii].value === value) { if (this.listGender[iii].value === value) {
this.globalGender = this.listGender[iii].label; this.globalGender = this.listGender[iii].label;
break; break;
} }
@ -186,31 +181,31 @@ export class UploadScene implements OnInit {
} }
private updateTheListOfAlbum() { private updateTheListOfAlbum() {
this.listAlbum = [ { value: null, label: '---' } ]; this.listAlbum = [{ value: null, label: '---' }];
if (isNullOrUndefined(this.artistId)) { if (isNullOrUndefined(this.artistId)) {
return; return;
} }
let self = this; let self = this;
this.artistService.getAlbum(this.artistId) this.artistService.getAlbum(this.artistId)
.then((response2) => { .then((response2) => {
for(let iii = 0; iii < response2.length; iii++) { for (let iii = 0; iii < response2.length; iii++) {
self.listAlbum.push({ value: response2[iii].id, label: response2[iii].name }); self.listAlbum.push({ value: response2[iii].id, label: response2[iii].name });
} }
}).catch((response2) => { }).catch((response2) => {
console.log(`get response22 : ${ JSON.stringify(response2, null, 2)}`); console.log(`get response22 : ${JSON.stringify(response2, null, 2)}`);
}); });
} }
onArtist(value: any): void { onArtist(value: any): void {
this.globalArtist = value; this.globalArtist = value;
let self = this; let self = this;
if(this.globalArtist !== '') { if (this.globalArtist !== '') {
console.log(`update artist List Element: ${this.globalArtist}`); console.log(`update artist List Element: ${this.globalArtist}`);
this.artistService.getLike(this.globalArtist) this.artistService.getLike(this.globalArtist)
.then((response: any[]) => { .then((response: any[]) => {
console.log(` ==> find artist like ${this.globalArtist} : ${ JSON.stringify(response, null, 2)}`); console.log(` ==> find artist like ${this.globalArtist} : ${JSON.stringify(response, null, 2)}`);
if(response.length === 0) { if (response.length === 0) {
self.artistId = undefined; self.artistId = undefined;
} else if(response.length === 1) { } else if (response.length === 1) {
self.artistId = response[0].id; self.artistId = response[0].id;
self.updateTheListOfAlbum(); self.updateTheListOfAlbum();
} }
@ -220,7 +215,7 @@ export class UploadScene implements OnInit {
self.updateListOfTrackToCheck(); self.updateListOfTrackToCheck();
} }
}).catch((response) => { }).catch((response) => {
console.log(` ==> CAN NOT find artist like ${this.globalArtist} : ${ response.length}`); console.log(` ==> CAN NOT find artist like ${this.globalArtist} : ${response.length}`);
self.artistId = undefined; self.artistId = undefined;
}); });
} }
@ -228,9 +223,9 @@ export class UploadScene implements OnInit {
} }
onChangeArtist(value: any): void { onChangeArtist(value: any): void {
this.artistId = value; this.artistId = value;
if(!isNullOrUndefined(value)) { if (!isNullOrUndefined(value)) {
for(let iii = 0; iii < this.listArtist.length; iii++) { for (let iii = 0; iii < this.listArtist.length; iii++) {
if(this.listArtist[iii].value === value) { if (this.listArtist[iii].value === value) {
this.globalArtist = this.listArtist[iii].label; this.globalArtist = this.listArtist[iii].label;
break; break;
} }
@ -250,18 +245,19 @@ export class UploadScene implements OnInit {
data.title = value; data.title = value;
this.updateNeedSend(); this.updateNeedSend();
} }
removeElmentFromList(data: FileParsedElement, value: any): void {
for(let iii = 0; iii < this.parsedElement.length; iii++) { removeElementFromList(data: FileParsedElement, value: any): void {
if(this.parsedElement[iii] === data) { for (let iii = 0; iii < this.parsedElement.length; iii++) {
if (this.parsedElement[iii] === data) {
this.parsedElement.splice(iii, 1); this.parsedElement.splice(iii, 1);
break; break;
} }
} }
this.parsedFailedElement.push(new FileFailParsedElement(data.file, 'Removed by user.')); this.parsedFailedElement.push(new FileFailParsedElement(this.parsedFailedElement.length, data.file, 'Removed by user.'));
this.updateNeedSend(); this.updateNeedSend();
} }
onEpisode(data: FileParsedElement, value: any): void { onTrackId(data: FileParsedElement, value: any): void {
data.trackId = value; data.trackId = value;
// console.log("change episode ID: " + value + " ==> " + this.parseEpisode.toString()); // console.log("change episode ID: " + value + " ==> " + this.parseEpisode.toString());
this.updateNeedSend(); this.updateNeedSend();
@ -281,7 +277,7 @@ export class UploadScene implements OnInit {
this.artistId = null; this.artistId = null;
this.albumId = null; this.albumId = null;
//this.listGender = [ { value: null, label: '---' } ]; //this.listGender = [ { value: null, label: '---' } ];
this.listAlbum = [ { value: null, label: '---' } ]; this.listAlbum = [{ value: null, label: '---' }];
} }
addFileWithMetaData(file: File) { addFileWithMetaData(file: File) {
@ -291,38 +287,38 @@ export class UploadScene implements OnInit {
let trackIdNumber: number | null = undefined; let trackIdNumber: number | null = undefined;
let title: string = ''; let title: string = '';
console.log(`select file ${ file.name}`); console.log(`select file ${file.name}`);
let tmpName = file.name.replace(/[ \t]*-[ \t]*/g, '-'); let tmpName = file.name.replace(/[ \t]*-[ \t]*/g, '-');
//tmpName = tmpName.replace(/_/g, '-'); //tmpName = tmpName.replace(/_/g, '-');
//tmpName = tmpName.replace(/--/g, '-'); //tmpName = tmpName.replace(/--/g, '-');
console.log(`select file ${ tmpName}`); console.log(`select file ${tmpName}`);
const splitElement = tmpName.split('~'); const splitElement = tmpName.split('~');
if(splitElement.length > 1) { if (splitElement.length > 1) {
artist = splitElement[0]; artist = splitElement[0];
tmpName = tmpName.substring(artist.length+1); tmpName = tmpName.substring(artist.length + 1);
} }
const splitElement2 = tmpName.split('\#'); const splitElement2 = tmpName.split('\#');
if(splitElement2.length > 1) { if (splitElement2.length > 1) {
album = splitElement2[0]; album = splitElement2[0];
tmpName = tmpName.substring(album.length+1); tmpName = tmpName.substring(album.length + 1);
} }
//console.log("ploppppp " + tmpName); //console.log("ploppppp " + tmpName);
const splitElement3 = tmpName.split('-'); const splitElement3 = tmpName.split('-');
if(splitElement3.length > 1) { if (splitElement3.length > 1) {
trackIdNumber = parseInt(splitElement3[0], 10); trackIdNumber = parseInt(splitElement3[0], 10);
tmpName = tmpName.substring(splitElement3[0].length+1); tmpName = tmpName.substring(splitElement3[0].length + 1);
} }
//console.log("KKKppppp " + tmpName); //console.log("KKKppppp " + tmpName);
//console.log(" ===> " + splitElement3[0]); //console.log(" ===> " + splitElement3[0]);
title = tmpName; title = tmpName;
if(isNaN(trackIdNumber)) { if (isNaN(trackIdNumber)) {
trackIdNumber = undefined; trackIdNumber = undefined;
} }
// remove extention // remove extention
title = title.replace(new RegExp('\\.(webm|WEBM|Webm)'), ''); title = title.replace(new RegExp('\\.(webm|WEBM|Webm)'), '');
let tmp = new FileParsedElement(file, artist, album, trackIdNumber, title); let tmp = new FileParsedElement(file, artist, album, trackIdNumber, title);
console.log(`==>${ JSON.stringify(tmp)}`); console.log(`==>${JSON.stringify(tmp)}`);
// add it in the list. // add it in the list.
this.parsedElement.push(tmp); this.parsedElement.push(tmp);
} }
@ -333,11 +329,11 @@ export class UploadScene implements OnInit {
onChangeFile(value: any): void { onChangeFile(value: any): void {
this.clearData(); this.clearData();
for(let iii = 0; iii < value.files.length; iii++) { for (let iii = 0; iii < value.files.length; iii++) {
this.addFileWithMetaData(value.files[iii]); this.addFileWithMetaData(value.files[iii]);
} }
// check if all global parameters are generic: // check if all global parameters are generic:
if(this.parsedElement.length === 0) { if (this.parsedElement.length === 0) {
this.updateNeedSend(); this.updateNeedSend();
return; return;
} }
@ -346,7 +342,7 @@ export class UploadScene implements OnInit {
/*for(let iii = 1; iii < this.parsedElement.length; iii++) { /*for(let iii = 1; iii < this.parsedElement.length; iii++) {
console.log(`check gender [${ iii + 1 }/${ this.parsedElement.length }] '${ this.parsedElement[0].gender } !== ${ this.parsedElement[iii].gender }'`); console.log(`check gender [${ iii + 1 }/${ this.parsedElement.length }] '${ this.parsedElement[0].gender } !== ${ this.parsedElement[iii].gender }'`);
if(this.parsedElement[0].gender !== this.parsedElement[iii].gender) { if(this.parsedElement[0].gender !== this.parsedElement[iii].gender) {
this.parsedFailedElement.push(new FileFailParsedElement(this.parsedElement[iii].file, 'Remove from list due to wrong gender value')); this.parsedFailedElement.push(new FileFailParsedElement(this.parsedFailedElement.length, this.parsedElement[iii].file, 'Remove from list due to wrong gender value'));
console.log(`Remove from list (!= playlist) : [${ iii + 1 }/${ this.parsedElement.length }] '${ this.parsedElement[iii].file.name }'`); console.log(`Remove from list (!= playlist) : [${ iii + 1 }/${ this.parsedElement.length }] '${ this.parsedElement[iii].file.name }'`);
this.parsedElement.splice(iii, 1); this.parsedElement.splice(iii, 1);
iii--; iii--;
@ -354,21 +350,21 @@ export class UploadScene implements OnInit {
} }
*/ */
// clean different artist: // clean different artist:
for(let iii = 1; iii < this.parsedElement.length; iii++) { for (let iii = 1; iii < this.parsedElement.length; iii++) {
console.log(`check artist [${ iii + 1 }/${ this.parsedElement.length }] '${ this.parsedElement[0].artist } !== ${ this.parsedElement[iii].artist }'`); console.log(`check artist [${iii + 1}/${this.parsedElement.length}] '${this.parsedElement[0].artist} !== ${this.parsedElement[iii].artist}'`);
if(this.parsedElement[0].artist !== this.parsedElement[iii].artist) { if (this.parsedElement[0].artist !== this.parsedElement[iii].artist) {
this.parsedFailedElement.push(new FileFailParsedElement(this.parsedElement[iii].file, 'Remove from list due to wrong artist value')); this.parsedFailedElement.push(new FileFailParsedElement(this.parsedFailedElement.length, this.parsedElement[iii].file, 'Remove from list due to wrong artist value'));
console.log(`Remove from list (!= artist) : [${ iii + 1 }/${ this.parsedElement.length }] '${ this.parsedElement[iii].file.name }'`); console.log(`Remove from list (!= artist) : [${iii + 1}/${this.parsedElement.length}] '${this.parsedElement[iii].file.name}'`);
this.parsedElement.splice(iii, 1); this.parsedElement.splice(iii, 1);
iii--; iii--;
} }
} }
// clean different album: // clean different album:
for(let iii = 1; iii < this.parsedElement.length; iii++) { for (let iii = 1; iii < this.parsedElement.length; iii++) {
console.log(`check album [${ iii + 1 }/${ this.parsedElement.length }] '${ this.parsedElement[0].album } !== ${ this.parsedElement[iii].album }'`); console.log(`check album [${iii + 1}/${this.parsedElement.length}] '${this.parsedElement[0].album} !== ${this.parsedElement[iii].album}'`);
if(this.parsedElement[0].album !== this.parsedElement[iii].album) { if (this.parsedElement[0].album !== this.parsedElement[iii].album) {
this.parsedFailedElement.push(new FileFailParsedElement(this.parsedElement[iii].file, 'Remove from list due to wrong album value')); this.parsedFailedElement.push(new FileFailParsedElement(this.parsedFailedElement.length, this.parsedElement[iii].file, 'Remove from list due to wrong album value'));
console.log(`Remove from list (!= album) : [${ iii + 1 }/${ this.parsedElement.length }] '${ this.parsedElement[iii].file.name }'`); console.log(`Remove from list (!= album) : [${iii + 1}/${this.parsedElement.length}] '${this.parsedElement[iii].file.name}'`);
this.parsedElement.splice(iii, 1); this.parsedElement.splice(iii, 1);
iii--; iii--;
} }
@ -384,7 +380,7 @@ export class UploadScene implements OnInit {
} }
sendFile(): void { sendFile(): void {
console.log(`Send file requested ... ${ this.parsedElement.length}`); console.log(`Send file requested ... ${this.parsedElement.length}`);
this.upload = new UploadProgress(); this.upload = new UploadProgress();
// display the upload pop-in // display the upload pop-in
this.popInService.open('popin-upload-progress'); this.popInService.open('popin-upload-progress');
@ -395,16 +391,16 @@ export class UploadScene implements OnInit {
let self = this; let self = this;
this.uploadFile(this.parsedElement[id], id, total, () => { this.uploadFile(this.parsedElement[id], id, total, () => {
let id2 = id + 1; let id2 = id + 1;
if(id2 < total) { if (id2 < total) {
self.globalUpLoad(id2, total); self.globalUpLoad(id2, total);
} else { } else {
self.upload.result = 'Media creation done'; self.upload.result = 'Media creation done';
} }
}, (value:string) => { }, (value: string) => {
self.upload.error = `Error in the upload of the data...${ value}`; self.upload.error = `Error in the upload of the data...${value}`;
}); });
} }
uploadFile(elemnent: FileParsedElement, id: number, total: number, sendDone: any, errorOccured: any): void { uploadFile(element: FileParsedElement, id: number, total: number, sendDone: any, errorOccurred: any): void {
let self = this; let self = this;
self.upload.labelMediaTitle = ''; self.upload.labelMediaTitle = '';
@ -415,95 +411,95 @@ export class UploadScene implements OnInit {
} }
*/ */
// add artist // add artist
if(!isNullOrUndefined(self.globalArtist)) { if (!isNullOrUndefined(self.globalArtist)) {
if(self.upload.labelMediaTitle.length !== 0) { if (self.upload.labelMediaTitle.length !== 0) {
self.upload.labelMediaTitle = `${self.upload.labelMediaTitle }:`; self.upload.labelMediaTitle = `${self.upload.labelMediaTitle}:`;
} }
self.upload.labelMediaTitle = self.upload.labelMediaTitle + self.globalArtist; self.upload.labelMediaTitle = self.upload.labelMediaTitle + self.globalArtist;
} }
// add album // add album
if(!isNullOrUndefined(self.globalAlbum) && self.globalAlbum.toString().length !== 0) { if (!isNullOrUndefined(self.globalAlbum) && self.globalAlbum.toString().length !== 0) {
if(self.upload.labelMediaTitle.length !== 0) { if (self.upload.labelMediaTitle.length !== 0) {
self.upload.labelMediaTitle = `${self.upload.labelMediaTitle }-`; self.upload.labelMediaTitle = `${self.upload.labelMediaTitle}-`;
} }
self.upload.labelMediaTitle = `${self.upload.labelMediaTitle }s${ self.globalAlbum.toString()}`; self.upload.labelMediaTitle = `${self.upload.labelMediaTitle}s${self.globalAlbum.toString()}`;
} }
// add episode ID // add episode ID
if(!isNullOrUndefined(elemnent.trackId) && elemnent.trackId.toString().length !== 0) { if (!isNullOrUndefined(element.trackId) && element.trackId.toString().length !== 0) {
if(self.upload.labelMediaTitle.length !== 0) { if (self.upload.labelMediaTitle.length !== 0) {
self.upload.labelMediaTitle = `${self.upload.labelMediaTitle }-`; self.upload.labelMediaTitle = `${self.upload.labelMediaTitle}-`;
} }
self.upload.labelMediaTitle = `${self.upload.labelMediaTitle }e${ elemnent.trackId.toString()}`; self.upload.labelMediaTitle = `${self.upload.labelMediaTitle}e${element.trackId.toString()}`;
} }
// add title // add title
if(self.upload.labelMediaTitle.length !== 0) { if (self.upload.labelMediaTitle.length !== 0) {
self.upload.labelMediaTitle = `${self.upload.labelMediaTitle }-`; self.upload.labelMediaTitle = `${self.upload.labelMediaTitle}-`;
} }
self.upload.labelMediaTitle = `[${ id + 1 }/${ total }]${ self.upload.labelMediaTitle }${elemnent.title}`; self.upload.labelMediaTitle = `[${id + 1}/${total}]${self.upload.labelMediaTitle}${element.title}`;
self.trackService.uploadFile(elemnent.file, self.trackService.uploadFile(element.file,
self.globalGender, self.globalGender,
self.globalArtist, self.globalArtist,
self.globalAlbum, self.globalAlbum,
elemnent.trackId, element.trackId,
elemnent.title, element.title,
(count, totalTmp) => { (count, totalTmp) => {
// console.log("upload : " + count*100/totalTmp); // console.log("upload : " + count*100/totalTmp);
self.upload.mediaSendSize = count; self.upload.mediaSendSize = count;
self.upload.mediaSize = totalTmp; self.upload.mediaSize = totalTmp;
}) })
.then((response) => { .then((response) => {
console.log(`get response of track : ${ JSON.stringify(response, null, 2)}`); console.log(`get response of track : ${JSON.stringify(response, null, 2)}`);
sendDone(); sendDone();
}).catch((response) => { }).catch((response) => {
// self.error = "Can not get the data"; // self.error = "Can not get the data";
console.log('Can not add the data in the system...'); console.log('Can not add the data in the system...');
errorOccured(JSON.stringify(response, null, 2)); errorOccurred(JSON.stringify(response, null, 2));
}); });
} }
public checkSimilarString(valueA:string, valueB:string): boolean { public checkSimilarString(valueA: string, valueB: string): boolean {
let valueAL = valueA.toLowerCase(); let valueAL = valueA.toLowerCase();
let valueBL = valueB.toLowerCase(); let valueBL = valueB.toLowerCase();
valueAL = valueAL.replace(/[ \t\n\r-_#~@]/g, ''); valueAL = valueAL.replace(/[ \t\n\r-_#~@]/g, '');
valueBL = valueBL.replace(/[ \t\n\r-_#~@]/g, ''); valueBL = valueBL.replace(/[ \t\n\r-_#~@]/g, '');
if(valueAL === valueBL) { if (valueAL === valueBL) {
return true; return true;
} }
if(valueAL.startsWith(valueBL)) { if (valueAL.startsWith(valueBL)) {
return true; return true;
} }
if(valueBL.startsWith(valueAL)) { if (valueBL.startsWith(valueAL)) {
return true; return true;
} }
return false; return false;
} }
checkConcordence():void { checkConcordance(): void {
if(isNullOrUndefined(this.parsedElement)) { if (isNullOrUndefined(this.parsedElement)) {
return; return;
} }
// ckear checker // ckear checker
for(let iii = 0; iii < this.parsedElement.length; iii++) { for (let iii = 0; iii < this.parsedElement.length; iii++) {
this.parsedElement[iii].nameDetected = false; this.parsedElement[iii].nameDetected = false;
this.parsedElement[iii].episodeDetected = false; this.parsedElement[iii].trackIdDetected = false;
} }
if(isNullOrUndefined(this.listFileInBdd)) { if (isNullOrUndefined(this.listFileInBdd)) {
return; return;
} }
for(let iii = 0; iii < this.listFileInBdd.length; iii++) { for (let iii = 0; iii < this.listFileInBdd.length; iii++) {
this.listFileInBdd[iii].nameDetected = false; this.listFileInBdd[iii].nameDetected = false;
this.listFileInBdd[iii].episodeDetected = false; this.listFileInBdd[iii].trackIdDetected = false;
} }
for(let iii = 0; iii < this.parsedElement.length; iii++) { for (let iii = 0; iii < this.parsedElement.length; iii++) {
for(let jjj = 0; jjj < this.listFileInBdd.length; jjj++) { for (let jjj = 0; jjj < this.listFileInBdd.length; jjj++) {
if(this.checkSimilarString(this.parsedElement[iii].title, this.listFileInBdd[jjj].name)) { if (this.checkSimilarString(this.parsedElement[iii].title, this.listFileInBdd[jjj].name)) {
this.parsedElement[iii].nameDetected = true; this.parsedElement[iii].nameDetected = true;
this.listFileInBdd[jjj].nameDetected = true; this.listFileInBdd[jjj].nameDetected = true;
} }
if(this.parsedElement[iii].trackId === this.listFileInBdd[jjj].episode) { if (this.parsedElement[iii].trackId === this.listFileInBdd[jjj].episode) {
this.parsedElement[iii].episodeDetected = true; this.parsedElement[iii].trackIdDetected = true;
this.listFileInBdd[jjj].episodeDetected = true; this.listFileInBdd[jjj].trackIdDetected = true;
} }
} }
} }
@ -511,13 +507,13 @@ export class UploadScene implements OnInit {
updateListOfTrackToCheck(): void { updateListOfTrackToCheck(): void {
// No artist ID set ==> nothing to do. // No artist ID set ==> nothing to do.
if(isNullOrUndefined(this.artistId)) { if (isNullOrUndefined(this.artistId)) {
this.listFileInBdd = undefined; this.listFileInBdd = undefined;
return; return;
} }
let self = this; let self = this;
// no album check only the artist files. // no album check only the artist files.
if(isNullOrUndefined(this.globalAlbum)) { if (isNullOrUndefined(this.globalAlbum)) {
console.error(`NO ALBUM ==> check artist ID...`); console.error(`NO ALBUM ==> check artist ID...`);
self.artistService.getAllTracks(self.artistId) self.artistService.getAllTracks(self.artistId)
.then((response: any[]) => { .then((response: any[]) => {
@ -526,7 +522,7 @@ export class UploadScene implements OnInit {
// for (let iii = 0; iii<response.length; iii++) { // for (let iii = 0; iii<response.length; iii++) {
// console.log(" - " + JSON.stringify(response[iii])); // console.log(" - " + JSON.stringify(response[iii]));
// } // }
self.checkConcordence(); self.checkConcordance();
}).catch((response) => { }).catch((response) => {
self.listFileInBdd = undefined; self.listFileInBdd = undefined;
}); });
@ -539,14 +535,14 @@ export class UploadScene implements OnInit {
this.artistService.getAlbum(this.artistId) this.artistService.getAlbum(this.artistId)
.then((response: any[]) => { .then((response: any[]) => {
console.log(`find album: ${JSON.stringify(response, null, 2)}`); console.log(`find album: ${JSON.stringify(response, null, 2)}`);
for(let iii = 0; iii < response.length; iii++) { for (let iii = 0; iii < response.length; iii++) {
// console.log(" - " + JSON.stringify(response[iii]) + 'compare with : ' + JSON.stringify(self.globalAlbum)); // console.log(" - " + JSON.stringify(response[iii]) + 'compare with : ' + JSON.stringify(self.globalAlbum));
if(response[iii].name === `${self.globalAlbum}`) { if (response[iii].name === `${self.globalAlbum}`) {
self.albumId = response[iii].id; self.albumId = response[iii].id;
break; break;
} }
} }
if(isNullOrUndefined(self.albumId)) { if (isNullOrUndefined(self.albumId)) {
return; return;
} }
self.albumService.getTrack(self.albumId) self.albumService.getTrack(self.albumId)
@ -557,7 +553,7 @@ export class UploadScene implements OnInit {
// for (let iii = 0; iii<response2.length; iii++) { // for (let iii = 0; iii<response2.length; iii++) {
// console.log(" - " + JSON.stringify(response2[iii])); // console.log(" - " + JSON.stringify(response2[iii]));
// } // }
self.checkConcordence(); self.checkConcordance();
}).catch((response3) => { }).catch((response3) => {
self.listFileInBdd = undefined; self.listFileInBdd = undefined;
}); });
@ -567,19 +563,19 @@ export class UploadScene implements OnInit {
} }
eventPopUpAlbum(event: string): void { eventPopUpAlbum(event: string): void {
console.log(`GET event: ${ event}`); console.log(`GET event: ${event}`);
this.popInService.close('popin-new-album'); this.popInService.close('popin-new-album');
} }
eventPopUpArtist(event: string): void { eventPopUpArtist(event: string): void {
console.log(`GET event: ${ event}`); console.log(`GET event: ${event}`);
this.popInService.close('popin-new-artist'); this.popInService.close('popin-new-artist');
} }
eventPopUpType(event: string): void { eventPopUpType(event: string): void {
console.log(`GET event: ${ event}`); console.log(`GET event: ${event}`);
this.popInService.close('popin-new-type'); this.popInService.close('popin-new-type');
} }
eventPopUpPlaylist(event: string): void { eventPopUpPlaylist(event: string): void {
console.log(`GET event: ${ event}`); console.log(`GET event: ${event}`);
this.popInService.close('popin-new-playlist'); this.popInService.close('popin-new-playlist');
} }

@ -1 +1 @@
Subproject commit 39b97f7c06e793ae05b6bad94d111adb878c9b7e Subproject commit 147a955b195eb7c90e445d404f043d9a363087ca

View File

@ -1,66 +0,0 @@
/**
* This file includes polyfills needed by Angular and is loaded before the app.
* You can add your own extra polyfills to this file.
*
* This file is divided into 2 sections:
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
* file.
*
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
*
* Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
*/
/***************************************************************************************************
* BROWSER POLYFILLS
*/
/** IE9, IE10 and IE11 requires all of the following polyfills. **/
// import 'core-js/es6/symbol';
// import 'core-js/es6/object';
// import 'core-js/es6/function';
// import 'core-js/es6/parse-int';
// import 'core-js/es6/parse-float';
// import 'core-js/es6/number';
// import 'core-js/es6/math';
// import 'core-js/es6/string';
// import 'core-js/es6/date';
// import 'core-js/es6/array';
// import 'core-js/es6/regexp';
// import 'core-js/es6/map';
// import 'core-js/es6/weak-map';
// import 'core-js/es6/set';
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`.
/** IE10 and IE11 requires the following for the Reflect API. */
// import 'core-js/es6/reflect';
//import 'babel-polyfill';
/** Evergreen browsers require these. **/
// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
//import 'core-js/es7/reflect';
/**
* Required to support Web Animations `@angular/platform-browser/animations`.
* Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation
**/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js/dist/zone'; // Included with Angular CLI.
/***************************************************************************************************
* APPLICATION IMPORTS
*/