-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bcbdc32
commit ea11466
Showing
13 changed files
with
402 additions
and
27 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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<div class="tuxlab-account" *ngIf="user" fxLayout="column" fxLayoutAlign="start center"> | ||
|
||
<h1>Account</h1> | ||
|
||
<!-- Profile --> | ||
<md-card> | ||
<md-card-header> | ||
<img md-card-avatar [src]="user?.profile?.picture" /> | ||
<md-card-title>{{ user?.profile?.name }}</md-card-title> | ||
<md-card-subtitle>{{ user?.profile?.email }}</md-card-subtitle> | ||
</md-card-header> | ||
</md-card> | ||
|
||
<!-- Actions --> | ||
<div class="actions" fxLayout="row"> | ||
|
||
<!-- Change Password --> | ||
<button md-raised-button> | ||
<md-icon>security</md-icon> | ||
Change Password | ||
</button> | ||
|
||
<!-- Delete Account --> | ||
<button md-raised-button (click)="deleteAccount()"> | ||
<md-icon>delete_forever</md-icon> | ||
Delete Account | ||
</button> | ||
</div> | ||
</div> |
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,51 @@ | ||
div.tuxlab-account{ | ||
width: 100%; | ||
min-height: 80vh; | ||
|
||
h1, h2, h3{ | ||
width: 100%; | ||
max-width: 960px; | ||
|
||
margin-bottom: 5px !important; | ||
|
||
text-align: left; | ||
font-weight: 300; | ||
} | ||
|
||
md-card{ | ||
width: 100%; | ||
max-width: 960px; | ||
|
||
margin:12px 0px; | ||
|
||
&:first-child{ | ||
margin-top:0px; | ||
} | ||
|
||
md-card-title{ | ||
font-size: 20px; | ||
} | ||
|
||
md-card-subtitle{ | ||
font-size: 16px; | ||
} | ||
|
||
md-card-avatar{ | ||
height: 40px; | ||
width: 40px; | ||
} | ||
} | ||
|
||
div.actions{ | ||
width: 100%; | ||
max-width: 960px; | ||
|
||
padding: 8px; | ||
|
||
background-color: #ddd; | ||
|
||
button { | ||
margin:0px 5px; | ||
} | ||
} | ||
} |
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,49 @@ | ||
// Meteor Imports | ||
import { Meteor } from 'meteor/meteor'; | ||
import { Accounts } from 'meteor/accounts-base'; | ||
import { MeteorComponent } from 'angular2-meteor'; | ||
|
||
// Angular Imports | ||
import { Component, NgZone } from '@angular/core'; | ||
import { Router, ActivatedRoute } from '@angular/router'; | ||
|
||
// Collections | ||
import { User } from '../../../both/models/user.model'; | ||
import { Users } from '../../../both/collections/user.collection'; | ||
|
||
// Define Dashboard Component | ||
import template from "./account.component.html"; | ||
import style from "./account.component.scss"; | ||
|
||
@Component({ | ||
selector: 'tuxlab-account', | ||
template, | ||
styles: [ style ] | ||
}) | ||
|
||
// Export Dashboard Class | ||
export class AccountView extends MeteorComponent { | ||
private user : User; | ||
|
||
constructor(private zone : NgZone, private router : Router) { | ||
super(); | ||
} | ||
|
||
ngOnInit(){ | ||
|
||
// Get User | ||
this.zone.run(() => { | ||
this.user = <User>Meteor.user(); | ||
}); | ||
} | ||
|
||
resetPassword(){ | ||
this.route.navigate(['']); | ||
} | ||
|
||
deleteAccount(){ | ||
Meteor.call('Users.remove', { user_id : Meteor.userId()}, () => { | ||
this.router.navigate(['/']); | ||
}) | ||
} | ||
} |
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,31 @@ | ||
<div class="tuxlab-reset"> | ||
<div class="page"> | ||
|
||
<h1>Reset Password</h1> | ||
|
||
<md-list> | ||
<md-list-item> | ||
<md-input-container> | ||
<input mdInput type="password" placeholder="Old Password" /> | ||
</md-input-container> | ||
</md-list-item> | ||
|
||
<md-list-item> | ||
<md-input-container> | ||
<input mdInput type="password" placeholder="New Password" /> | ||
</md-input-container> | ||
</md-list-item> | ||
|
||
<md-list-item> | ||
<md-input-container> | ||
<input mdInput type="password" placeholder="New Password (Confirm)" /> | ||
</md-input-container> | ||
</md-list-item> | ||
</md-list> | ||
|
||
<md-divider></md-divider> | ||
|
||
<button md-raised-button><md-icon>settings_backup_restore</md-icon>Reset Password</button> | ||
|
||
</div> | ||
</div> |
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,85 @@ | ||
@import '../../../node_modules/@angular/material/theming'; | ||
@import '../app.theme'; | ||
|
||
div.tuxlab-login{ | ||
height: 80vh; | ||
position: relative; | ||
|
||
div.page { | ||
position: absolute; | ||
top: 50%; | ||
left: 50%; | ||
transform: translate(-50%, -50%); | ||
|
||
width: 100%; | ||
height: 100%; | ||
max-width: 600px; | ||
max-height: 600px; | ||
|
||
background-color: #fff; | ||
|
||
h1 { | ||
width: 100%; | ||
|
||
padding:20px 0px; | ||
background-color: mat-color($tuxlab-app-primary); | ||
|
||
color: #fff; | ||
text-align: center; | ||
font-weight: 300; | ||
font-size: 40px; | ||
margin-bottom:40px; | ||
} | ||
|
||
h2 { | ||
text-align: center; | ||
font-weight: 300; | ||
font-size: 25px; | ||
} | ||
|
||
button{ | ||
margin: 0px 10px; | ||
font-size: 16px; | ||
|
||
md-icon{ | ||
font-size: 16px; | ||
line-height: 22px; | ||
margin-right: 5px; | ||
} | ||
} | ||
|
||
md-list{ | ||
width: 100%; | ||
margin:0 auto; | ||
|
||
md-list-item{ | ||
width: 100%; | ||
margin-bottom:30px; | ||
|
||
&.error{ | ||
margin-bottom: 10px; | ||
font-size: 16px; | ||
|
||
md-icon{ | ||
color: mat-color($tuxlab-app-warn); | ||
margin-right: 6px; | ||
} | ||
} | ||
|
||
md-input-container{ | ||
width: 80%; | ||
font-size: 22px; | ||
|
||
margin: 0 auto; | ||
|
||
span[mdPrefix]{ | ||
font-size: 14px; | ||
line-height: 22px; | ||
|
||
margin-right: 15px; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
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 @@ | ||
// Meteor Imports | ||
import { Meteor } from 'meteor/meteor'; | ||
import { MeteorComponent } from 'angular2-meteor'; | ||
|
||
// Angular Imports | ||
import { Component, ActivatedRoute } from '@angular/core'; | ||
|
||
// Define Dashboard Component | ||
import template from "./reset.component.html"; | ||
import style from "./reset.component.scss"; | ||
|
||
@Component({ | ||
selector: 'tuxlab-reset', | ||
template, | ||
styles: [ style ] | ||
}) | ||
|
||
// Export Dashboard Class | ||
export default class Reset extends MeteorComponent { | ||
private token : string; | ||
|
||
constructor(private route: ActivatedRoute) { | ||
super(); | ||
} | ||
|
||
ngOnInit(){ | ||
|
||
// Get Token | ||
this.route.queryParamMap | ||
.map(params => params.get('token') || '') | ||
.subscribe((token) => { | ||
this.token = token; | ||
}) | ||
} | ||
} |
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
Oops, something went wrong.