Skip to content

Commit

Permalink
Fixes #4173
Browse files Browse the repository at this point in the history
Added the function to autoclose the sidenavigation when working on a mobile-device.
Removed unnecessary functions.

Resolved answers of pull-request

- Added myself to the AUTHORS-file
- Used square brackets for 'routerLink'
  • Loading branch information
GabrielInTheWorld committed Jan 29, 2019
1 parent cf5a5b4 commit d043133
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 16 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Expand Up @@ -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>
13 changes: 11 additions & 2 deletions client/src/app/site/site.component.html
Expand Up @@ -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>
Expand Down
14 changes: 0 additions & 14 deletions client/src/app/site/site.component.ts
Expand Up @@ -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
*/
Expand Down

0 comments on commit d043133

Please sign in to comment.