Skip to content

Commit

Permalink
#37 and LUSHDigital/lrpi_player#137 - error message is now displayed …
Browse files Browse the repository at this point in the history
…instead of an infinitely spinning wheel
  • Loading branch information
InBrewJ committed Dec 16, 2019
1 parent 6ae412d commit bc7dd68
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
9 changes: 7 additions & 2 deletions src/app/app.component.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ html {
font-size: 140%;
}

.pair-button:hover {
cursor: pointer;
.pair-button:hover, .home-button:hover {
cursor: pointer;
}

p.slave-prompt {
Expand All @@ -21,4 +21,9 @@ p.slave-prompt {
.pair-button button {
margin-left: 0.3em;
font-size: 110%;
}

.home-button {
float: right;
padding-right: 1em;
}
1 change: 0 additions & 1 deletion src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@
<p class="slave-prompt">
<i>(its IP address is {{masterIp}})</i>
</p>

</ng-template>
4 changes: 3 additions & 1 deletion src/app/pages/track-selector/track-selector.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ export class TrackSelectorComponent implements OnInit {
console.log('In the playlist processor');

let data: any = d;
this.loading = false;

console.log('tracks: ', data, ' length: ', data.length);

Expand All @@ -98,6 +97,7 @@ export class TrackSelectorComponent implements OnInit {

if (data.length === undefined) {
this.errorResponse['message'] = 'Syncing may not have completed yet. Alternatively, is the usb stick plugged in?'
this.loading = false;
this.serverData = null;
return;
}
Expand All @@ -122,6 +122,7 @@ export class TrackSelectorComponent implements OnInit {
}

console.log('playlist? : ', isPlaylist);
this.loading = false;

this.serverData = of(
data
Expand All @@ -131,6 +132,7 @@ export class TrackSelectorComponent implements OnInit {
(err: any) => {
console.log('error', err);
this.errorResponse = err;
this.loading = false;
this.errorResponse['message'] = 'Something is wrong...'
this.router.navigate([`/tracks`]);
}
Expand Down

0 comments on commit bc7dd68

Please sign in to comment.