Skip to content

Commit

Permalink
create route for account management
Browse files Browse the repository at this point in the history
  • Loading branch information
chsakell committed Aug 3, 2019
1 parent 4c76f73 commit 1308134
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 6 deletions.
5 changes: 4 additions & 1 deletion AspNetCoreIdentity/ClientApp/app/app.shared.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { AddVideoComponent } from './components/streaming/add/add-video.componen
import { SocialApiShareComponent } from './components/socialapi/share.component';
import { OpenIdConnectService } from './core/openid-connect.service';
import { PasswordComponent } from './components/password/password.component';
import { AccountComponent } from './components/account/account.component';

@NgModule({
declarations: [
Expand All @@ -37,7 +38,8 @@ import { PasswordComponent } from './components/password/password.component';
AccessForbiddenComponent,
ManageComponent,
SocialApiShareComponent,
PasswordComponent
PasswordComponent,
AccountComponent
],
imports: [
CommonModule,
Expand All @@ -59,6 +61,7 @@ import { PasswordComponent } from './components/password/password.component';
{ path: 'manage/users', component: ManageComponent },
{ path: 'password', component: PasswordComponent },
{ path: 'share', component: SocialApiShareComponent },
{ path: 'manage/account', component: AccountComponent },
{ path: '**', redirectTo: 'home' }
])
],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<h1>Manage account!!</h1>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Component, Inject } from '@angular/core';
import { Http } from '@angular/http';

@Component({
selector: 'account',
templateUrl: './account.component.html',
styleUrls: ['./account.component.css']
})
export class AccountComponent {

constructor(public http: Http, @Inject('BASE_URL') public baseUrl: string) {

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,16 @@
<span class='glyphicon glyphicon-share'></span> Share
</a>
</li>
<li [routerLinkActive]="['link-active']" *ngIf="stateService.displayPassword()">
<a [routerLink]="['/password']">
<span class='glyphicon glyphicon-lock'></span> Set password
</a>
</li>
<li [routerLinkActive]="['link-active']" *ngIf="stateService.isAuthenticated()">
<a [routerLink]="['/manage/account']">
<span class='glyphicon glyphicon-edit'></span> Manage Account
</a>
</li>
<li [routerLinkActive]="['link-active']" *ngIf="stateService.isAuthenticated()">
<a (click)="logout()" class="logout">
<span class='glyphicon glyphicon-log-out'></span> Logout <i>({{stateService.username()}})</i>
Expand All @@ -70,11 +80,6 @@
<strong>{{stateService.getNotification().message}}</strong>
</div>
</li>
<li [routerLinkActive]="['link-active']" *ngIf="stateService.displayPassword()">
<a [routerLink]="['/password']">
<span class='glyphicon glyphicon-lock'></span> Set password
</a>
</li>
</ul>
</div>
</div>
Expand Down

0 comments on commit 1308134

Please sign in to comment.