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>
Jochen Saalfeld <jochen.saalfeld@intevation.de>
Fadi Abbud <fmfn13@hotmail.com>
Gabriel Meyer <meyergabriel@live.de>

View File

@ -29,11 +29,20 @@
<span> {{ getLangName(this.translate.currentLang) }} </span>
</a>
<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>
<span translate>Edit profile</span>
</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>
<span translate>Change password</span>
</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
*/