-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from lrdiv/signup-flow
UI and UX improvements for initial signup
- Loading branch information
Showing
13 changed files
with
107 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 40 additions & 35 deletions
75
apps/spin-cycle-client/src/app/history/history.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,44 @@ | ||
<div class="container"> | ||
<h1 class="margin-bottom">History</h1> | ||
@if (spinsLoaded()) { | ||
@if (loadedSpins()) { | ||
<table> | ||
<thead> | ||
<tr> | ||
<td>Date</td> | ||
<td>Artist(s)</td> | ||
<td>Album</td> | ||
<td>Played</td> | ||
@if (spinsCount() === 0) { | ||
<div class="alert margin-bottom"> | ||
If you haven't received any recommendations, check the email address entered in the | ||
<a [routerLink]="['/settings']">Settings</a> page. | ||
</div> | ||
} | ||
|
||
<h1 class="margin-bottom">History</h1> | ||
@if (spinsLoaded()) { | ||
@if (loadedSpins()) { | ||
<table> | ||
<thead> | ||
<tr> | ||
<td>Date</td> | ||
<td>Artist(s)</td> | ||
<td>Album</td> | ||
<td>Played</td> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
@for (spin of spins(); track spin.id) { | ||
<tr [class.text-gray-300]="!spin.played"> | ||
<td>{{ spin.createdAt | date }}</td> | ||
<td>{{ spin.artistName }}</td> | ||
<td> | ||
<a [href]="'https://discogs.com/release/' + spin.discogsId" target="_blank">{{ spin.recordName }}</a> | ||
</td> | ||
<td> | ||
<button (click)="updatePlayed(spin)"> | ||
{{ spin.played ? "I didn't play this" : 'I played this' }} | ||
</button> | ||
</td> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
@for (spin of spins(); track spin.id) { | ||
<tr [class.text-gray-300]="!spin.played"> | ||
<td>{{ spin.createdAt | date }}</td> | ||
<td>{{ spin.artistName }}</td> | ||
<td> | ||
<a [href]="'https://discogs.com/release/' + spin.discogsId" target="_blank">{{ spin.recordName }}</a> | ||
</td> | ||
<td> | ||
<button (click)="updatePlayed(spin)"> | ||
{{ spin.played ? "I didn't play this" : 'I played this' }} | ||
</button> | ||
</td> | ||
</tr> | ||
} | ||
</tbody> | ||
</table> | ||
} | ||
</tbody> | ||
</table> | ||
|
||
@if (hasMorePages()) { | ||
<button (click)="getNextPage()">Load More</button> | ||
} @else { | ||
<h3 class="margin-top">No spins yet! Maybe tomorrow 🤞</h3> | ||
} | ||
@if (hasMorePages()) { | ||
<button (click)="getNextPage()">Load More</button> | ||
} | ||
} @else { | ||
<h3 class="margin-top">No spins yet! Maybe tomorrow 🤞</h3> | ||
} | ||
</div> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<h1 class="margin-bottom">Welcome to Spin Cycle</h1> | ||
|
||
<h2 class="margin-top margin-bottom">What is Spin Cycle?</h2> | ||
<p class="margin-bottom"> | ||
Spin Cycle is a simple service that sends you a daily email at 9am (Central) recommending a random album from your | ||
<a href="https://discogs.com" target="_blank">Discogs</a> collection. | ||
</p> | ||
<p> | ||
We make sure to never recommend the same record twice, allowing you to listen to your entire collection, one day at a | ||
time. You can also mark a recommendation as "Not Played" to add it back into the mix for future recommendations. | ||
</p> | ||
|
||
<h2 class="margin-top margin-bottom">How Do I Join?</h2> | ||
<ol> | ||
<li><a [href]="authUrl">Login via Discogs</a></li> | ||
<li>Tell us your email address, so we can send your recommendations</li> | ||
<li>That's it! You'll get a daily email with a record from your collection</li> | ||
</ol> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Component, inject } from '@angular/core'; | ||
|
||
import { AuthService } from './auth/auth.service'; | ||
|
||
@Component({ | ||
selector: 'sc-welcome', | ||
templateUrl: './welcome.component.html', | ||
}) | ||
export class WelcomeComponent { | ||
private readonly authService: AuthService = inject(AuthService); | ||
|
||
public readonly authUrl: string = this.authService.authUrl; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.alert { | ||
background-color: var(--color_background--element); | ||
padding: 10px; | ||
width: 100%; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters