-
- Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
-
-
- Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
-
- Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
-
-
- >
- );
-};
+const GroupEntries: FC = ({ namespaceHeader, elements, collapsed, onCollapsedChange }) => (
+
+ {elements}
+
+);
export default GroupEntries;
diff --git a/scm-ui/ui-components/src/layout/GroupEntry.stories.tsx b/scm-ui/ui-components/src/layout/GroupEntry.stories.tsx
deleted file mode 100644
index c5ed3a9e2c..0000000000
--- a/scm-ui/ui-components/src/layout/GroupEntry.stories.tsx
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * 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 Icon from "../Icon";
-import { storiesOf } from "@storybook/react";
-import { MemoryRouter } from "react-router-dom";
-import React from "react";
-import GroupEntry from "./GroupEntry";
-import { Button, ButtonGroup } from "../buttons";
-import copyToClipboard from "../CopyToClipboard";
-
-const link = "/foo/bar";
-const avatar = ;
-const name = main content;
-const description = more text;
-const longName = (
-
- Very-important-repository-with-a-particular-long-but-easily-rememberable-name-which-also-is-written-in-kebab-case
-
-);
-const contentRight = (
-
-
-);
-
-storiesOf("GroupEntry", module)
- .addDecorator((story) => {story()})
- .addDecorator((storyFn) =>
{storyFn()}
)
- .add("Default", () => (
-
- ))
- .add("With long texts", () => (
-
- Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et
- dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet
- clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet,
- consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,
- sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea
- takimata sanctus est Lorem ipsum dolor sit amet.
-
- }
- contentRight={contentRight}
- />
- ));
diff --git a/scm-ui/ui-components/src/layout/GroupEntry.tsx b/scm-ui/ui-components/src/layout/GroupEntry.tsx
deleted file mode 100644
index 673e4e777d..0000000000
--- a/scm-ui/ui-components/src/layout/GroupEntry.tsx
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * 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, ReactNode } from "react";
-import { Link } from "react-router-dom";
-import classNames from "classnames";
-import styled from "styled-components";
-import { useTranslation } from "react-i18next";
-import { useKeyboardIteratorTarget } from "@scm-manager/ui-shortcuts";
-
-const StyledGroupEntry = styled.div`
- max-height: calc(90px - 1.5rem);
- width: 100%;
- pointer-events: all;
-`;
-
-const OverlayLink = styled(Link)`
- width: 100%;
- position: absolute;
- height: calc(90px - 1.5rem);
- pointer-events: all;
- border-radius: 4px;
- :hover {
- cursor: pointer;
- }
-`;
-
-const Avatar = styled.div`
- .predefined-avatar {
- height: 48px;
- width: 48px;
- font-size: 1.75rem;
- }
-`;
-
-const Description = styled.p`
- height: 1.5rem;
- text-overflow: ellipsis;
- overflow-x: hidden;
- overflow-y: visible;
- white-space: nowrap;
- word-break: break-all;
-`;
-
-const ContentLeft = styled.div`
- min-width: 0;
-`;
-
-const ContentRight = styled.div`
- pointer-events: all;
- margin-bottom: -10px;
-`;
-
-type Props = {
- title?: string;
- avatar: string | ReactNode;
- name: string | ReactNode;
- description?: string | ReactNode;
- contentRight?: ReactNode;
- link: string;
- ariaLabel?: string;
-};
-
-const GroupEntry: FC = ({ link, avatar, title, name, description, contentRight, ariaLabel }) => {
- const [t] = useTranslation("repos");
- const ref = useKeyboardIteratorTarget();
- return (
-
-
-
-
- {avatar}
-
-
{name}
- {description}
-
-
-
- {contentRight}
-
-
-
- );
-};
-
-export default GroupEntry;
diff --git a/scm-ui/ui-components/src/layout/NamespaceEntries.tsx b/scm-ui/ui-components/src/layout/NamespaceEntries.tsx
new file mode 100644
index 0000000000..9f94b0ba2a
--- /dev/null
+++ b/scm-ui/ui-components/src/layout/NamespaceEntries.tsx
@@ -0,0 +1,66 @@
+/*
+ * 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, ReactNode } from "react";
+import { useTranslation } from "react-i18next";
+import { useLocalStorage } from "@scm-manager/ui-api";
+import { CardList, Collapsible } from "@scm-manager/ui-layout";
+import { RepositoryGroup } from "@scm-manager/ui-types";
+import { Link } from "react-router-dom";
+import { Icon } from "../index";
+
+type Props = {
+ elements: ReactNode[];
+ group: RepositoryGroup;
+};
+
+const DefaultGroupHeader: FC<{ group: RepositoryGroup }> = ({ group }) => {
+ const [t] = useTranslation("namespaces");
+ return (
+ <>
+
+
{group.name}
+ {" "}
+
+
+
+ >
+ );
+};
+
+const NamespaceEntries: FC = ({ elements, group }) => {
+ const [collapsed, setCollapsed] = useLocalStorage(`repoNamespace.${group.name}.collapsed`, null);
+
+ return (
+ }
+ >
+ {elements}
+
+ );
+};
+
+export default NamespaceEntries;
diff --git a/scm-ui/ui-components/src/layout/index.ts b/scm-ui/ui-components/src/layout/index.ts
index 8c30900e47..40eb038873 100644
--- a/scm-ui/ui-components/src/layout/index.ts
+++ b/scm-ui/ui-components/src/layout/index.ts
@@ -36,3 +36,4 @@ export { default as CustomQueryFlexWrappedColumns } from "./CustomQueryFlexWrapp
export { default as PrimaryContentColumn } from "./PrimaryContentColumn";
export { default as SecondaryNavigationColumn } from "./SecondaryNavigationColumn";
export { default as GroupEntries } from "./GroupEntries";
+export { default as NamespaceEntries } from "./NamespaceEntries";
diff --git a/scm-ui/ui-components/src/repos/RepositoryEntry.tsx b/scm-ui/ui-components/src/repos/RepositoryEntry.tsx
index 7ffb427e9d..2d3205795f 100644
--- a/scm-ui/ui-components/src/repos/RepositoryEntry.tsx
+++ b/scm-ui/ui-components/src/repos/RepositoryEntry.tsx
@@ -21,18 +21,19 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-import React, { FC, useState } from "react";
+import React, { FC } from "react";
import { Repository } from "@scm-manager/ui-types";
-import { DateFromNow, Modal } from "@scm-manager/ui-components";
+import { DateFromNow } from "@scm-manager/ui-components";
import RepositoryAvatar from "./RepositoryAvatar";
-import { binder, ExtensionPoint, extensionPoints } from "@scm-manager/ui-extensions";
-import GroupEntry from "../layout/GroupEntry";
+import { ExtensionPoint, extensionPoints } from "@scm-manager/ui-extensions";
import RepositoryFlags from "./RepositoryFlags";
import styled from "styled-components";
-import Icon from "../Icon";
import { useTranslation } from "react-i18next";
-import classNames from "classnames";
-import { EXTENSION_POINT } from "../avatar/Avatar";
+import { useKeyboardIteratorTarget } from "@scm-manager/ui-shortcuts";
+import { Card } from "@scm-manager/ui-layout";
+import { Link } from "react-router-dom";
+import { Menu } from "@scm-manager/ui-overlays";
+import { Icon } from "@scm-manager/ui-buttons";
type DateProp = Date | string;
@@ -43,125 +44,97 @@ type Props = {
baseDate?: DateProp;
};
-const ContentRightContainer = styled.div`
- height: calc(80px - 1.5rem);
+const Avatar = styled.div`
+ .predefined-avatar {
+ height: 48px;
+ width: 48px;
+ font-size: 1.75rem;
+ }
`;
-const QuickAction = styled(Icon)`
- margin-top: 0.2rem;
+const StyledLink = styled(Link)`
+ overflow-wrap: anywhere;
`;
-const ContactAvatar = styled.img`
- max-width: 20px;
-`;
-
-const ContactActionWrapper = styled.a`
- height: 20px;
- width: 20px;
- padding-right: 2rem;
-`;
-
-const Name = styled.strong`
+const DescriptionRow = styled(Card.Row)`
+ text-wrap: nowrap;
+ overflow: hidden;
text-overflow: ellipsis;
- overflow-x: hidden;
- overflow-y: visible;
- white-space: nowrap;
+`;
+
+const DetailsRow = styled(Card.Row)`
+ gap: 0.5rem;
`;
const RepositoryEntry: FC = ({ repository, baseDate }) => {
const [t] = useTranslation("repos");
- const [openCloneModal, setOpenCloneModal] = useState(false);
+ const ref = useKeyboardIteratorTarget();
- const avatarFactory = binder.getExtension(EXTENSION_POINT);
-
- const renderContactIcon = () => {
- if (avatarFactory) {
- return (
-
- );
- }
- return ;
- };
-
- const createContentRight = () => (
-
- {openCloneModal && (
-
- name="repos.repository-details.information"
- renderAll={true}
- props={{
- repository
- }}
- />
- }
- closeFunction={() => setOpenCloneModal(false)}
- />
- )}
-
- {repository.contact ? (
-
- {renderContactIcon()}
-
- ) : null}
- setOpenCloneModal(true)}
- title={t("overview.clone")}
- />
-
-
-
-
-
+ const actions = () => (
+
);
const repositoryLink = `/repo/${repository.namespace}/${repository.name}/`;
- const actions = createContentRight();
- const name = (
-