diff --git a/front/src/app/app.module.ts b/front/src/app/app.module.ts index 3cbf818..8e23151 100644 --- a/front/src/app/app.module.ts +++ b/front/src/app/app.module.ts @@ -22,7 +22,7 @@ import { } from './scene'; import { GenderService, DataService, PlaylistService, ArtistService, AlbumService, TrackService, ArianeService, PlayerService } from './service'; import { UploadScene } from './scene/upload/upload'; -import { ElementSeriesComponent, ElementTrackComponent, ElementSeasonComponent, ElementVideoComponent, ElementPlayerAudioComponent } from './component'; +import { ElementSeriesComponent, ElementTrackComponent, ElementSeasonComponent, ElementVideoComponent, ElementPlayerAudioComponent, DescriptionAreaComponent } from './component'; import { common_module_declarations, common_module_imports, common_module_providers, common_module_exports } from 'common/module'; @NgModule({ @@ -35,6 +35,7 @@ import { common_module_declarations, common_module_imports, common_module_provid ElementSeasonComponent, ElementVideoComponent, ElementPlayerAudioComponent, + DescriptionAreaComponent, PopInCreateType, HomeScene, diff --git a/front/src/app/component/description-area/description-area.html b/front/src/app/component/description-area/description-area.html new file mode 100644 index 0000000..81f6e62 --- /dev/null +++ b/front/src/app/component/description-area/description-area.html @@ -0,0 +1,42 @@ +
+
+ @if(title) { +
+ {{title}} +
+ } + @if(name) { +
+ {{name}} +
+ } + @if(description) { +
+ {{description}} +
+ } +
+ + +
+
+
+ @if (cover1 && cover1.length > 0) { +
+
+ +
+
+ } + @if (cover2 && cover2.length > 0) { +
+
+ +
+
+ } +
\ No newline at end of file diff --git a/front/src/app/component/description-area/description-area.less b/front/src/app/component/description-area/description-area.less new file mode 100644 index 0000000..e69de29 diff --git a/front/src/app/component/description-area/description-area.ts b/front/src/app/component/description-area/description-area.ts new file mode 100644 index 0000000..0f8abab --- /dev/null +++ b/front/src/app/component/description-area/description-area.ts @@ -0,0 +1,34 @@ +/** @file + * @author Edouard DUPIN + * @copyright 2018, Edouard DUPIN, all right reserved + * @license PROPRIETARY (see license file) + */ +import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; +import { isArrayOf, isNullOrUndefined, isNumberFinite } from 'common/utils'; +import { NodeData } from 'common/model'; + +import { GenderService, DataService } from 'app/service'; + +@Component({ + selector: 'description-area', + templateUrl: './description-area.html', + styleUrls: ['./description-area.less'] +}) +export class DescriptionAreaComponent { + @Input() title: string; + @Input() name?: string; + @Input() description?: string; + @Input() cover1?: number[]; + @Input() cover2?: number[]; + + @Output() play = new EventEmitter(); + @Output() shuffle = new EventEmitter(); + + playShuffle(event: any): void { + this.shuffle.emit(); + } + + playAll(event: any): void { + this.play.emit(); + } +} diff --git a/front/src/app/component/element-player-audio/element-player-audio.html b/front/src/app/component/element-player-audio/element-player-audio.html index 9d5439c..f4babbc 100644 --- a/front/src/app/component/element-player-audio/element-player-audio.html +++ b/front/src/app/component/element-player-audio/element-player-audio.html @@ -1,45 +1,52 @@ -
- -
-
-
- -
-
- -
-
- -
-
- - -
-
- - - -
- - - - -
- +@if(mediaSource) { +
+ +
+
+
+ +
+
+ +
+
+ +
+
+ + +
+
+ @if(!isPlaying) { + + } + @else { + + } + +
+ + + + +
+ +
-
\ No newline at end of file +
+} \ No newline at end of file diff --git a/front/src/app/component/element-season/element-season.html b/front/src/app/component/element-season/element-season.html index 2ea5831..68352cd 100644 --- a/front/src/app/component/element-season/element-season.html +++ b/front/src/app/component/element-season/element-season.html @@ -1,41 +1,45 @@
-
- - -
-
- -
+ @if(covers && covers.length > 0) { +
+ +
+ } + @else { +
+ }
{{prefixName}} {{numberAlbum}}
-
- No {{countSubType}} -
-
- {{count}} {{countSubType}}s -
-
- {{count}} {{countSubType}} -
+@if(countSubType) { +
+ @if(!count || count == 0) { + No {{countSubType}} + } + @else { + {{count}} {{countSubType}}{{count>1?"s":""}} + } +
+} -
- No {{countSubType2}} -
-
- {{count2}} {{countSubType2}}s -
-
- {{count2}} {{countSubType2}} -
- -
- {{subValues}}: {{subValueData}} -
- - -
- {{description}} -
+@if(countSubType2) { +
+ @if(!count2 || count2 == 0) { + No {{countSubType2}} + } + @else { + {{count2}} {{countSubType2}}{{count2>1?"s":""}} + } +
+} +@if(subValueData) { +
+ {{subValues}}: {{subValueData}} +
+} +@if(!description) { +
+ {{description}} +
+} diff --git a/front/src/app/component/element-series/element-series.html b/front/src/app/component/element-series/element-series.html index 038ddd6..557d0b0 100644 --- a/front/src/app/component/element-series/element-series.html +++ b/front/src/app/component/element-series/element-series.html @@ -1,17 +1,21 @@
-
- {{counttrack}} -
+ @if(counttrack) { +
+ {{counttrack}} +
+ }
-
- - -
-
- -
+ @if(covers && covers.length > 0) { +
+ + +
+ } + @else { +
+ }
{{name}} diff --git a/front/src/app/component/element-type/element-type.html b/front/src/app/component/element-type/element-type.html index 5fa63f2..ebc4865 100644 --- a/front/src/app/component/element-type/element-type.html +++ b/front/src/app/component/element-type/element-type.html @@ -3,9 +3,11 @@ {{counttrack}}
-
- -
+ @if(covers && covers.length > 0) { +
+ +
+ }
{{name}} diff --git a/front/src/app/component/element-video/element-video.html b/front/src/app/component/element-video/element-video.html index 3af2cf2..f1cd526 100644 --- a/front/src/app/component/element-video/element-video.html +++ b/front/src/app/component/element-video/element-video.html @@ -1,12 +1,14 @@
-
- - -
-
- -
+ @if(covers && covers.length > 0) { +
+ + +
+ } + @else { +
+ }
{{episodeDisplay}} {{name}} diff --git a/front/src/app/component/index.ts b/front/src/app/component/index.ts index 13078b3..99fbb8b 100644 --- a/front/src/app/component/index.ts +++ b/front/src/app/component/index.ts @@ -1,3 +1,4 @@ +import { DescriptionAreaComponent } from "./description-area/description-area"; import { ElementPlayerAudioComponent } from "./element-player-audio/element-player-audio"; import { ElementSeasonComponent } from "./element-season/element-season"; import { ElementSeriesComponent } from "./element-series/element-series"; @@ -12,5 +13,6 @@ export { ElementSeasonComponent, ElementPlayerAudioComponent, ElementTrackComponent, + DescriptionAreaComponent, }; diff --git a/front/src/app/scene/album/album.html b/front/src/app/scene/album/album.html index 5a18ab0..0355fb4 100644 --- a/front/src/app/scene/album/album.html +++ b/front/src/app/scene/album/album.html @@ -1,49 +1,22 @@
-
-
-
- {{name}} -
-
- {{albumName}} -
-
- {{albumDescription}} -
-
- - -
-
- @if (artistCovers) { -
-
- -
-
- } - @if (albumCovers) { -
-
- -
-
- } -
+ + @if (tracks) {
-
Tracks:
-
Track:
+
Track{{tracks.length > 1?"s":""}}:
@for (data of tracks; track data.id;) { + (auxclick)="onSelectTrack($event, data.id)"/> } @empty { Aucune piste accessible. } diff --git a/front/src/app/scene/album/album.ts b/front/src/app/scene/album/album.ts index 18996b6..a90dd72 100644 --- a/front/src/app/scene/album/album.ts +++ b/front/src/app/scene/album/album.ts @@ -108,7 +108,7 @@ export class AlbumScene implements OnInit { this.arianeService.navigateTrackEdit({ id: idSelected, newWindows: event.which === 2 }); } } - playAll(event: any): void { + playAll(): void { let elements: number[] = []; for (let iii = 0; iii < this.tracks.length; iii++) { elements.push(this.tracks[iii].id); @@ -116,7 +116,7 @@ export class AlbumScene implements OnInit { this.playerService.clear(); this.playerService.setNewPlaylist(elements); } - playShuffle(event: any): void { + playShuffle(): void { let elements: number[] = []; for (let iii = 0; iii < this.tracks.length; iii++) { elements.push(this.tracks[iii].id); diff --git a/front/src/app/scene/album/albums.html b/front/src/app/scene/album/albums.html index e9ecb7e..f48cea1 100644 --- a/front/src/app/scene/album/albums.html +++ b/front/src/app/scene/album/albums.html @@ -1,30 +1,13 @@
-
-
-
- {{name}} -
-
- {{description}} -
-
- - -
-
-
-
- -
-
-
+
-
Albums:
+
Album{{albums.length > 1?"s":""}}:
+ [subValuesCallBack]="getArtistsString"/>
-
-
-
Tracks:
-
Track:
-
- + @if(tracks) { +
+
+
Track{{tracks.length > 1?"s":""}}:
+ @for (data of tracks; track data.id;) { +
+ +
+ }
-
+ }
\ No newline at end of file diff --git a/front/src/app/scene/album/albums.ts b/front/src/app/scene/album/albums.ts index 72a1afa..d4aac6e 100644 --- a/front/src/app/scene/album/albums.ts +++ b/front/src/app/scene/album/albums.ts @@ -45,9 +45,9 @@ export class AlbumsScene implements OnInit { return this.albumService.getArtists(albumId); } ngOnInit() { + const self = this; this.getArtistsString = (id: number) => { return self.getArtistsStringCallback(id); }; this.countTrack = (id: number) => { return self.countTrackCallback(id); }; - let self = this; self.name = "All Albums"; self.description = "View all albums (no specific artist)"; @@ -94,7 +94,7 @@ export class AlbumsScene implements OnInit { this.arianeService.navigateTrack({ trackId: idSelected, newWindows: event.which === 2 }); } } - playAll(event: any): void { + playAll(): void { this.playerService.clear(); let self = this; this.trackService.getData() @@ -109,7 +109,7 @@ export class AlbumsScene implements OnInit { console.log(`error to get list o ftrack ...`) }); } - playShuffle(event: any): void { + playShuffle(): void { this.playerService.clear(); let self = this; this.trackService.getData() diff --git a/front/src/app/scene/artist/artist-album.html b/front/src/app/scene/artist/artist-album.html index 0a464fa..91202c5 100644 --- a/front/src/app/scene/artist/artist-album.html +++ b/front/src/app/scene/artist/artist-album.html @@ -1,44 +1,23 @@
-
-
-
- {{name}} -
-
- {{albumName}} -
-
- {{albumDescription}} -
-
- - -
-
-
-
- -
-
-
-
- -
-
-
+
-
Tracks:
-
Track:
- +
Track{{tracks.length > 1?"s":""}}:
+ @for (data of tracks; track data.id;) { + + } @empty { + Aucune piste accessible. + }
\ No newline at end of file diff --git a/front/src/app/scene/artist/artist-album.ts b/front/src/app/scene/artist/artist-album.ts index 6a2425d..9f1063e 100644 --- a/front/src/app/scene/artist/artist-album.ts +++ b/front/src/app/scene/artist/artist-album.ts @@ -99,7 +99,7 @@ export class ArtistAlbumScene implements OnInit { this.arianeService.navigateTrackEdit({ id: idSelected, newWindows: event.which === 2 }); } } - playAll(event: any): void { + playAll(): void { let elements: number[] = []; for (let iii = 0; iii < this.tracks.length; iii++) { elements.push(this.tracks[iii].id); @@ -107,7 +107,7 @@ export class ArtistAlbumScene implements OnInit { this.playerService.clear(); this.playerService.setNewPlaylist(elements); } - playShuffle(event: any): void { + playShuffle(): void { let elements: number[] = []; for (let iii = 0; iii < this.tracks.length; iii++) { elements.push(this.tracks[iii].id); diff --git a/front/src/app/scene/artist/artist.html b/front/src/app/scene/artist/artist.html index 66558d4..8293c61 100644 --- a/front/src/app/scene/artist/artist.html +++ b/front/src/app/scene/artist/artist.html @@ -1,48 +1,33 @@
-
-
-
- {{name}} -
-
- {{description}} -
-
- - + + @if(albums) { +
+
+
Album{{albums.length > 1?"s":""}}:
+
+
-
-
- + } + @if(tracks) { +
+
+
Track{{tracks.length > 1?"s":""}}:
+
+
-
-
-
-
Albums:
-
Album:
-
- -
-
-
-
-
Tracks:
-
Track:
-
- -
-
+ }
\ No newline at end of file diff --git a/front/src/app/scene/artist/artist.ts b/front/src/app/scene/artist/artist.ts index 1ad7365..edba1bf 100644 --- a/front/src/app/scene/artist/artist.ts +++ b/front/src/app/scene/artist/artist.ts @@ -100,7 +100,7 @@ export class ArtistScene implements OnInit { return this.albumService.getAllTracksForAlbums(elements); } - playAll(event: any): void { + playAll(): void { this.playerService.clear(); let self = this; this.getAllTracksIds() @@ -111,7 +111,7 @@ export class ArtistScene implements OnInit { console.log(`error to get list o ftrack ...`) }); } - playShuffle(event: any): void { + playShuffle(): void { this.playerService.clear(); let self = this; this.getAllTracksIds() diff --git a/front/src/app/scene/artist/artists.html b/front/src/app/scene/artist/artists.html index e460d94..9740155 100644 --- a/front/src/app/scene/artist/artists.html +++ b/front/src/app/scene/artist/artists.html @@ -1,39 +1,24 @@
-
-
-
- {{name}} -
-
- {{description}} -
-
- - -
-
-
-
- -
-
-
+
-
Artists:
-
- -
+
Artist{{artists.length > 1?"s":""}}:
+ @for (data of artists; track data.id;) { +
+ +
+ }
\ No newline at end of file diff --git a/front/src/app/scene/artist/artists.ts b/front/src/app/scene/artist/artists.ts index 13e3ca4..47672b9 100644 --- a/front/src/app/scene/artist/artists.ts +++ b/front/src/app/scene/artist/artists.ts @@ -71,7 +71,7 @@ export class ArtistsScene implements OnInit { countAlbumCallback(artistId: number): Promise { return this.artistService.countAlbum(artistId); } - playAll(event: any): void { + playAll(): void { this.playerService.clear(); let self = this; this.trackService.getData() @@ -86,7 +86,7 @@ export class ArtistsScene implements OnInit { console.log(`error to get list o ftrack ...`) }); } - playShuffle(event: any): void { + playShuffle(): void { this.playerService.clear(); let self = this; this.trackService.getData() diff --git a/front/src/app/scene/gender/gender.html b/front/src/app/scene/gender/gender.html index ef43f57..b635be2 100644 --- a/front/src/app/scene/gender/gender.html +++ b/front/src/app/scene/gender/gender.html @@ -1,9 +1,11 @@
-
- -
+ @if (cover != null) { +
+ +
+ }
@@ -16,15 +18,19 @@
-
- -
+ @for (data of artists; track data.id;) { +
+ +
+ }
-
- -
+ @for (data of tracks; track data.id;) { +
+ +
+ }
diff --git a/front/src/app/scene/home/home.html b/front/src/app/scene/home/home.html index c4f6a9d..553da3f 100644 --- a/front/src/app/scene/home/home.html +++ b/front/src/app/scene/home/home.html @@ -3,9 +3,11 @@ Karusic
-
- -
+ @for (data of dataList; track data.id) { +
+ +
+ }
\ No newline at end of file diff --git a/front/src/app/scene/playlist/playlist.html b/front/src/app/scene/playlist/playlist.html index 51ed296..0fa4970 100644 --- a/front/src/app/scene/playlist/playlist.html +++ b/front/src/app/scene/playlist/playlist.html @@ -1,8 +1,10 @@
-
- -
+ @for (data of tracks; track data.id) { +
+ +
+ }
\ No newline at end of file diff --git a/front/src/app/scene/track/track.html b/front/src/app/scene/track/track.html index 0d14d94..4263721 100644 --- a/front/src/app/scene/track/track.html +++ b/front/src/app/scene/track/track.html @@ -12,122 +12,156 @@ Please wait.
- -
-
- {{name}} -
-
-
-
- + @if(!mediaIsNotFound && !mediaIsLoading && !playTrack) { +
+
+ {{name}} +
+
+
+ @if (covers && covers.length > 0) { +
+ +
+ } + @else { +
+ } +
+ +
-
-
- +
+ } + @if (havePrevious !== null) { +
+ +
+ } +
+
+ @if (artistName!=null) { +
+ Artist: {{artistName}} +
+ } + @if (albumName!=null) { +
+ Album: {{albumName}} +
+ } + @if (episode!=null) { +
+ Episode: {{episode}} +
+ } +
+ generatedName: {{generatedName}} +
+
+ {{description}} +
+
+ } + @if (playTrack) { +
+
+
+ +
+ @if (!displayNeedHide || !isPlaying) { +
+ @if (!isPlaying) { + + } + @else { + + } + +
+
+ +
+
+ +
+
+ + + + + + @if (!isFullScreen) { + + } + @else { + + } + + + @if (!isPlaying) { + + + + } +
+ } + +
+ {{generatedName}} +
+
+
-
-
- -
-
- -
-
-
-
- Artist: {{artistName}} -
-
- Album: {{albumName}} -
-
- Episode: {{episode}} -
-
- generatedName: {{generatedName}} -
-
- {{description}} -
-
-
-
-
- -
-
- - - -
-
- + @if (displayVolumeMenu && (!displayNeedHide || !isPlaying)) { +
+
+
+ +
+ @if (!trackPlayer.muted) { + + } + @else { + + } +
-
- -
-
- - - - - - - - - - - - - -
- -
- {{generatedName}} -
-
- -
-
-
-
- -
- - -
+ }
-
+ }
\ No newline at end of file diff --git a/front/src/app/scene/upload/upload.html b/front/src/app/scene/upload/upload.html index eda4295..26c466c 100644 --- a/front/src/app/scene/upload/upload.html +++ b/front/src/app/scene/upload/upload.html @@ -32,207 +32,212 @@
- -
- Meta-data: -
+ @if(parsedElement.length !== 0) { +
+ Meta-data: +
+ }

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Gender: - -
- - - -
Artist: - -
- - - -
Album: - -
- - - -
-
-
-
- - + @if(parsedElement.length !== 0) { +
+
+
+ - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Track ID:Title:
- - - +
Gender: + +
+ + + + +
Artist: + +
+ + + +
Album: + +
+ + + +
+
+
+
+ + + + + + + + + + + + + + + - - - -
Track ID:Title:
+ - - ^^^This title already exist !!! - - - -
+ + + + + ^^^This title already exist !!! + + + + + + + + +
+
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + +
Track ID:Title:
{{data.episode}}{{data.name}}
+
-
-
- -
-
-
- - + } + @if(parsedElement.length !== 0) { +
+
+
+ - - - - - - - - - - - - - - - -
Track ID:Title:
{{data.episode}}{{data.name}}
+ + + + + + Rejected: + + {{data.file.name}}
==> {{data.reason}} + + + + +
-
-
-
- - - - - - - - - - - - -
Rejected: - {{data.file.name}}
==> {{data.reason}} -
-
-
+ }