- ) : null}
+
+
{content}
{authenticated ? : null}
diff --git a/scm-ui/ui-webapp/src/containers/HeaderActions.tsx b/scm-ui/ui-webapp/src/containers/HeaderActions.tsx
new file mode 100644
index 0000000000..b61d525293
--- /dev/null
+++ b/scm-ui/ui-webapp/src/containers/HeaderActions.tsx
@@ -0,0 +1,46 @@
+/*
+ * MIT License
+ *
+ * Copyright (c) 2020-present Cloudogu GmbH and Contributors
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+import React, { FC } from "react";
+import Notifications from "./Notifications";
+import LogoutButton from "./LogoutButton";
+import { Links } from "@scm-manager/ui-types";
+import LoginButton from "./LoginButton";
+
+type Props = {
+ burgerMode: boolean;
+ links: Links;
+};
+
+const HeaderActions: FC = ({ burgerMode, links }) => {
+ return (
+ <>
+ {!burgerMode ? : null}
+
+
+ >
+ );
+};
+
+export default HeaderActions;
diff --git a/scm-ui/ui-webapp/src/containers/LoginButton.tsx b/scm-ui/ui-webapp/src/containers/LoginButton.tsx
new file mode 100644
index 0000000000..7f06db738d
--- /dev/null
+++ b/scm-ui/ui-webapp/src/containers/LoginButton.tsx
@@ -0,0 +1,86 @@
+/*
+ * MIT License
+ *
+ * Copyright (c) 2020-present Cloudogu GmbH and Contributors
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+import React, { FC } from "react";
+import { devices, Icon } from "@scm-manager/ui-components";
+import { binder, ExtensionPoint } from "@scm-manager/ui-extensions";
+import { useTranslation } from "react-i18next";
+import { Links } from "@scm-manager/ui-types";
+import classNames from "classnames";
+import { useHistory } from "react-router-dom";
+import styled from "styled-components";
+
+type Props = {
+ className?: string;
+ links?: Links;
+ burgerMode: boolean;
+};
+
+const StyledLogoutButton = styled.div`
+ @media screen and (max-width: ${devices.desktop.width}px) {
+ border-top: 1px solid white;
+ margin-top: 1rem;
+ padding-top: 1rem;
+ padding-bottom: 1rem;
+ }
+
+ @media screen and (min-width: ${devices.desktop.width}px) {
+ margin-left: 2rem;
+ }
+`;
+
+const LoginButton: FC = ({ burgerMode, links, className }) => {
+ const [t] = useTranslation("commons");
+ const history = useHistory();
+
+ const extensionProps = {
+ links,
+ label: t("primary-navigation.login"),
+ };
+
+ if (links?.login) {
+ if (binder.hasExtension("primary-navigation.login", extensionProps)) {
+ return ;
+ } else {
+ return (
+ history.push({ pathname: "/login" })}
+ className={classNames("is-align-items-center", "navbar-item", className)}
+ >
+
+ {" " + t("primary-navigation.login")}
+
+ );
+ }
+ }
+ return null;
+};
+
+export default LoginButton;
diff --git a/scm-ui/ui-webapp/src/containers/LogoutButton.tsx b/scm-ui/ui-webapp/src/containers/LogoutButton.tsx
new file mode 100644
index 0000000000..dcc600a6a5
--- /dev/null
+++ b/scm-ui/ui-webapp/src/containers/LogoutButton.tsx
@@ -0,0 +1,86 @@
+/*
+ * MIT License
+ *
+ * Copyright (c) 2020-present Cloudogu GmbH and Contributors
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+import React, { FC } from "react";
+import { devices, Icon } from "@scm-manager/ui-components";
+import { binder, ExtensionPoint } from "@scm-manager/ui-extensions";
+import { useTranslation } from "react-i18next";
+import { Links } from "@scm-manager/ui-types";
+import classNames from "classnames";
+import { useHistory } from "react-router-dom";
+import styled from "styled-components";
+
+type Props = {
+ className?: string;
+ links?: Links;
+ burgerMode: boolean;
+};
+
+const StyledLogoutButton = styled.div`
+ @media screen and (max-width: ${devices.desktop.width}px) {
+ border-top: 1px solid white;
+ margin-top: 1rem;
+ padding-top: 1rem;
+ padding-bottom: 1rem;
+ }
+
+ @media screen and (min-width: ${devices.desktop.width}px) {
+ margin-left: 2rem;
+ }
+`;
+
+const LogoutButton: FC = ({ burgerMode, links, className }) => {
+ const [t] = useTranslation("commons");
+ const history = useHistory();
+
+ const extensionProps = {
+ links,
+ label: t("primary-navigation.logout"),
+ };
+
+ if (links?.logout) {
+ if (binder.hasExtension("primary-navigation.logout", extensionProps)) {
+ return ;
+ } else {
+ return (
+ history.push({ pathname: "/logout" })}
+ className={classNames("is-align-items-center", "navbar-item", className)}
+ >
+
+ {" " + t("primary-navigation.logout")}
+
+ );
+ }
+ }
+ return null;
+};
+
+export default LogoutButton;
diff --git a/scm-ui/ui-webapp/src/containers/Main.tsx b/scm-ui/ui-webapp/src/containers/Main.tsx
index f8bf785922..5408d9da9d 100644
--- a/scm-ui/ui-webapp/src/containers/Main.tsx
+++ b/scm-ui/ui-webapp/src/containers/Main.tsx
@@ -48,6 +48,7 @@ import Profile from "./Profile";
import NamespaceRoot from "../repos/namespaces/containers/NamespaceRoot";
import ImportLog from "../repos/importlog/ImportLog";
import CreateRepositoryRoot from "../repos/containers/CreateRepositoryRoot";
+import styled from "styled-components";
type Props = {
me: Me;
@@ -55,6 +56,14 @@ type Props = {
links: Links;
};
+type StyledMainProps = {
+ isSmallHeader: boolean;
+};
+
+const StyledMain = styled.div.attrs((props) => ({}))`
+ min-height: calc(100vh - ${(props) => (props.isSmallHeader ? 250 : 210)}px);
+`;
+
class Main extends React.Component {
render() {
const { authenticated, me, links } = this.props;
@@ -71,7 +80,7 @@ class Main extends React.Component {
}
return (
-
+
@@ -103,11 +112,11 @@ class Main extends React.Component {
props={{
me,
links,
- authenticated
+ authenticated,
}}
/>
-
+
);
}
diff --git a/scm-ui/ui-webapp/src/containers/NavigationBar.tsx b/scm-ui/ui-webapp/src/containers/NavigationBar.tsx
new file mode 100644
index 0000000000..e9f09911dc
--- /dev/null
+++ b/scm-ui/ui-webapp/src/containers/NavigationBar.tsx
@@ -0,0 +1,144 @@
+/*
+ * MIT License
+ *
+ * Copyright (c) 2020-present Cloudogu GmbH and Contributors
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+import React, { FC, useEffect, useState } from "react";
+import { Links } from "@scm-manager/ui-types";
+import classNames from "classnames";
+import styled from "styled-components";
+import { devices, Logo, PrimaryNavigation } from "@scm-manager/ui-components";
+import HeaderActions from "./HeaderActions";
+import Notifications from "./Notifications";
+
+const StyledMenuBar = styled.div`
+ background-color: transparent !important;
+`;
+
+const LogoItem = styled.a`
+ cursor: default !important;
+`;
+
+const StyledNavBar = styled.nav`
+ @media screen and (min-width: ${devices.desktop.width - 1}px) {
+ .navbar-burger-actions {
+ display: none;
+ }
+ }
+
+ .navbar-start .navbar-item {
+ border-bottom: solid 5px transparent;
+ &.is-active {
+ border-bottom: solid 5px #28b1e8;
+ }
+ }
+
+ .navbar-menu.is-active .navbar-start .navbar-item {
+ border-bottom: none;
+ border-left: solid 5px transparent;
+ &.is-active {
+ border-left: solid 5px #28b1e8;
+ }
+ }
+
+ .navbar-menu {
+ padding: 0;
+ }
+
+ .navbar-brand {
+ @media screen and (max-width: ${devices.desktop.width - 1}px) {
+ border-bottom: 1px solid white;
+ }
+ }
+
+ .navbar-menu.is-active .navbar-end .navbar-item {
+ border-left: solid 5px transparent;
+ }
+
+ .navbar-burger {
+ color: #fff !important;
+ }
+
+ .navbar-item {
+ :hover:not(.logo) {
+ background-color: rgba(10, 10, 10, 0.1) !important;
+ color: #fff;
+ }
+ color: #fff !important;
+ background-color: transparent !important;
+ }
+ color: #fff;
+ background-color: transparent !important;
+`;
+
+type Props = {
+ links: Links;
+};
+
+const BurgerActionBar: FC = () => (
+