Skip to content

Commit

Permalink
Align the user info section to upper right
Browse files Browse the repository at this point in the history
  • Loading branch information
ligangty committed Nov 23, 2023
1 parent 4232527 commit 54fa187
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions src/main/webui/src/app/components/nav/NavHeader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default function NavHeader(){
<nav className="navbar fixed-top navbar-expand-lg navbar-light bg-light" role="navigation">
<Link className="navbar-brand" to="">Indy</Link>
<div className="collapse navbar-collapse" id="navbarSupportedContent">
<ul className="navbar-nav mr-auto">
<ul className="navbar-nav me-auto">
{
[
{type: "remote", desc: "Remote Repositories"},
Expand All @@ -52,7 +52,7 @@ export default function NavHeader(){
<Button href="/q/swagger-ui/" variant="secondary" className="mx-1">REST API</Button>
<Dropdown data-bs-theme="dark" className="mx-1">
<Dropdown.Toggle id={`dropdown-button-dark-addons`} variant="secondary">
more
More
</Dropdown.Toggle>
<Dropdown.Menu>
<LinkContainer to="/nfc">
Expand All @@ -63,16 +63,18 @@ export default function NavHeader(){
</LinkContainer>
</Dropdown.Menu>
</Dropdown>
{ isUserloggedIn && <Dropdown data-bs-theme="dark" className="mx-1">
<Dropdown.Toggle id={`dropdown-button-dark-addons`} variant="link">
{username}
</Dropdown.Toggle>
<Dropdown.Menu>
<Dropdown.Item href="/logout" variant="link">Log Out</Dropdown.Item>
</Dropdown.Menu>
</Dropdown>
</ul>
{ isUserloggedIn && <ul className="navbar-nav ms-auto">
<Dropdown data-bs-theme="dark" className="mx-1">
<Dropdown.Toggle id={`dropdown-button-dark-addons`} variant="link">
{username}
</Dropdown.Toggle>
<Dropdown.Menu>
<Dropdown.Item href="/logout" variant="link">Log Out</Dropdown.Item>
</Dropdown.Menu>
</Dropdown>
</ul>
}
</ul>
</div>
</nav>
);
Expand Down

0 comments on commit 54fa187

Please sign in to comment.