Skip to content

Commit 5ba5e14

Browse files
authored
Merge pull request #41 from geekwaytothewest/main
Update for 2024
2 parents b6db240 + 5be1b8e commit 5ba5e14

9 files changed

+134
-20
lines changed

src/app/conventions/geekwaymicro/geekwaymicro.component.html

+10-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<br/>
99

10-
<div *ngIf="geekwayMicro | async as g">
10+
<div *ngIf="geekwayMicro | async as g;else message">
1111
<mat-card>
1212
<mat-card-title>Geekway Micro - {{ g.startDate | amTz: 'America/Chicago' | amDateFormat: 'MMMM Do YYYY' }}</mat-card-title>
1313
<mat-card-subtitle>{{ g.Theme }}</mat-card-subtitle>
@@ -91,4 +91,12 @@
9191
</div>
9292
</mat-card-content>
9393
</mat-card>
94-
</div>
94+
</div>
95+
96+
<ng-template #message>
97+
<div>
98+
<mat-card>
99+
<mat-card-title>Check back soon for more information on the next Geekway Micro</mat-card-title>
100+
</mat-card>
101+
</div>
102+
</ng-template>

src/app/conventions/geekwaymicro/geekwaymicro.component.ts

+20-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { AfterViewChecked, Component, OnDestroy, OnInit, ViewChild } from '@angular/core';
22
import { Observable, Subscription } from 'rxjs';
3-
import { Convention, NextConventionWhereGQL } from 'src/generated/types.graphql-gen';
3+
import { Convention, NextConventionWhereGQL, SingleConventionTypeGQL } from 'src/generated/types.graphql-gen';
44
import { Router } from '@angular/router';
55
import { map } from 'rxjs/operators';
66
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
@@ -17,6 +17,8 @@ export class GeekwaymicroComponent implements OnInit, OnDestroy, AfterViewChecke
1717

1818
geekwayMicro: Observable<any>;
1919
geekwayMicroSubscription: Subscription;
20+
geekwayType: Observable<any>;
21+
geekwayTypeSubscription: Subscription;
2022
content: SafeHtml;
2123
workingContent: string;
2224
mapCount = 0;
@@ -30,12 +32,27 @@ export class GeekwaymicroComponent implements OnInit, OnDestroy, AfterViewChecke
3032

3133
constructor(
3234
private nextGWConventionWhere: NextConventionWhereGQL,
35+
private singleConventionType: SingleConventionTypeGQL,
3336
private sanitizer: DomSanitizer,
3437
private router: Router,
3538
private oembedService: OembedService
3639
) { }
3740

3841
ngOnInit() {
42+
const whereClauseGWT = {
43+
Name: 'Geekway Micro',
44+
};
45+
46+
this.geekwayType = this.singleConventionType.watch({whereClause: whereClauseGWT})
47+
.valueChanges
48+
.pipe(
49+
map(result => result.data.conventiontypes[0])
50+
);
51+
52+
this.geekwayTypeSubscription = this.geekwayType.subscribe(result => {
53+
this.workingContent = result.Content;
54+
this.content = this.sanitizer.bypassSecurityTrustHtml(this.workingContent);
55+
});
3956

4057
const whereClauseGW = {
4158
Type: 'GeekwayMicro',
@@ -55,17 +72,17 @@ export class GeekwaymicroComponent implements OnInit, OnDestroy, AfterViewChecke
5572
}
5673

5774
this.workingContent = result.conventionType.Content;
58-
this.content = this.sanitizer.bypassSecurityTrustHtml(this.workingContent);
5975

6076
for (const match of result.conventionType.Content.matchAll(this.oembedService.oembedRegex)) {
6177
this.oembedService.getOembed(match[1]).subscribe(oembed => {
6278
this.workingContent = this.workingContent
6379
.replace(match[0], oembed.html)
6480
.replace('src="/uploads/', 'src="https://cms.geekway.com/uploads/');
65-
this.content = this.sanitizer.bypassSecurityTrustHtml(this.workingContent);
6681
});
6782
}
6883

84+
this.content = this.sanitizer.bypassSecurityTrustHtml(this.workingContent);
85+
6986
this.venueCenterLat = result.PrimaryVenue.Lat;
7087
this.venueCenterLng = result.PrimaryVenue.Long;
7188
for (let v of result.venues) {

src/app/conventions/geekwaymini/geekwaymini.component.html

+10-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<br/>
99

10-
<div *ngIf="geekwayMini | async as g">
10+
<div *ngIf="geekwayMini | async as g;else message">
1111
<mat-card>
1212
<mat-card-title>Geekway to the West {{ g.startDate | amTz: 'America/Chicago' | amDateFormat: 'YYYY' }}</mat-card-title>
1313
<mat-card-subtitle>{{ g.Theme }}</mat-card-subtitle>
@@ -100,4 +100,12 @@
100100
</div>
101101
</mat-card-content>
102102
</mat-card>
103-
</div>
103+
</div>
104+
105+
<ng-template #message>
106+
<div>
107+
<mat-card>
108+
<mat-card-title>Check back soon for more information on the next Geekway Mini</mat-card-title>
109+
</mat-card>
110+
</div>
111+
</ng-template>

src/app/conventions/geekwaymini/geekwaymini.component.ts

+21-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { AfterViewChecked, Component, OnDestroy, OnInit } from '@angular/core';
22
import { Router } from '@angular/router';
3-
import { NextConventionWhereGQL, Convention } from 'src/generated/types.graphql-gen';
3+
import { NextConventionWhereGQL, Convention, SingleConventionTypeGQL } from 'src/generated/types.graphql-gen';
44
import { Observable, Subscription } from 'rxjs';
55
import { map } from 'rxjs/operators';
66
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
@@ -18,6 +18,8 @@ export class GeekwayminiComponent implements OnInit, OnDestroy, AfterViewChecked
1818

1919
geekwayMini: Observable<any>;
2020
geekwayMiniSubscription: Subscription;
21+
geekwayType: Observable<any>;
22+
geekwayTypeSubscription: Subscription;
2123
content: SafeHtml;
2224
workingContent: string;
2325
mapCount = 0;
@@ -33,12 +35,28 @@ export class GeekwayminiComponent implements OnInit, OnDestroy, AfterViewChecked
3335

3436
constructor(
3537
private nextGWConventionWhere: NextConventionWhereGQL,
38+
private singleConventionType: SingleConventionTypeGQL,
3639
private sanitizer: DomSanitizer,
3740
private router: Router,
3841
private oembedService: OembedService
3942
) { }
4043

4144
ngOnInit() {
45+
const whereClauseGWT = {
46+
Name: 'Geekway Mini',
47+
};
48+
49+
this.geekwayType = this.singleConventionType.watch({whereClause: whereClauseGWT})
50+
.valueChanges
51+
.pipe(
52+
map(result => result.data.conventiontypes[0])
53+
);
54+
55+
this.geekwayTypeSubscription = this.geekwayType.subscribe(result => {
56+
this.workingContent = result.Content;
57+
this.content = this.sanitizer.bypassSecurityTrustHtml(this.workingContent);
58+
});
59+
4260
const whereClauseGW = {
4361
Type: 'GeekwayMini',
4462
endDate_gt: new Date().toISOString()
@@ -56,7 +74,6 @@ export class GeekwayminiComponent implements OnInit, OnDestroy, AfterViewChecked
5674
}
5775

5876
this.workingContent = result.conventionType.Content;
59-
this.content = this.sanitizer.bypassSecurityTrustHtml(this.workingContent);
6077
if (result.regDates != null && result.regDates.length > 0) {
6178
this.endRegDate = new Date(Math.max(...result.regDates.map(rd => new Date(rd.dateClosed).getTime())));
6279
}
@@ -66,10 +83,11 @@ export class GeekwayminiComponent implements OnInit, OnDestroy, AfterViewChecked
6683
this.workingContent = this.workingContent
6784
.replace(match[0], oembed.html)
6885
.replace('src="/uploads/', 'src="https://cms.geekway.com/uploads/');
69-
this.content = this.sanitizer.bypassSecurityTrustHtml(this.workingContent);
7086
});
7187
}
7288

89+
this.content = this.sanitizer.bypassSecurityTrustHtml(this.workingContent);
90+
7391
this.venueCenterLat = result.PrimaryVenue.Lat;
7492
this.venueCenterLng = result.PrimaryVenue.Long;
7593
for (let v of result.venues) {

src/app/conventions/geekwaytothewest/geekwaytothewest.component.html

+10-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<br/>
99

10-
<div *ngIf="geekwayToTheWest | async as g">
10+
<div *ngIf="geekwayToTheWest | async as g;else message">
1111
<mat-card>
1212
<mat-card-title>Geekway to the West {{ g.startDate | amTz: 'America/Chicago' | amDateFormat: 'YYYY' }}</mat-card-title>
1313
<mat-card-subtitle>{{ g.Theme }}</mat-card-subtitle>
@@ -114,4 +114,12 @@
114114
<mat-paginator [pageSize]="200" [pageSizeOptions]="[10, 50, 100, 200]" showFirstLastButtons (page)="playAndWinPaginateChange($event)"></mat-paginator>
115115
</mat-card-content>
116116
</mat-card>
117-
</div>
117+
</div>
118+
119+
<ng-template #message>
120+
<div>
121+
<mat-card>
122+
<mat-card-title>Check back soon for more information on the next Geekway to the West</mat-card-title>
123+
</mat-card>
124+
</div>
125+
</ng-template>

src/app/conventions/geekwaytothewest/geekwaytothewest.component.ts

+23-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { AfterViewChecked, Component, OnDestroy, OnInit, ViewChild } from '@angular/core';
22
import { Observable, Subscription } from 'rxjs';
3-
import { Convention, NextConventionWhereGQL } from 'src/generated/types.graphql-gen';
3+
import { Convention, NextConventionWhereGQL, SingleConventionTypeGQL } from 'src/generated/types.graphql-gen';
44
import { map } from 'rxjs/operators';
55
import { Router } from '@angular/router';
66
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
@@ -22,6 +22,8 @@ export class GeekwaytothewestComponent implements OnInit, OnDestroy, AfterViewCh
2222

2323
geekwayToTheWest: Observable<any>;
2424
geekwayToTheWestSubscription: Subscription;
25+
geekwayType: Observable<any>;
26+
geekwayTypeSubscription: Subscription;
2527
playAndWinDataSource: MatTableDataSource<any>;
2628
content: SafeHtml;
2729
workingContent: string;
@@ -64,12 +66,28 @@ export class GeekwaytothewestComponent implements OnInit, OnDestroy, AfterViewCh
6466

6567
constructor(
6668
private nextGWConventionWhere: NextConventionWhereGQL,
69+
private singleConventionType: SingleConventionTypeGQL,
6770
private sanitizer: DomSanitizer,
6871
private router: Router,
6972
private oembedService: OembedService
7073
) { }
7174

7275
ngOnInit() {
76+
const whereClauseGWT = {
77+
Name: 'Geekway to the West',
78+
};
79+
80+
this.geekwayType = this.singleConventionType.watch({whereClause: whereClauseGWT})
81+
.valueChanges
82+
.pipe(
83+
map(result => result.data.conventiontypes[0])
84+
);
85+
86+
this.geekwayTypeSubscription = this.geekwayType.subscribe(result => {
87+
this.workingContent = result.Content;
88+
this.content = this.sanitizer.bypassSecurityTrustHtml(this.workingContent);
89+
});
90+
7391
const whereClauseGW = {
7492
Type: 'GeekwayToTheWest',
7593
endDate_gt: new Date().toISOString()
@@ -87,7 +105,6 @@ export class GeekwaytothewestComponent implements OnInit, OnDestroy, AfterViewCh
87105
}
88106

89107
this.workingContent = result.conventionType.Content;
90-
this.content = this.sanitizer.bypassSecurityTrustHtml(this.workingContent);
91108

92109
this.playAndWinDataSource = new MatTableDataSource();
93110
this.playAndWinDataSource.data = result.playAndWins;
@@ -109,12 +126,11 @@ export class GeekwaytothewestComponent implements OnInit, OnDestroy, AfterViewCh
109126
this.workingContent = this.workingContent
110127
.replace(match[0], oembed.html)
111128
.replace('src="/uploads/', 'src="https://cms.geekway.com/uploads/');
112-
this.content = this.sanitizer.bypassSecurityTrustHtml(this.workingContent);
113129
});
114130
}
115131

116132
this.content = this.sanitizer.bypassSecurityTrustHtml(
117-
result.conventionType.Content
133+
this.workingContent
118134
.replace(
119135
/<oembed url=(.*)><\/oembed>/,
120136
' <div class="iframely-embed"><div class="iframely-responsive"><a data-iframely-url href=$1></div></div>'
@@ -130,9 +146,10 @@ export class GeekwaytothewestComponent implements OnInit, OnDestroy, AfterViewCh
130146
});
131147

132148
for (let p of v.maps) {
149+
console.log(p);
133150
this.venueMapsGalleryItems.push(new ImageItem({
134-
src: 'https://cms.geekway.com' + p.Boxart.url,
135-
thumb: 'https://cms.geekway.com' + p.Boxart.url
151+
src: 'https://cms.geekway.com' + p.url,
152+
thumb: 'https://cms.geekway.com' + p.url
136153
}));
137154
}
138155
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
query singleConventionType($whereClause: JSON!) {
2+
conventiontypes (
3+
where: $whereClause,
4+
limit: 1
5+
) {
6+
id
7+
_id
8+
createdAt
9+
updatedAt
10+
Name
11+
Description
12+
Logo {
13+
id
14+
_id
15+
createdAt
16+
updatedAt
17+
hash
18+
mime
19+
size
20+
provider
21+
name
22+
url
23+
}
24+
Icon
25+
LogoSquare {
26+
id
27+
_id
28+
createdAt
29+
updatedAt
30+
hash
31+
mime
32+
size
33+
provider
34+
name
35+
url
36+
}
37+
Content
38+
}
39+
}

src/app/navigation/navigation.component.html

-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@
7070
<a clrVerticalNavLink [ngClass]="{'nav-link' : true, 'active' : this.router.url.startsWith('/boardmembers')}" href="boardmembers"><i class="fa fa-users"></i> Board Members</a>
7171
<a clrVerticalNavLink class="nav-link" href="https://discord.gg/FWRz5nbySv" target="_blank"><i class="fab fa-discord"></i> Discord</a>
7272
<a clrVerticalNavLink class="nav-link" href="https://slack.geekway.com" target="_blank"><i class="fab fa-slack"></i> Slack</a>
73-
<a clrVerticalNavLink class="nav-link" href="https://twitter.com/geekway" target="_blank"><i class="fab fa-twitter"></i> Twitter</a>
7473
<a clrVerticalNavLink class="nav-link" href="https://www.facebook.com/GeekwaytotheWest/" target="_blank"><i class="fab fa-facebook"></i> Facebook</a>
7574
<a clrVerticalNavLink class="nav-link" href="https://www.instagram.com/geekwaytothewest/" target="_blank"><i class="fab fa-instagram"></i> Instagram</a>
7675
<a clrVerticalNavLink class="nav-link" href="mailto:[email protected]"><i class="fa fa-envelope"></i> Email</a>

src/app/registration/registration.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ <h1 class="title">Registration Dates</h1>
7474
</div>
7575
</mat-card-content>
7676
<mat-card-actions *ngIf="g.registrationUrl">
77-
<button mat-button (click)="redirect(g.registrationUrl)">Register</button>
77+
<button style="background-color: green; color: white; font-weight: bold; font-size: x-large; padding: 10px; border-radius: 1em;" mat-button (click)="redirect(g.registrationUrl)">Register</button>
7878
</mat-card-actions>
7979
</mat-card>
8080
</div>

0 commit comments

Comments
 (0)