Some navbar fixes.
This commit is contained in:
parent
fa0b0b68ca
commit
de63ff6d2a
1 changed files with 47 additions and 43 deletions
16
ui/src/components/navbar.tsx
vendored
16
ui/src/components/navbar.tsx
vendored
|
@ -12,7 +12,6 @@ import {
|
||||||
GetPrivateMessagesForm,
|
GetPrivateMessagesForm,
|
||||||
PrivateMessagesResponse,
|
PrivateMessagesResponse,
|
||||||
SortType,
|
SortType,
|
||||||
SearchType,
|
|
||||||
GetSiteResponse,
|
GetSiteResponse,
|
||||||
Comment,
|
Comment,
|
||||||
CommentResponse,
|
CommentResponse,
|
||||||
|
@ -20,7 +19,6 @@ import {
|
||||||
UserView,
|
UserView,
|
||||||
PrivateMessageResponse,
|
PrivateMessageResponse,
|
||||||
WebSocketJsonResponse,
|
WebSocketJsonResponse,
|
||||||
SearchForm,
|
|
||||||
} from '../interfaces';
|
} from '../interfaces';
|
||||||
import {
|
import {
|
||||||
wsJsonToRes,
|
wsJsonToRes,
|
||||||
|
@ -183,7 +181,7 @@ export class Navbar extends Component<any, NavbarState> {
|
||||||
<div
|
<div
|
||||||
className={`${!this.state.expanded && 'collapse'} navbar-collapse`}
|
className={`${!this.state.expanded && 'collapse'} navbar-collapse`}
|
||||||
>
|
>
|
||||||
<ul class="navbar-nav mr-auto">
|
<ul class="navbar-nav my-2 mr-auto">
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<Link
|
<Link
|
||||||
class="nav-link"
|
class="nav-link"
|
||||||
|
@ -229,7 +227,6 @@ export class Navbar extends Component<any, NavbarState> {
|
||||||
{!this.context.router.history.location.pathname.match(
|
{!this.context.router.history.location.pathname.match(
|
||||||
/^\/search/
|
/^\/search/
|
||||||
) && (
|
) && (
|
||||||
<div class="nav-item my-2">
|
|
||||||
<form
|
<form
|
||||||
class="form-inline"
|
class="form-inline"
|
||||||
onSubmit={linkEvent(this, this.handleSearchSubmit)}
|
onSubmit={linkEvent(this, this.handleSearchSubmit)}
|
||||||
|
@ -256,7 +253,6 @@ export class Navbar extends Component<any, NavbarState> {
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
)}
|
)}
|
||||||
<ul class="navbar-nav my-2">
|
<ul class="navbar-nav my-2">
|
||||||
{this.canAdmin && (
|
{this.canAdmin && (
|
||||||
|
@ -272,8 +268,10 @@ export class Navbar extends Component<any, NavbarState> {
|
||||||
</Link>
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
)}
|
)}
|
||||||
|
</ul>
|
||||||
{this.state.isLoggedIn ? (
|
{this.state.isLoggedIn ? (
|
||||||
<>
|
<>
|
||||||
|
<ul class="navbar-nav my-2">
|
||||||
<li className="nav-item">
|
<li className="nav-item">
|
||||||
<Link class="nav-link" to="/inbox" title={i18n.t('inbox')}>
|
<Link class="nav-link" to="/inbox" title={i18n.t('inbox')}>
|
||||||
<svg class="icon">
|
<svg class="icon">
|
||||||
|
@ -286,6 +284,8 @@ export class Navbar extends Component<any, NavbarState> {
|
||||||
)}
|
)}
|
||||||
</Link>
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul class="navbar-nav">
|
||||||
<li className="nav-item">
|
<li className="nav-item">
|
||||||
<Link
|
<Link
|
||||||
class="nav-link"
|
class="nav-link"
|
||||||
|
@ -307,8 +307,11 @@ export class Navbar extends Component<any, NavbarState> {
|
||||||
</span>
|
</span>
|
||||||
</Link>
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
|
</ul>
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
|
<ul class="navbar-nav my-2">
|
||||||
|
<li className="nav-item">
|
||||||
<Link
|
<Link
|
||||||
class="nav-link"
|
class="nav-link"
|
||||||
to="/login"
|
to="/login"
|
||||||
|
@ -316,8 +319,9 @@ export class Navbar extends Component<any, NavbarState> {
|
||||||
>
|
>
|
||||||
{i18n.t('login_sign_up')}
|
{i18n.t('login_sign_up')}
|
||||||
</Link>
|
</Link>
|
||||||
)}
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue