diff options
author | Dessalines <tyhou13@gmx.com> | 2019-10-29 20:35:39 -0700 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2019-10-29 20:35:39 -0700 |
commit | 9f35b33dc7238f0d6748beafa79ca0af192b5ca6 (patch) | |
tree | 9199b38cc553822d2e43eed2f5d3d7975d2b702a /ui/src/components/user.tsx | |
parent | 198b5f10dd18244744b6d82b93155a5c5b569bb9 (diff) |
Halfway done with email, not fully working yet.
Diffstat (limited to 'ui/src/components/user.tsx')
-rw-r--r-- | ui/src/components/user.tsx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ui/src/components/user.tsx b/ui/src/components/user.tsx index 3006afc4..361ce633 100644 --- a/ui/src/components/user.tsx +++ b/ui/src/components/user.tsx @@ -376,6 +376,14 @@ export class User extends Component<any, UserState> { </tr> </table> </div> + {this.isCurrentUser && ( + <button + class="btn btn-block btn-secondary mt-3" + onClick={linkEvent(this, this.handleLogoutClick)} + > + <T i18nKey="logout">#</T> + </button> + )} </div> </div> </div> @@ -693,6 +701,11 @@ export class User extends Component<any, UserState> { i.setState(i.state); } + handleLogoutClick(i: User) { + UserService.Instance.logout(); + i.context.router.history.push('/'); + } + handleDeleteAccount(i: User, event: any) { event.preventDefault(); i.state.deleteAccountLoading = true; |