Skip to content

Commit bff47de

Browse files
committed
Link to Teams Events
1 parent 6556933 commit bff47de

File tree

7 files changed

+51
-42
lines changed

7 files changed

+51
-42
lines changed

.vscode/launch.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "edge",
9+
"request": "launch",
10+
"name": "Launch Edge against localhost",
11+
"url": "http://localhost:4200",
12+
"webRoot": "${workspaceFolder}/Angular"
13+
}
14+
]
15+
}

Angular/src/app/home/home.component.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ <h1>Tracks</h1>
55
<div class="row">
66
<div class="col-sm-2 m-2" *ngFor="let track of tracks">
77
<a routerLink="/tracks/{{track.id}}" routerLinkActive="active" class="btn btn-primary"><i class="fa fa-info"></i>{{track.title}}</a>
8+
<a target="_blank" *ngIf="track.liveUrl"
9+
href="{{track.liveUrl}}"
10+
class="btn btn-primary m-2"><i class="fa fa-play"></i></a>
811
</div>
912
</div>
1013

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,24 @@
11
import { Component, OnInit } from '@angular/core';
2+
import { WatchNowService } from '../watch-now.service';
23

34
@Component({
45
selector: 'app-home',
56
templateUrl: './home.component.html',
67
styleUrls: ['./home.component.scss']
78
})
89
export class HomeComponent implements OnInit {
9-
public hours: Date[] = [];
10-
public tracks: Track[] = [
11-
{
12-
id: 20987,
13-
title: 'Web'
14-
},
15-
{
16-
id: 15356,
17-
title: 'Data'
18-
},
19-
{
20-
id: 20988,
21-
title: 'Cloud'
22-
},
23-
{
24-
id: 20990,
25-
title: 'Other'
26-
}
27-
]
10+
constructor(private watchNowService: WatchNowService) { }
2811

29-
constructor() { }
12+
public hours: Date[] = [];
13+
public tracks: Track[] = [];
3014

3115
ngOnInit(): void {
16+
const trackNames = ['Web', 'Cloud', 'ML', 'Other'];
17+
this.tracks = trackNames.map(n => <Track>{
18+
title: n,
19+
liveUrl: this.watchNowService.getUrlForRoom(n)
20+
})
21+
3222
const year = 2021;
3323
const month = 10;
3424
const day = 16;
@@ -51,4 +41,5 @@ export class HomeComponent implements OnInit {
5141
interface Track {
5242
id: number;
5343
title: string;
44+
liveUrl?: string;
5445
}

Angular/src/app/now-showing/now-showing.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ <h1 class="change-title">
2121
</div>
2222

2323
<app-small-speaker [session]="sessionsByRoom[room.id]"></app-small-speaker>
24-
<a target="_blank" [href]="getPlayUrl(room)"><i class="fa fa-play m-2"></i> Watch Now</a>
24+
<a target="_blank" *ngIf="getPlayUrl(room)" [href]="getPlayUrl(room)"><i class="fa fa-play m-2"></i> Watch Now</a>
2525
</div>
2626
</div>
2727
</div>

Angular/src/app/now-showing/now-showing.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export class NowShowingComponent implements OnInit {
3333
.getSessionizeData()
3434
.subscribe((sessionizeApiResult) => {
3535
this.rooms = sessionizeApiResult.rooms;
36+
console.info(this.rooms);
3637

3738
this.route.params.subscribe((params) => {
3839
this.sessionsByRoom = {};
@@ -68,7 +69,7 @@ export class NowShowingComponent implements OnInit {
6869
}
6970

7071
public getPlayUrl(room: Room): string {
71-
return this.watchNowService.getUrlForRoom(room);
72+
return this.watchNowService.getUrlForRoom(room.name);
7273
}
7374

7475
public changeTitle(): void {

Angular/src/app/watch-now.service.ts

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
11
import { Injectable } from '@angular/core';
2-
import { Room } from './sessionize-service.service';
32

43
@Injectable({
54
providedIn: 'root',
65
})
76
export class WatchNowService {
8-
getUrlForRoom(room: Room): string {
9-
// if (room.id === 15355) {
10-
// return 'https://teams.microsoft.com/l/meetup-join/19%3ameeting_NTdmMDllYjgtYWMzZi00MWQ5LThjNGYtNmYwOGE1MWVjZjI2%40thread.v2/0?context=%7b%22Tid%22%3a%22522429d4-f37f-4713-a7d9-58d6450b01b6%22%2c%22Oid%22%3a%22b821e4e9-0c4f-45bd-962a-71dac376dd03%22%2c%22IsBroadcastMeeting%22%3atrue%7d';
11-
// }
12-
// if (room.id === 15356) {
13-
// return 'https://teams.microsoft.com/l/meetup-join/19%3ameeting_ZjgzZjE2MmYtZjZiNC00YTM3LWEyMWQtOThmOGNjMDEwMzg5%40thread.v2/0?context=%7b%22Tid%22%3a%22522429d4-f37f-4713-a7d9-58d6450b01b6%22%2c%22Oid%22%3a%22b821e4e9-0c4f-45bd-962a-71dac376dd03%22%2c%22IsBroadcastMeeting%22%3atrue%7d';
14-
// }
15-
// if (room.id === 15357) {
16-
// return 'https://teams.microsoft.com/l/meetup-join/19%3ameeting_ZGJlZDU3ZWItYmFiYi00ZmY4LTlmNWMtNjM5ZWJlYmI1OGM5%40thread.v2/0?context=%7b%22Tid%22%3a%22522429d4-f37f-4713-a7d9-58d6450b01b6%22%2c%22Oid%22%3a%22b821e4e9-0c4f-45bd-962a-71dac376dd03%22%2c%22IsBroadcastMeeting%22%3atrue%7d';
17-
// }
18-
// if (room.id === 15358) {
19-
// return 'https://teams.microsoft.com/l/meetup-join/19%3ameeting_M2E4M2E2MmQtZTE5Ny00MDJhLTk5YjEtOGFmNTFiZjMxZjMy%40thread.v2/0?context=%7b%22Tid%22%3a%22522429d4-f37f-4713-a7d9-58d6450b01b6%22%2c%22Oid%22%3a%22b821e4e9-0c4f-45bd-962a-71dac376dd03%22%2c%22IsBroadcastMeeting%22%3atrue%7d';
20-
// }
7+
getUrlForRoom(roomName: string): string {
8+
if (roomName === 'Web') {
9+
return 'https://teams.microsoft.com/l/meetup-join/19%3af67daacbf7334ceeb475264ccfb11307%40thread.tacv2/1634331199936?context=%7b%22Tid%22%3a%22522429d4-f37f-4713-a7d9-58d6450b01b6%22%2c%22Oid%22%3a%22b821e4e9-0c4f-45bd-962a-71dac376dd03%22%7d';
10+
}
11+
if (roomName === 'Cloud') {
12+
return 'https://teams.microsoft.com/l/meetup-join/19%3ac143969354c14ae7bf2405e46b005da4%40thread.tacv2/1634331493610?context=%7b%22Tid%22%3a%22522429d4-f37f-4713-a7d9-58d6450b01b6%22%2c%22Oid%22%3a%22b821e4e9-0c4f-45bd-962a-71dac376dd03%22%7d';
13+
}
14+
if (roomName === 'ML') {
15+
return 'https://teams.microsoft.com/l/meetup-join/19%3aafa303b7affb4ec29b64d176fab7c62d%40thread.tacv2/1634332267783?context=%7b%22Tid%22%3a%22522429d4-f37f-4713-a7d9-58d6450b01b6%22%2c%22Oid%22%3a%22b821e4e9-0c4f-45bd-962a-71dac376dd03%22%7d';
16+
}
17+
if (roomName === 'Other') {
18+
return 'https://teams.microsoft.com/l/meetup-join/19%3a5313999825c246c8979240774ce4a516%40thread.tacv2/1634332453280?context=%7b%22Tid%22%3a%22522429d4-f37f-4713-a7d9-58d6450b01b6%22%2c%22Oid%22%3a%22b821e4e9-0c4f-45bd-962a-71dac376dd03%22%7d';
19+
}
2120
return null;
2221
}
2322

index.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,15 @@ <h3><a href="https://sessionize.com/northern-va-codecamp-fall-2021/" target="_bl
119119
<h2><i class="fa fa-calendar"></i> Saturday, October 16, 2021</h2>
120120
<h4>9:00 AM - 4:30 PM (Eastern Daylight Time, UTC-4)</h4>
121121
</div>
122-
<!-- <div class="col-lg-6 col-md-6">
122+
<div class="col-lg-6 col-md-6">
123123
<h2>Now Streaming</h2>
124124
<h4>
125-
<a href="https://teams.microsoft.com/l/meetup-join/19%3ameeting_NTdmMDllYjgtYWMzZi00MWQ5LThjNGYtNmYwOGE1MWVjZjI2%40thread.v2/0?context=%7b%22Tid%22%3a%22522429d4-f37f-4713-a7d9-58d6450b01b6%22%2c%22Oid%22%3a%22b821e4e9-0c4f-45bd-962a-71dac376dd03%22%2c%22IsBroadcastMeeting%22%3atrue%7d" class="btn btn-primary">Web Track</a>
126-
<a href="https://teams.microsoft.com/l/meetup-join/19%3ameeting_ZjgzZjE2MmYtZjZiNC00YTM3LWEyMWQtOThmOGNjMDEwMzg5%40thread.v2/0?context=%7b%22Tid%22%3a%22522429d4-f37f-4713-a7d9-58d6450b01b6%22%2c%22Oid%22%3a%22b821e4e9-0c4f-45bd-962a-71dac376dd03%22%2c%22IsBroadcastMeeting%22%3atrue%7d" class="btn btn-primary">Data Track</a>
127-
<a href="https://teams.microsoft.com/l/meetup-join/19%3ameeting_ZGJlZDU3ZWItYmFiYi00ZmY4LTlmNWMtNjM5ZWJlYmI1OGM5%40thread.v2/0?context=%7b%22Tid%22%3a%22522429d4-f37f-4713-a7d9-58d6450b01b6%22%2c%22Oid%22%3a%22b821e4e9-0c4f-45bd-962a-71dac376dd03%22%2c%22IsBroadcastMeeting%22%3atrue%7d" class="btn btn-primary">Cloud Track</a>
128-
<a href="https://teams.microsoft.com/l/meetup-join/19%3ameeting_M2E4M2E2MmQtZTE5Ny00MDJhLTk5YjEtOGFmNTFiZjMxZjMy%40thread.v2/0?context=%7b%22Tid%22%3a%22522429d4-f37f-4713-a7d9-58d6450b01b6%22%2c%22Oid%22%3a%22b821e4e9-0c4f-45bd-962a-71dac376dd03%22%2c%22IsBroadcastMeeting%22%3atrue%7d" class="btn btn-primary">/etc Track</a>
125+
<a href="https://teams.microsoft.com/l/meetup-join/19%3af67daacbf7334ceeb475264ccfb11307%40thread.tacv2/1634331199936?context=%7b%22Tid%22%3a%22522429d4-f37f-4713-a7d9-58d6450b01b6%22%2c%22Oid%22%3a%22b821e4e9-0c4f-45bd-962a-71dac376dd03%22%7d" class="btn btn-primary">Web Track</a>
126+
<a href="https://teams.microsoft.com/l/meetup-join/19%3ac143969354c14ae7bf2405e46b005da4%40thread.tacv2/1634331493610?context=%7b%22Tid%22%3a%22522429d4-f37f-4713-a7d9-58d6450b01b6%22%2c%22Oid%22%3a%22b821e4e9-0c4f-45bd-962a-71dac376dd03%22%7d" class="btn btn-primary">Cloud Track</a>
127+
<a href="https://teams.microsoft.com/l/meetup-join/19%3aafa303b7affb4ec29b64d176fab7c62d%40thread.tacv2/1634332267783?context=%7b%22Tid%22%3a%22522429d4-f37f-4713-a7d9-58d6450b01b6%22%2c%22Oid%22%3a%22b821e4e9-0c4f-45bd-962a-71dac376dd03%22%7d" class="btn btn-primary">ML Track</a>
128+
<a href="https://teams.microsoft.com/l/meetup-join/19%3a5313999825c246c8979240774ce4a516%40thread.tacv2/1634332453280?context=%7b%22Tid%22%3a%22522429d4-f37f-4713-a7d9-58d6450b01b6%22%2c%22Oid%22%3a%22b821e4e9-0c4f-45bd-962a-71dac376dd03%22%7d" class="btn btn-primary">Other Track</a>
129129
</h4>
130-
</div> -->
130+
</div>
131131
</div>
132132
<div class="row">
133133
<div class="col-lg-12">

0 commit comments

Comments
 (0)