Merge pull request #4176 from GabrielInTheWorld/fix-close-sidenav

Fixes #4173
This commit is contained in:
Sean 2019-01-29 11:04:01 +01:00 committed by GitHub
commit 2d0eab9b20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 16 deletions

View File

@ -29,3 +29,4 @@ Authors of OpenSlides in chronological order of first contribution:
Raimund Renkert <raimund@renkert.org> Raimund Renkert <raimund@renkert.org>
Jochen Saalfeld <jochen.saalfeld@intevation.de> Jochen Saalfeld <jochen.saalfeld@intevation.de>
Fadi Abbud <fmfn13@hotmail.com> Fadi Abbud <fmfn13@hotmail.com>
Gabriel Meyer <meyergabriel@live.de>

View File

@ -29,11 +29,20 @@
<span> {{ getLangName(this.translate.currentLang) }} </span> <span> {{ getLangName(this.translate.currentLang) }} </span>
</a> </a>
<div *ngIf="isLoggedIn"> <div *ngIf="isLoggedIn">
<a (click)="editProfile()" mat-list-item> <a
[routerLink]="['/users/', operator.user.id]"
(click)="mobileAutoCloseNav()"
mat-list-item
>
<mat-icon>person</mat-icon> <mat-icon>person</mat-icon>
<span translate>Edit profile</span> <span translate>Edit profile</span>
</a> </a>
<a *osPerms="'users.can_change_password'" (click)="changePassword()" mat-list-item> <a
*osPerms="'users.can_change_password'"
routerLink="/users/password"
(click)="mobileAutoCloseNav()"
mat-list-item
>
<mat-icon>vpn_key</mat-icon> <mat-icon>vpn_key</mat-icon>
<span translate>Change password</span> <span translate>Change password</span>
</a> </a>

View File

@ -150,20 +150,6 @@ export class SiteComponent extends BaseComponent implements OnInit {
} }
} }
// TODO: Implement this
public editProfile(): void {
if (this.operator.user) {
this.router.navigate([`./users/${this.operator.user.id}`]);
}
}
/**
* Redirects to the change password component
*/
public changePassword(): void {
this.router.navigate([`./users/password`]);
}
/** /**
* Function to log out the current user * Function to log out the current user
*/ */