Skip to content

Commit 3a949f9

Browse files
committed
Added personalized image, playlist audio features
1 parent 2f4c1b3 commit 3a949f9

File tree

7 files changed

+1025
-493
lines changed

7 files changed

+1025
-493
lines changed

application/src/app/components/analysis/analysis.component.html

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,25 @@ <h2>Want More?</h2>
108108
<a (click)="analysisLogin()"><button class="mob-top-pad btn clr-wgreen">Login With Spotify</button></a>
109109
</div>
110110
</div>
111+
<div class="mob-pad fade-in-up options-pad login-pad" *ngIf="token!=''&&token!=null&&artists.length>5&&genres.length>1&&tracks.length>5">
112+
<div class="scaled-div">
113+
<div class="custom-scaled">
114+
<canvas #toSave id="toSave" class="custom-image-div" width="800px" height="800px"></canvas>
115+
</div>
116+
</div>
117+
<div class="login-right">
118+
<h2>Share your music</h2>
119+
<p>Your top songs span <strong>{{ artistSpan }}</strong> artists and <strong>{{genres.length}}</strong> genres, with your favourite genre being <strong>{{ genres[0][0]=='pop' ? capitalize(genres[1][0]):capitalize(genres[0][0]) }}</strong> </p>
120+
<button (click)="saveImage()" class="mob-top-pad btn clr-wgreen">Save Image</button>
121+
</div>
122+
</div>
123+
<!--IMAGE TO SAVE-->
124+
<div class="custom-image-div">
125+
<div #radarDraw class="colorizer red-purple">
126+
<img id="custom-user-image" src="{{artists[0].images[1].url}}" *ngIf="artists.length > 0 && tracks.length > 0 && genres.length > 0">
127+
<app-radar-chart [inputId]="'custom-image-chart'" [data]="personalChart" [config]="imageConfig" [changed]="changed" [graphClr]="'#000000'" (onDone)="generateImage()"></app-radar-chart>
128+
</div>
129+
</div>
111130
<div class="fav-container" *ngIf="token!=''&&token!=null">
112131
<div class="track-container">
113132
<h1 class="fav-sub-heading">Tracks</h1>
@@ -140,7 +159,6 @@ <h3>Popularity</h3>
140159
</div>
141160
<div class="artist-container">
142161
<h1>Genres</h1>
143-
<p *ngIf="genres.length > 1">Your music spans over {{genres.length}} genres. </p>
144162
<div class="genre-card" *ngFor="let g of genres.slice(0,8)">
145163
<h3>{{ capitalize(g[0]) }}</h3>
146164
</div>

0 commit comments

Comments
 (0)