mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-06-05 01:04:25 -04:00
imported current state of the mockup into the public repo
Co-authored-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Signed-off-by: Philip Molares <philip.molares@udo.edu> Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
This commit is contained in:
commit
93ce059577
161 changed files with 17419 additions and 0 deletions
|
@ -0,0 +1,50 @@
|
|||
import React from 'react'
|
||||
import {Navbar} from 'react-bootstrap';
|
||||
import {useSelector} from "react-redux";
|
||||
import {ApplicationState} from "../../../../../redux";
|
||||
import {NewUserNoteButton} from "../new-user-note-button";
|
||||
import {UserDropdown} from "../user-dropdown/user-dropdown";
|
||||
import {SignInButton} from "../sign-in-button";
|
||||
import {NewGuestNoteButton} from "../new-guest-note-button";
|
||||
import {LoginStatus} from "../../../../../redux/user/types";
|
||||
import {HeaderNavLink} from "../header-nav-link";
|
||||
import "./header-bar.scss";
|
||||
import {Trans, useTranslation} from "react-i18next";
|
||||
|
||||
const HeaderBar: React.FC = () => {
|
||||
useTranslation()
|
||||
const user = useSelector((state: ApplicationState) => state.user);
|
||||
|
||||
return (
|
||||
<Navbar className="justify-content-between">
|
||||
<div className="nav header-nav">
|
||||
<HeaderNavLink to="/intro">
|
||||
<Trans i18nKey="intro"/>
|
||||
</HeaderNavLink>
|
||||
<HeaderNavLink to="/history">
|
||||
<Trans i18nKey="history"/>
|
||||
</HeaderNavLink>
|
||||
</div>
|
||||
<div className="d-inline-flex">
|
||||
{user.status === LoginStatus.forbidden ?
|
||||
<>
|
||||
<span className={"mr-1"}>
|
||||
<NewGuestNoteButton/>
|
||||
</span>
|
||||
<SignInButton/>
|
||||
</>
|
||||
:
|
||||
<>
|
||||
<span className={"mr-1"}>
|
||||
<NewUserNoteButton/>
|
||||
</span>
|
||||
<UserDropdown/>
|
||||
</>
|
||||
}
|
||||
</div>
|
||||
</Navbar>
|
||||
);
|
||||
}
|
||||
|
||||
export {HeaderBar}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue