mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 00:15:44 +01:00
cleanup
This commit is contained in:
@@ -41,7 +41,7 @@ const HgTagInformation: FC<Props> = ({ tag }) => {
|
|||||||
<>
|
<>
|
||||||
<h4>{t("scm-hg-plugin.information.checkoutTag")}</h4>
|
<h4>{t("scm-hg-plugin.information.checkoutTag")}</h4>
|
||||||
<pre>
|
<pre>
|
||||||
<code>hg update {tag?.name}</code>
|
<code>hg update {tag.name}</code>
|
||||||
</pre>
|
</pre>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -49,10 +49,12 @@ const BranchRow: FC<Props> = ({ baseUrl, branch }) => {
|
|||||||
<Link to={to} title={branch.name}>
|
<Link to={to} title={branch.name}>
|
||||||
{branch.name}
|
{branch.name}
|
||||||
<DefaultBranchTag defaultBranch={branch.defaultBranch} />
|
<DefaultBranchTag defaultBranch={branch.defaultBranch} />
|
||||||
<Modified className="has-text-grey is-ellipsis-overflow">
|
{branch?.lastModified && branch.lastModifier && (
|
||||||
{t("branches.overview.lastModified")} <DateFromNow date={branch.lastModified} />{" "}
|
<Modified className="has-text-grey is-ellipsis-overflow">
|
||||||
{t("branches.overview.lastModifier")} {branch.lastModifier?.name}
|
{t("branches.overview.lastModified")} <DateFromNow date={branch.lastModified} />{" "}
|
||||||
</Modified>
|
{t("branches.overview.lastModifier")} {branch.lastModifier?.name}
|
||||||
|
</Modified>
|
||||||
|
)}
|
||||||
</Link>
|
</Link>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -129,8 +129,8 @@ export function createBranch(
|
|||||||
|
|
||||||
// Selectors
|
// Selectors
|
||||||
|
|
||||||
function collectBranches(repoState: any) {
|
function collectBranches(repoState) {
|
||||||
return repoState.list._embedded.branches.map((name: string) => repoState.byName[name]);
|
return repoState.list._embedded.branches.map(name => repoState.byName[name]);
|
||||||
}
|
}
|
||||||
|
|
||||||
const memoizedBranchCollector = memoizeOne(collectBranches);
|
const memoizedBranchCollector = memoizeOne(collectBranches);
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ type Props = {
|
|||||||
|
|
||||||
const TagView: FC<Props> = ({ repository, tag }) => {
|
const TagView: FC<Props> = ({ repository, tag }) => {
|
||||||
return (
|
return (
|
||||||
<div>
|
<>
|
||||||
<TagDetail tag={tag} repository={repository} />
|
<TagDetail tag={tag} repository={repository} />
|
||||||
<hr />
|
<hr />
|
||||||
<div className="content">
|
<div className="content">
|
||||||
@@ -47,7 +47,7 @@ const TagView: FC<Props> = ({ repository, tag }) => {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -54,8 +54,8 @@ const TagRoot: FC<Props> = ({ repository, baseUrl }) => {
|
|||||||
}, [repository]);
|
}, [repository]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const tagName = match?.params?.tag;
|
const tagName = decodeURIComponent(match?.params?.tag);
|
||||||
const link = tags && tags.length > 0 && (tags.find(tag => tag.name === tagName)?._links.self as Link).href;
|
const link = tags?.length > 0 && (tags.find(tag => tag.name === tagName)?._links.self as Link).href;
|
||||||
if (link) {
|
if (link) {
|
||||||
apiClient
|
apiClient
|
||||||
.get(link)
|
.get(link)
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ const TagsOverview: FC<Props> = ({ repository, baseUrl }) => {
|
|||||||
}, [repository]);
|
}, [repository]);
|
||||||
|
|
||||||
const renderTagsTable = () => {
|
const renderTagsTable = () => {
|
||||||
if (!loading && tags && tags.length > 0) {
|
if (!loading && tags?.length > 0) {
|
||||||
orderTags(tags);
|
orderTags(tags);
|
||||||
return <TagTable baseUrl={baseUrl} tags={tags} />;
|
return <TagTable baseUrl={baseUrl} tags={tags} />;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ public class BranchDto extends HalRepresentation {
|
|||||||
private boolean defaultBranch;
|
private boolean defaultBranch;
|
||||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
private Instant lastModified;
|
private Instant lastModified;
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
private PersonDto lastModifier;
|
private PersonDto lastModifier;
|
||||||
|
|
||||||
BranchDto(Links links, Embedded embedded) {
|
BranchDto(Links links, Embedded embedded) {
|
||||||
|
|||||||
Reference in New Issue
Block a user