diff --git a/scm-ui/ui-api/src/changesets.ts b/scm-ui/ui-api/src/changesets.ts index 3a336390f7..ba1a758686 100644 --- a/scm-ui/ui-api/src/changesets.ts +++ b/scm-ui/ui-api/src/changesets.ts @@ -56,11 +56,11 @@ export const useChangesets = ( if (request?.page || request?.limit) { if (request?.page && request?.limit) { - link = `${link}?page=${request.page}&limit=${request.limit}`; + link = `${link}?page=${request.page}&pageSize=${request.limit}`; } else if (request.page) { link = `${link}?page=${request.page}`; } else if (request.limit) { - link = `${link}?limit=${request.limit}`; + link = `${link}?pageSize=${request.limit}`; } } diff --git a/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap b/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap index 5efd3a928d..9a7baae1ad 100644 --- a/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap +++ b/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap @@ -20765,7 +20765,7 @@ exports[`Storyshots Repositories/Changesets Co-Authors with avatar 1`] = ` className="media-left mt-2 mr-2" >
SCM Administrator

SCM Administrator

SCM Administrator

{ - createChangesetId = (changeset: Changeset) => { - const { repository } = this.props; - return ; - }; - - render() { - const { repository, changeset } = this.props; - const description = parseDescription(changeset.description); - const changesetId = this.createChangesetId(changeset); - const dateFromNow = ; - - return ( - -
-
-
-
-
- -
- - - -
-
- -

- - - -

-

- -

-

- -

-
-

- -

- {changeset?.signatures && changeset.signatures.length > 0 && ( - - )} -
-
-
-
-
- -
-
-
-
- - -
+const ChangesetRow: FC = ({ repository, changeset }) => { + return ( + +
+
+
- - ); - } -} +
+ + +
+
+
+ ); +}; -export default withTranslation("repos")(ChangesetRow); +export default ChangesetRow; diff --git a/scm-ui/ui-components/src/repos/changesets/SingleChangeset.tsx b/scm-ui/ui-components/src/repos/changesets/SingleChangeset.tsx new file mode 100644 index 0000000000..c6e90db13c --- /dev/null +++ b/scm-ui/ui-components/src/repos/changesets/SingleChangeset.tsx @@ -0,0 +1,110 @@ +/* + * 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 classNames from "classnames"; +import { AvatarImage, AvatarWrapper } from "../../avatar"; +import { ExtensionPoint } from "@scm-manager/ui-extensions"; +import ChangesetDescription from "./ChangesetDescription"; +import { Trans } from "react-i18next"; +import ChangesetAuthor from "./ChangesetAuthor"; +import SignatureIcon from "./SignatureIcon"; +import ChangesetTags from "./ChangesetTags"; +import { parseDescription } from "./changesets"; +import DateFromNow from "../../DateFromNow"; +import { Changeset, Repository } from "@scm-manager/ui-types"; +import styled from "styled-components"; +import ChangesetId from "./ChangesetId"; + +type Props = { + repository: Repository; + changeset: Changeset; +}; + +const FixedSizedAvatar = styled.div` + width: 35px; + height: 35px; +`; + +const FullWidthDiv = styled.div` + width: 100%; +`; + +const SingleChangeset: FC = ({ repository, changeset }) => { + const createChangesetId = () => { + return ; + }; + + const description = parseDescription(changeset.description); + const changesetId = createChangesetId(); + const dateFromNow = ; + + return ( +
+
+
+ +
+ + + +
+
+ +

+ + + +

+

+ +

+

+ +

+
+

+ +

+ {changeset?.signatures && changeset.signatures.length > 0 && ( + + )} +
+
+
+
+
+ +
+
+ ); +}; + +export default SingleChangeset; diff --git a/scm-ui/ui-components/src/repos/changesets/index.ts b/scm-ui/ui-components/src/repos/changesets/index.ts index 5c3324de26..8a39f76efa 100644 --- a/scm-ui/ui-components/src/repos/changesets/index.ts +++ b/scm-ui/ui-components/src/repos/changesets/index.ts @@ -23,6 +23,7 @@ */ import * as changesets from "./changesets"; + export { changesets }; export { default as ChangesetAuthor, SingleContributor } from "./ChangesetAuthor"; @@ -37,3 +38,4 @@ export { default as ChangesetTags } from "./ChangesetTags"; export { default as ChangesetTagsCollapsed } from "./ChangesetTagsCollapsed"; export { default as ContributorAvatar } from "./ContributorAvatar"; export { default as SignatureIcon } from "./SignatureIcon"; +export { default as SingleChangeset } from "./SingleChangeset";