Merge with upstream

This commit is contained in:
Florian Scholdei
2020-10-05 15:41:21 +02:00
4 changed files with 3364 additions and 2590 deletions

View File

@@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added ### Added
- SubRepository support ([#1357](https://github.com/scm-manager/scm-manager/pull/1357)) - SubRepository support ([#1357](https://github.com/scm-manager/scm-manager/pull/1357))
### Fixed
- Align actionbar item horizontal and enforce correct margin between them ([#1358](https://github.com/scm-manager/scm-manager/pull/1358))
## [2.6.1] - 2020-09-30 ## [2.6.1] - 2020-09-30
### Fixed ### Fixed
- Not found error when using browse command in empty hg repository ([#1355](https://github.com/scm-manager/scm-manager/pull/1355)) - Not found error when using browse command in empty hg repository ([#1355](https://github.com/scm-manager/scm-manager/pull/1355))

View File

@@ -48,9 +48,22 @@ const HomeIcon = styled(Icon)`
line-height: 1.5rem; line-height: 1.5rem;
`; `;
const ActionWrapper = styled.div` const ActionBar = styled.div`
align-self: center; align-self: center;
padding-right: 1rem;
/* order actionbar items horizontal */
display: flex;
justify-content: flex-start;
/* ensure space between action bar items */
& > * {
/*
* We have to use important, because plugins could use field or control classes like the editor-plugin does.
* Those classes overwrite the margin which is ok, if the plugin is the only one which is using the actionbar.
* But it looks terrible if another plugin use the actionbar, which does not use field and control classes.
*/
margin: 0 0.75rem 0 0 !important;
}
`; `;
class Breadcrumb extends React.Component<Props> { class Breadcrumb extends React.Component<Props> {
@@ -102,7 +115,7 @@ class Breadcrumb extends React.Component<Props> {
</ul> </ul>
</FlexStartNav> </FlexStartNav>
{binder.hasExtension("repos.sources.actionbar") && ( {binder.hasExtension("repos.sources.actionbar") && (
<ActionWrapper> <ActionBar>
<ExtensionPoint <ExtensionPoint
name="repos.sources.actionbar" name="repos.sources.actionbar"
props={{ props={{
@@ -115,7 +128,7 @@ class Breadcrumb extends React.Component<Props> {
}} }}
renderAll={true} renderAll={true}
/> />
</ActionWrapper> </ActionBar>
)} )}
</div> </div>
<hr className="is-marginless" /> <hr className="is-marginless" />

View File

@@ -80,34 +80,57 @@ const SignatureIcon: FC<Props> = ({signatures, className}) => {
} }
if (signature.status === "NOT_FOUND") { if (signature.status === "NOT_FOUND") {
return <p> return (
<div>{t("changeset.keyId")}: {signature.keyId}</div> <p>
<div>{t("changeset.signatureStatus")}: {status}</div> <div>
</p>; {t("changeset.keyId")}: {signature.keyId}
</div>
<div>
{t("changeset.signatureStatus")}: {status}
</div>
</p>
);
} }
return <p> return (
<div>{t("changeset.keyId")}: { <p>
signature._links?.rawKey ? <a href={signature._links.rawKey.href}>{signature.keyId}</a> : signature.keyId <div>
}</div> {t("changeset.keyId")}:{" "}
<div>{t("changeset.signatureStatus")}: <span className={classNames(`has-text-${getColor([signature])}`)}>{status}</span></div> {signature._links?.rawKey ? <a href={signature._links.rawKey.href}>{signature.keyId}</a> : signature.keyId}
<div>{t("changeset.keyOwner")}: {signature.owner || t("changeset.noOwner")}</div> </div>
{signature.contacts && signature.contacts.length > 0 && <> <div>
{t("changeset.signatureStatus")}:{" "}
<span className={classNames(`has-text-${getColor([signature])}`)}>{status}</span>
</div>
<div>
{t("changeset.keyOwner")}: {signature.owner || t("changeset.noOwner")}
</div>
{signature.contacts && signature.contacts.length > 0 && (
<>
<div>{t("changeset.keyContacts")}:</div> <div>{t("changeset.keyContacts")}:</div>
{signature.contacts && signature.contacts.map(contact => {signature.contacts &&
<div>- {contact.name}{contact.mail && ` <${contact.mail}>`}</div>)} signature.contacts.map(contact => (
</>} <div>
</p>; - {contact.name}
{contact.mail && ` <${contact.mail}>`}
</div>
))}
</>
)}
</p>
);
}; };
const signatureElements = signatures.map(signature => createSignatureBlock(signature)); const signatureElements = signatures.map(signature => createSignatureBlock(signature));
return ( return (
<> <>
<Popover title={<h1 className="has-text-weight-bold is-size-5">{t("changeset.signatures")}</h1>} width={500} {...popoverProps}> <Popover
<StyledDiv> title={<h1 className="has-text-weight-bold is-size-5">{t("changeset.signatures")}</h1>}
{signatureElements} width={500}
</StyledDiv> {...popoverProps}
>
<StyledDiv>{signatureElements}</StyledDiv>
</Popover> </Popover>
<div {...triggerProps}> <div {...triggerProps}>
<StyledIcon name="key" className={className} color={getColor(signatures)} /> <StyledIcon name="key" className={className} color={getColor(signatures)} />

5851
yarn.lock

File diff suppressed because it is too large Load Diff