Skip to content
This repository has been archived by the owner on Jan 18, 2023. It is now read-only.

Commit

Permalink
Merge pull request #207 from orange-alliance/dev
Browse files Browse the repository at this point in the history
Update to angular-mdc 0.41.2
  • Loading branch information
afera15 authored Nov 20, 2018
2 parents 28cf6e4 + 075af56 commit ccaab54
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 77 deletions.
42 changes: 14 additions & 28 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"private": true,
"dependencies": {
"@angular-mdc/web": "^0.41.0",
"@angular-mdc/web": "^0.41.2",
"@angular/animations": "^6.0.0",
"@angular/cdk": "^6.4.6",
"@angular/common": "^6.0.0",
Expand Down
80 changes: 38 additions & 42 deletions src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- AppBar -->
<mdc-top-app-bar #topAppBar fixed class="col">
<mdc-top-app-bar #topAppBar fixed style="z-index: 7">
<mdc-top-app-bar-row>
<mdc-top-app-bar-section align="start" title="The Orange Alliance">
<!--<mdc-icon mdcTopAppBarNavIcon (click)="appdrawer.open = !appdrawer.open" *ngIf="isScreenSmall() || topAppBar.isCollapsed()">menu</mdc-icon>-->
Expand All @@ -13,37 +13,6 @@
</mdc-top-app-bar-row>
</mdc-top-app-bar>

<!-- Search -->
<div class="modal fade" id="searchmodal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-lg modal-dialog-centered h-75">
<div class="modal-content w-100 h-100">
<div>
<button type="button" class="close" data-dismiss="modal" aria-label="Close" style="margin: 1.5rem 1.5rem 0 1.5rem!important">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body pt-0" style="overflow-y: initial !important">
<mdc-text-field #searchInput id="ftc_search" (change)="performSearch()" label="Team # or Event" [(ngModel)]="search" [fullwidth]="true"></mdc-text-field>
<div mdcSubtitle1>Press Enter to search</div>
<div class="row mt-3" *ngIf="search" style="max-height: calc(100vh - 215px); overflow-y: auto">
<div class="col-md-6 col-12">
<div mdcHeadline5 class="black">Teams</div>
<mdc-list *ngIf="teamSearchResults">
<toa-team-item *ngFor="let result of teamSearchResults" [team]="result"></toa-team-item>
</mdc-list>
<p *ngIf="teamSearchResults.length === 0">No teams found</p>
</div>
<div class="col-md-6 col-12">
<div mdcHeadline5 class="black">Events</div>
<toa-event-item *ngFor="let result of eventSearchResults" [event]="result"></toa-event-item>
<p *ngIf="eventSearchResults.length === 0">No events found</p>
</div>
</div>
</div>
</div>
</div>
</div>

<!-- Drawer -->
<div class="mdc-top-app-bar--fixed-adjust">
<mdc-drawer #appdrawer="mdcDrawer" [drawer]="isScreenSmall() || topAppBar.isCollapsed() ? 'modal' : 'permanent'" class="toa-drawer--fixed">
Expand Down Expand Up @@ -89,22 +58,19 @@
<a mdc-list-item routerLink="/stream" routerLinkActive="mdc-list-item--activated">
<mdc-icon class="mdc-list-item__graphic" svgIcon="video"></mdc-icon>Streaming
</a>
<a mdc-list-item routerLink="/apidocs" routerLinkActive="mdc-list-item--activated">
<mdc-icon class="mdc-list-item__graphic" svgIcon="code-tags"></mdc-icon>API
</a>

<mdc-list-divider></mdc-list-divider>

<a mdc-list-item href="https://play.google.com/store/apps/details?id=com.theorangealliance.android" target="_blank">
<mdc-icon class="mdc-list-item__graphic" svgIcon="android-head"></mdc-icon>Android App
</a>

<a mdc-list-item routerLink="/add-data" routerLinkActive="mdc-list-item--activated">
<mdc-icon class="mdc-list-item__graphic" svgIcon="upload"></mdc-icon>Add Data
</a>
<!--
<a mdc-list-item routerLink="/livedocs" routerLinkActive="mdc-list-item&#45;&#45;activated">
<mdc-icon class="mdc-list-item__graphic" svgIcon="progress-upload"></mdc-icon>DataSync
</a>
-->
<a mdc-list-item href="https://play.google.com/store/apps/details?id=com.theorangealliance.android" target="_blank">
<mdc-icon class="mdc-list-item__graphic" svgIcon="android-head"></mdc-icon>Android App

<a mdc-list-item routerLink="/apidocs" routerLinkActive="mdc-list-item--activated">
<mdc-icon class="mdc-list-item__graphic" svgIcon="code-tags"></mdc-icon>API
</a>

<a mdc-list-item href="https://github.com/orange-alliance" target="_blank">
Expand Down Expand Up @@ -146,6 +112,36 @@
</mdc-drawer-content>
</mdc-drawer>

<!-- Search -->
<div class="modal fade" id="searchmodal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-lg modal-dialog-centered h-75">
<div class="modal-content w-100 h-100">
<div>
<button type="button" class="close" data-dismiss="modal" aria-label="Close" style="margin: 1.5rem 1.5rem 0 1.5rem!important">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body pt-0" style="overflow-y: initial !important">
<mdc-text-field #searchInput id="ftc_search" (change)="performSearch()" label="Team # or Event" [(ngModel)]="search" [fullwidth]="true"></mdc-text-field>
<div class="row mt-3" *ngIf="search" style="max-height: calc(100vh - 215px); overflow-y: auto">
<div class="col-md-6 col-12">
<div mdcHeadline5 class="black">Teams</div>
<mdc-list *ngIf="teamSearchResults">
<toa-team-item *ngFor="let result of teamSearchResults" [team]="result"></toa-team-item>
</mdc-list>
<p *ngIf="teamSearchResults.length === 0">No teams found</p>
</div>
<div class="col-md-6 col-12">
<div mdcHeadline5 class="black">Events</div>
<toa-event-item *ngFor="let result of eventSearchResults" [event]="result"></toa-event-item>
<p *ngIf="eventSearchResults.length === 0">No events found</p>
</div>
</div>
</div>
</div>
</div>
</div>

<div class="page" [class.toa-page]="router.url !== '/stream'">
<router-outlet></router-outlet>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class TheOrangeAllianceComponent {
private _mediaMatcher: MediaQueryList = matchMedia(`(max-width: ${SMALL_WIDTH_BREAKPOINT}px)`);
@ViewChild(MdcTopAppBar) appBar: MdcTopAppBar;

constructor(private router: Router, private ftc: FTCDatabase, private globaltoa: TheOrangeAllianceGlobals, private _ngZone: NgZone,
constructor(public router: Router, private ftc: FTCDatabase, private _ngZone: NgZone,
db: AngularFireDatabase, auth: AngularFireAuth) {
auth.authState.subscribe(user => {
if (user !== null && user !== undefined) {
Expand Down
8 changes: 4 additions & 4 deletions src/app/components/match-table/match-table.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,10 @@
</tr>
<tr *ngIf="match.participants && match.participants.length == 6" class="d-lg-none d-xl-none">
<td colspan="4" class="blue" [class.match-winner]="match.redScore <= match.blueScore">
<a href="/teams/{{ match.participants[3].teamKey }}">{{ getParticipantString(match, 2) }}</a>
<a href="/teams/{{ match.participants[3].teamKey }}">{{ getParticipantString(match, 3) }}</a>
</td>
<td colspan="4" class="blue" [class.match-winner]="match.redScore <= match.blueScore">
<a href="/teams/{{ match.participants[4].teamKey }}">{{ getParticipantString(match, 3) }}</a>
<a href="/teams/{{ match.participants[4].teamKey }}">{{ getParticipantString(match, 4) }}</a>
</td>
<td colspan="4" class="blue" [class.match-winner]="match.redScore <= match.blueScore">
<a href="/teams/{{ match.participants[5].teamKey }}">{{ getParticipantString(match, 5) }}</a>
Expand Down Expand Up @@ -323,10 +323,10 @@
</tr>
<tr *ngIf="match.participants && match.participants.length == 6" class="d-lg-none d-xl-none">
<td colspan="4" class="blue" [class.match-winner]="match.redScore <= match.blueScore">
<a href="/teams/{{ match.participants[3].teamKey }}" [class.current-team]="isSelectedTeam(match, 3)">{{ getParticipantString(match, 2) }}</a>
<a href="/teams/{{ match.participants[3].teamKey }}" [class.current-team]="isSelectedTeam(match, 3)">{{ getParticipantString(match, 3) }}</a>
</td>
<td colspan="4" class="blue" [class.match-winner]="match.redScore <= match.blueScore">
<a href="/teams/{{ match.participants[4].teamKey }}" [class.current-team]="isSelectedTeam(match, 4)">{{ getParticipantString(match, 3) }}</a>
<a href="/teams/{{ match.participants[4].teamKey }}" [class.current-team]="isSelectedTeam(match, 4)">{{ getParticipantString(match, 4) }}</a>
</td>
<td colspan="4" class="blue" [class.match-winner]="match.redScore <= match.blueScore">
<a href="/teams/{{ match.participants[5].teamKey }}" [class.current-team]="isSelectedTeam(match, 5)">{{ getParticipantString(match, 5) }}</a>
Expand Down
2 changes: 1 addition & 1 deletion src/app/views/home/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export class HomeComponent {

public willFUNstartSoon(): boolean {
const diff = (new Date(this.firstupdatesnow.startDateTime).valueOf() - this.today.valueOf()) / 1000 / 60 / 60;// Convert milliseconds to hours
return diff <= 24;
return diff <= 24 && diff >= 0;
}

public isFUNonLive(): boolean {
Expand Down

0 comments on commit ccaab54

Please sign in to comment.