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