forked from uwrit/leaf
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from uwcirg/feature/leaf-ui-updates-022325
Update Attestation content, add logout button
- Loading branch information
Showing
8 changed files
with
152 additions
and
60 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* Copyright (c) 2022, UW Medicine Research IT, University of Washington | ||
* Developed by Nic Dobbins and Cliff Spital, CRIO Sean Mooney | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
*/ | ||
|
||
import React from 'react'; | ||
import { NavItem } from 'reactstrap'; | ||
import { FaDoorOpen } from 'react-icons/fa'; | ||
import { AuthorizationState } from '../../models/state/AppState'; | ||
|
||
interface Props { | ||
auth?: AuthorizationState; | ||
logoutClickHandler: () => any; | ||
} | ||
|
||
export default class UserButton extends React.PureComponent<Props> { | ||
private className = 'header'; | ||
|
||
public render() { | ||
const c = this.className; | ||
const { auth, logoutClickHandler} = this.props; | ||
const authLogoutEnabled = auth && auth.config && auth.config.authentication.logout.enabled; | ||
if (!authLogoutEnabled) return null; | ||
return ( | ||
<NavItem className={`${c}-myleaf ${c}-item-dropdown ${c}-item-hover-dark`}> | ||
<div className={`${c}-myleaf-icon-container`} onClick={logoutClickHandler}> | ||
<FaDoorOpen className="header-options-icon header-myleaf-icon" /> | ||
<span className="header-options-text">Log Out</span> | ||
</div> | ||
</NavItem> | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.