Skip to content

Commit 5731360

Browse files
committed
improve UX
1 parent c10a88a commit 5731360

File tree

3 files changed

+29
-7
lines changed

3 files changed

+29
-7
lines changed

app/app.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@ import {YouTubeService} from "./services/youtube.service";
2525
always be consistent and up to date.
2626
</p>
2727
<p class="state">{{ state | json }}</p>
28-
<p class="state" *ngIf="disableSearch">O</p>
28+
<p class="state" *ngIf="disableSearch">state is empty</p>
29+
<h2 *ngIf="!disableSearch">Search results:</h2>
2930
</div>
30-
<h2 *ngIf="!disableSearch">Search results:</h2>
3131
<h2 *ngIf="disableSearch || searchResults.length == 0">No results</h2>
3232
<div class="row col-md-8">
3333
<div *ngFor="let result of searchResults" class="thumbnail col-sm-6 col-md-4">
3434
<div class="caption">
3535
<h3>{{ result.title }}</h3>
3636
</div>
37-
<!--<img src="{{ result.thumbnailUrl }}" />-->
37+
<img src="{{ result.thumbnailUrl }}" />
3838
</div>
3939
</div>
4040
</section>

app/components/proximity-selector.component.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,22 @@ import {Store} from '@ngrx/store';
55
selector: 'proximity-selector',
66
template: `
77
<div class="input-group">
8-
<label for="useLocation">Use current location</label>
9-
<input type="checkbox"
8+
<label for="useLocation"
9+
[ngClass]="{'disabled': disabled}">
10+
Use current location
11+
</label>
12+
<input type="checkbox"
13+
id="useLocation"
1014
[disabled]="disabled"
1115
(change)="onLocation($event)">
1216
</div>
1317
<div class="input-group">
14-
<label for="locationRadius">Radius</label>
18+
<label for="locationRadius"
19+
[ngClass]="{'disabled': !active || disabled}">
20+
Radius
21+
</label>
1522
<input type="range" min="1" max="100" value="50"
23+
id="locationRadius"
1624
[disabled]="!active || disabled"
1725
(change)="onRadius($event)">
1826
</div>

app/styles.css

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* Master Styles */
21
h1 {
32
color: #369;
43
font-family: Arial, Helvetica, sans-serif;
@@ -12,3 +11,18 @@ h2, h3 {
1211
body {
1312
margin: 2em;
1413
}
14+
search-box, proximity-selector {
15+
display: block;
16+
margin-top: 1.2rem;
17+
}
18+
.state {
19+
font-family: monospace;
20+
font-size: smaller;
21+
}
22+
.row {
23+
margin-bottom: 1.6rem;
24+
margin-top: 1.6rem;
25+
}
26+
label.disabled {
27+
color: darkgray;
28+
}

0 commit comments

Comments
 (0)