Skip to content

Commit

Permalink
Handle no organizational login case
Browse files Browse the repository at this point in the history
  • Loading branch information
DerekTBrown committed Oct 17, 2017
1 parent 646ac30 commit 346f0ad
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 11 deletions.
21 changes: 12 additions & 9 deletions client/imports/account/login.component.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="tuxlab-login" fxLayout="row" fxLayoutAlign="center center">
<div class="page">
<div class="page" fxLayout="column" fxLayoutAlign="center center">
<h1> Login </h1>

<form #f="ngForm" (ngSubmit)="login(f.value)">
Expand Down Expand Up @@ -36,14 +36,17 @@ <h1> Login </h1>
</md-list>
</form>

<!-- Divider -->
<md-divider></md-divider>

<!-- 3rd Party Logins -->
<h2> Organization Login <h2>
<div fxLayout fxLayoutAlign="center">
<button md-raised-button *ngIf="google" (click)="LoginWithGoogle()"><md-icon>account_balance</md-icon>Google Login</button>
</div>
<!-- Selectively Display Organization -->
<ng-container *ngIf="google">
<!-- Divider -->
<md-divider></md-divider>

<!-- 3rd Party Logins -->
<h2> Organization Login <h2>
<div fxLayout fxLayoutAlign="center">
<button md-raised-button *ngIf="google" (click)="LoginWithGoogle()"><md-icon>account_balance</md-icon>Google Login</button>
</div>
</ng-container>

</div>
</div>
2 changes: 1 addition & 1 deletion client/imports/account/login.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ div.tuxlab-login{
div.page {
width: 100%;
height: 100%;
max-width: 600px;
max-width: 600px !important;
max-height: 600px;

background-color: #fff;
Expand Down
2 changes: 1 addition & 1 deletion client/imports/app.theme.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '~@angular/material/theming';
@import '../../node_modules/@angular/material/theming';
// Plus imports for other components in your app.

// Include the common styles for Angular Material. We include this here so that you only
Expand Down
8 changes: 8 additions & 0 deletions server/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import * as _ from "lodash";
import { Meteor } from 'meteor/meteor';

import SetupAuthentication from "./imports/service/auth";
Expand All @@ -7,3 +8,10 @@ import { DefaultFixtures } from "../imports/test/fixtures";
Meteor.startup(() => {
SetupAuthentication();
})

// Enable Fixtures if Defined
if(_.has(process.env, "TUXLAB_FIXTURES") &&
typeof process.env["TUXLAB_FIXTURES"] === "string" &&
process.env["TUXLAB_FIXTURES"].toUpperCase() === "TRUE"){
new DefaultFixtures();
}

0 comments on commit 346f0ad

Please sign in to comment.