Skip to content
This repository has been archived by the owner on Oct 8, 2020. It is now read-only.

Account link in navbar changed layout #112

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 21 additions & 30 deletions src/components/Navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ class Navigation extends Component {
</ul>
<ul className="navbar-nav navbar-right">
<li className="nav-item dropdown navbar-right">
<a className="nav-link dropdown-toggle dropdown-menu-right " data-toggle="dropdown" href="javascript:;">{activeLanguage.toUpperCase()}</a>
<div className="dropdown-menu">
<a className="nav-link dropdown-toggle" data-toggle="dropdown" href="javascript:;">{activeLanguage.toUpperCase()}</a>
<div className="dropdown-menu dropdown-menu-right">
{
Object.keys(languages).map(language => (
<a key={language}
Expand All @@ -64,38 +64,29 @@ class Navigation extends Component {
{
account.isLoggedIn
?
<li className="nav-item">
<div className="btn-group ml-2">
<Link className="btn btn-secondary btn-sm mt-1" to="/account">
<i className="fa fa-user mr-2"/>
{tu("account")}
<li className="nav-item dropdown navbar-right">
<a className="nav-link dropdown-toggle dropdown-menu-left" data-toggle="dropdown" href="javascript:;">{tu("account")}</a>
<div className="dropdown-menu dropdown-menu-right">
<Link className="dropdown-item" to="/account">
<span className="align-middle">{tu("account")}</span>
</Link>
<button type="button" className="btn btn-sm btn-secondary btn-sm mt-1 dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span className="sr-only">Toggle Dropdown</span>
</button>
<div className="dropdown-menu">
<Link className="dropdown-item" to="/account/votes">
<i className="fa fa-clipboard-check mr-2"/>
{tu("votes")}
</Link>
<Link className="dropdown-item" to="/account/apply-for-delegate">
<i className="fa fa-briefcase mr-2"/>
{tu("apply_for_delegate")}
</Link>
<div className="dropdown-divider"/>
<a className="dropdown-item" href="javascript:;" onClick={this.logout}>
<i className="fa fa-sign-out-alt mr-2"/>
{tu("sign_out")}
</a>
</div>
<Link className="dropdown-item" to="/account/votes">
{tu("votes")}
</Link>
<Link className="dropdown-item" to="/account/apply-for-delegate">
{tu("apply_for_delegate")}
</Link>
<div className="dropdown-divider"/>
<a className="dropdown-item" href="javascript:;" onClick={this.logout}>
{tu("sign_out")}
</a>
</div>
</li>
:
<li className="nav-item">
<Link className="btn btn-secondary btn-sm mt-1" to="/login">
<i className="fa fa-sign-in-alt mr-2" />
{tu("register_login")}
</Link>
<li class="nav-item">
<Link class="nav-link" to="/login">
{tu("register_login")}
</Link>
</li>
}
</ul>
Expand Down