Merge with develop

This commit is contained in:
Sebastian Sdorra
2020-11-04 08:22:41 +01:00
125 changed files with 2108 additions and 851 deletions

View File

@@ -50436,7 +50436,7 @@ exports[`Storyshots RepositoryEntry Avatar EP 1`] = `
>
<a
className="RepositoryEntryLink__PointerEventsLink-sc-1hpqj0w-0 iZuqoP level-item"
href="/repo/hitchhiker/heartOfGold/branches"
href="/repo/hitchhiker/heartOfGold/branches/"
onClick={[Function]}
>
<i
@@ -50550,7 +50550,7 @@ exports[`Storyshots RepositoryEntry Before Title EP 1`] = `
>
<a
className="RepositoryEntryLink__PointerEventsLink-sc-1hpqj0w-0 iZuqoP level-item"
href="/repo/hitchhiker/heartOfGold/branches"
href="/repo/hitchhiker/heartOfGold/branches/"
onClick={[Function]}
>
<i
@@ -50661,7 +50661,7 @@ exports[`Storyshots RepositoryEntry Default 1`] = `
>
<a
className="RepositoryEntryLink__PointerEventsLink-sc-1hpqj0w-0 iZuqoP level-item"
href="/repo/hitchhiker/heartOfGold/branches"
href="/repo/hitchhiker/heartOfGold/branches/"
onClick={[Function]}
>
<i
@@ -50772,7 +50772,7 @@ exports[`Storyshots RepositoryEntry Quick Link EP 1`] = `
>
<a
className="RepositoryEntryLink__PointerEventsLink-sc-1hpqj0w-0 iZuqoP level-item"
href="/repo/hitchhiker/heartOfGold/branches"
href="/repo/hitchhiker/heartOfGold/branches/"
onClick={[Function]}
>
<i

View File

@@ -34,6 +34,7 @@ type State = {
type Props = WithTranslation & {
passwordChanged: (p1: string, p2: boolean) => void;
passwordValidator?: (p: string) => boolean;
onReturnPressed?: () => void;
};
class PasswordConfirmation extends React.Component<Props, State> {
@@ -57,7 +58,7 @@ class PasswordConfirmation extends React.Component<Props, State> {
}
render() {
const { t } = this.props;
const { t, onReturnPressed } = this.props;
return (
<div className="columns is-multiline">
<div className="column is-half">
@@ -78,6 +79,7 @@ class PasswordConfirmation extends React.Component<Props, State> {
value={this.state ? this.state.confirmedPassword : ""}
validationError={this.state.passwordConfirmationFailed}
errorMessage={t("password.passwordConfirmFailed")}
onReturnPressed={onReturnPressed}
/>
</div>
</div>

View File

@@ -44,7 +44,7 @@ class RepositoryEntry extends React.Component<Props> {
renderBranchesLink = (repository: Repository, repositoryLink: string) => {
if (repository._links["branches"]) {
return <RepositoryEntryLink icon="code-branch" to={repositoryLink + "/branches"} />;
return <RepositoryEntryLink icon="code-branch" to={repositoryLink + "/branches/"} />;
}
return null;
};

View File

@@ -28,6 +28,12 @@ export const isNameValid = (name: string) => {
return nameRegex.test(name);
};
export const branchRegex = /^[\w-,;\]{}@&+=$#`|<>]([\w-,;\]{}@&+=$#`|<>/.]*[\w-,;\]{}@&+=$#`|<>])?$/;
export const isBranchValid = (name: string) => {
return branchRegex.test(name);
};
const mailRegex = /^[ -~]+@[A-Za-z0-9][\w\-.]*\.[A-Za-z0-9][A-Za-z0-9-]+$/;
export const isMailValid = (mail: string) => {