-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
28 changed files
with
342 additions
and
219 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,10 @@ | |
<ion-split-pane contentId="main-content"> | ||
<ion-menu contentId="main-content" type="overlay"> | ||
<ion-content> | ||
<ion-list id="inbox-list"> | ||
<ion-list-header>Inbox</ion-list-header> | ||
<ion-note>[email protected]</ion-note> | ||
<ion-list> | ||
<ion-list-header class="hero-header"> | ||
Eat Oats, Nerd | ||
</ion-list-header> | ||
|
||
<ion-menu-toggle auto-hide="false" *ngFor="let p of appPages; let i = index"> | ||
<ion-item routerDirection="root" [routerLink]="[p.url]" lines="none" detail="false" routerLinkActive="selected"> | ||
|
@@ -13,15 +14,6 @@ | |
</ion-item> | ||
</ion-menu-toggle> | ||
</ion-list> | ||
|
||
<ion-list id="labels-list"> | ||
<ion-list-header>Labels</ion-list-header> | ||
|
||
<ion-item *ngFor="let label of labels" lines="none"> | ||
<ion-icon aria-hidden="true" slot="start" ios="bookmark-outline" md="bookmark-sharp"></ion-icon> | ||
<ion-label>{{ label }}</ion-label> | ||
</ion-item> | ||
</ion-list> | ||
</ion-content> | ||
</ion-menu> | ||
<ion-router-outlet id="main-content"></ion-router-outlet> | ||
|
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 |
---|---|---|
@@ -1,119 +1,4 @@ | ||
ion-menu ion-content { | ||
--background: var(--ion-item-background, var(--ion-background-color, #fff)); | ||
} | ||
|
||
ion-menu.md ion-content { | ||
--padding-start: 8px; | ||
--padding-end: 8px; | ||
--padding-top: 20px; | ||
--padding-bottom: 20px; | ||
} | ||
|
||
ion-menu.md ion-list { | ||
padding: 20px 0; | ||
} | ||
|
||
ion-menu.md ion-note { | ||
margin-bottom: 30px; | ||
} | ||
|
||
ion-menu.md ion-list-header, | ||
ion-menu.md ion-note { | ||
padding-left: 10px; | ||
} | ||
|
||
ion-menu.md ion-list#inbox-list { | ||
border-bottom: 1px solid var(--ion-color-step-150, #d7d8da); | ||
} | ||
|
||
ion-menu.md ion-list#inbox-list ion-list-header { | ||
font-size: 22px; | ||
font-weight: 600; | ||
|
||
min-height: 20px; | ||
} | ||
|
||
ion-menu.md ion-list#labels-list ion-list-header { | ||
font-size: 16px; | ||
|
||
margin-bottom: 18px; | ||
|
||
color: #757575; | ||
|
||
min-height: 26px; | ||
} | ||
|
||
ion-menu.md ion-item { | ||
--padding-start: 10px; | ||
--padding-end: 10px; | ||
border-radius: 4px; | ||
} | ||
|
||
ion-menu.md ion-item.selected { | ||
--background: rgba(var(--ion-color-primary-rgb), 0.14); | ||
} | ||
|
||
ion-menu.md ion-item.selected ion-icon { | ||
color: var(--ion-color-primary); | ||
} | ||
|
||
ion-menu.md ion-item ion-icon { | ||
color: #616e7e; | ||
.hero-header { | ||
min-height: 300px; | ||
} | ||
|
||
ion-menu.md ion-item ion-label { | ||
font-weight: 500; | ||
} | ||
|
||
ion-menu.ios ion-content { | ||
--padding-bottom: 20px; | ||
} | ||
|
||
ion-menu.ios ion-list { | ||
padding: 20px 0 0 0; | ||
} | ||
|
||
ion-menu.ios ion-note { | ||
line-height: 24px; | ||
margin-bottom: 20px; | ||
} | ||
|
||
ion-menu.ios ion-item { | ||
--padding-start: 16px; | ||
--padding-end: 16px; | ||
--min-height: 50px; | ||
} | ||
|
||
ion-menu.ios ion-item.selected ion-icon { | ||
color: var(--ion-color-primary); | ||
} | ||
|
||
ion-menu.ios ion-item ion-icon { | ||
font-size: 24px; | ||
color: #73849a; | ||
} | ||
|
||
ion-menu.ios ion-list#labels-list ion-list-header { | ||
margin-bottom: 8px; | ||
} | ||
|
||
ion-menu.ios ion-list-header, | ||
ion-menu.ios ion-note { | ||
padding-left: 16px; | ||
padding-right: 16px; | ||
} | ||
|
||
ion-menu.ios ion-note { | ||
margin-bottom: 8px; | ||
} | ||
|
||
ion-note { | ||
display: inline-block; | ||
font-size: 16px; | ||
|
||
color: var(--ion-color-medium-shade); | ||
} | ||
|
||
ion-item.selected { | ||
--color: var(--ion-color-primary); | ||
} |
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 |
---|---|---|
@@ -1,18 +1,24 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
interface IMenuItem { | ||
title: string; | ||
url: string; | ||
icon: string; | ||
} | ||
|
||
@Component({ | ||
selector: 'app-root', | ||
templateUrl: 'app.component.html', | ||
styleUrls: ['app.component.scss'], | ||
}) | ||
export class AppComponent { | ||
public appPages = [ | ||
{ title: 'Inbox', url: '/folder/inbox', icon: 'mail' }, | ||
{ title: 'Outbox', url: '/folder/outbox', icon: 'paper-plane' }, | ||
{ title: 'Favorites', url: '/folder/favorites', icon: 'heart' }, | ||
{ title: 'Archived', url: '/folder/archived', icon: 'archive' }, | ||
{ title: 'Trash', url: '/folder/trash', icon: 'trash' }, | ||
{ title: 'Spam', url: '/folder/spam', icon: 'warning' }, | ||
public appPages: IMenuItem[] = [ | ||
{ | ||
title: 'Home', | ||
url: '', | ||
icon: 'home' | ||
} | ||
]; | ||
public labels = ['Family', 'Friends', 'Notes', 'Work', 'Travel', 'Reminders']; | ||
|
||
constructor() {} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { Injectable } from '@angular/core'; | ||
import { Router } from '@angular/router'; | ||
import { AuthService } from './auth.service'; | ||
|
||
@Injectable({ | ||
providedIn: 'root' | ||
}) | ||
export class AuthGuard { | ||
constructor(public auth: AuthService, public router: Router) {} | ||
|
||
canActivate(): boolean { | ||
if (!this.auth.isAuthenticated()) { | ||
this.router.navigate(['login']); | ||
return false; | ||
} | ||
|
||
return true; | ||
} | ||
} |
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,23 @@ | ||
import { Injectable } from '@angular/core'; | ||
import { JwtHelperService } from '@auth0/angular-jwt'; | ||
|
||
@Injectable({ | ||
providedIn: 'root' | ||
}) | ||
export class AuthService { | ||
|
||
constructor(public jwtHelper: JwtHelperService) { } | ||
|
||
public isAuthenticated(): boolean { | ||
const token = localStorage.getItem('token'); | ||
return !this.jwtHelper.isTokenExpired(token); | ||
} | ||
|
||
public login(email: string, password: string): void { | ||
|
||
} | ||
|
||
public register(email: string, password: string, username: string): void { | ||
|
||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.