-
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.
Added grid animation; Added config api;
- Loading branch information
Showing
29 changed files
with
439 additions
and
115 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
config.json | ||
RadioWatch.sln | ||
global.json | ||
.vs/** | ||
.gitattributes | ||
|
35 changes: 35 additions & 0 deletions
35
src/RadioWatch/ClientApp/app/actions/app-config-actions.ts
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,35 @@ | ||
import { Injectable } from '@angular/core'; | ||
import { IAppState } from '../store'; | ||
import { NgRedux } from 'ng2-redux'; | ||
import { List } from 'immutable'; | ||
import { ApiService } from '../services' | ||
import { Observable, Subscription, Subject } from 'rxjs'; | ||
|
||
export const APP_CONFIG_ACTIONS = { | ||
YOUTUBE_TOKEN_RECEIVED: "YOUTUBE_TOKEN_RECEIVED", | ||
YOUTUBE_TOKEN_NOT_RECEIVED: "YOUTUBE_TOKEN_NOT_RECEIVED" | ||
} | ||
|
||
@Injectable() | ||
export class AppConfigActions { | ||
constructor(private ngRedux: NgRedux<IAppState>, private api: ApiService) { | ||
} | ||
|
||
getYoutubeApiToken() { | ||
this.api.get('/api/config/youtube') | ||
.do(data => { | ||
this.ngRedux.dispatch({ | ||
type: APP_CONFIG_ACTIONS.YOUTUBE_TOKEN_RECEIVED, | ||
payload: { | ||
token: data.token | ||
} | ||
}); | ||
}) | ||
.catch((err) => { | ||
console.log(err); | ||
return this.ngRedux.dispatch({ | ||
type: APP_CONFIG_ACTIONS.YOUTUBE_TOKEN_NOT_RECEIVED | ||
}); | ||
}).subscribe(); | ||
} | ||
} |
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
10 changes: 6 additions & 4 deletions
10
src/RadioWatch/ClientApp/app/components/app/app.component.ts
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
14 changes: 5 additions & 9 deletions
14
src/RadioWatch/ClientApp/app/components/display/test-display.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,9 +1,5 @@ | ||
<h1>Video</h1> | ||
<div class="flex-container"> | ||
<div class="flex-column"> | ||
<div class="flex-center"> | ||
<youtube-adapter> | ||
</youtube-adapter> | ||
</div> | ||
</div> | ||
</div> | ||
<h1>Video</h1> | ||
<div [@gridExpansionAnimationState]> | ||
<youtube-adapter-scroll> | ||
</youtube-adapter-scroll> | ||
</div> |
37 changes: 34 additions & 3 deletions
37
src/RadioWatch/ClientApp/app/components/display/test-display.ts
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,12 +1,43 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { | ||
Component, | ||
OnInit, | ||
AfterViewInit, | ||
Input, | ||
trigger, | ||
state, | ||
style, | ||
transition, | ||
animate | ||
} from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'test-display', | ||
templateUrl: './test-display.html', | ||
styleUrls: ['./test-display.css'] | ||
styleUrls: ['./test-display.css'], | ||
animations: [ | ||
trigger('gridExpansionAnimationState', [ | ||
state('in', style({ height: '*', opacity: 1 })), | ||
transition('* => void', [ | ||
style({ height: '*', opacity: 1 }), | ||
animate(300, style({ height: 0 })), | ||
animate(300, style({ opacity: 0 })), | ||
]), | ||
transition('void => *', [ | ||
style({ height: 0, opacity: 0 }), | ||
animate(300, style({ height: '*' })), | ||
animate(300, style({ opacity: 1 })) | ||
]), | ||
]) | ||
] | ||
|
||
}) | ||
export class TestDisplayComponent implements OnInit { | ||
constructor() { } | ||
|
||
state = 'inactive'; | ||
ngOnInit() { } | ||
|
||
changeState() { | ||
// 'gridExpansionAnimationState' | ||
this.state = this.state == 'inactive' ? 'active' : 'inactive'; | ||
} | ||
} |
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
2 changes: 1 addition & 1 deletion
2
src/RadioWatch/ClientApp/app/components/grid/phalanx-grid-expansion.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,4 +1,4 @@ | ||
<div class="" [id]="expansionId"> | ||
<div [id]="expansionId"> | ||
<youtube-adapter-scroll> | ||
</youtube-adapter-scroll> | ||
</div> |
Oops, something went wrong.