Merge branch 'feature/import_git_from_url' of github.com:scm-manager/scm-manager into feature/import_git_from_url

This commit is contained in:
Eduard Heimbuch
2020-12-03 08:55:15 +01:00
2 changed files with 18 additions and 10 deletions

View File

@@ -102,9 +102,9 @@ public interface RepositoryManager
/** /**
* Creates a new repository and afterwards executes the logic from the {@param afterCreation}. * Creates a new repository and afterwards executes the logic from the {@param afterCreation}.
* *
* @param repository the repository {@link Repository} * @param repository the repository to create
* @param afterCreation consumer which expects a repository {@link Repository} * @param afterCreation consumer which is executed after the repository was created
* @return {@link Repository} the created repository * @return created repository
* *
* @since 2.11.0 * @since 2.11.0
*/ */

View File

@@ -48,6 +48,20 @@ type Props = {
fetchNamespaceStrategiesIfNeeded: () => void; fetchNamespaceStrategiesIfNeeded: () => void;
}; };
const ImportPendingLoading = ({ importPending }: { importPending: boolean }) => {
const [t] = useTranslation("repos");
if (!importPending) {
return null;
}
return (
<>
<Notification type="info">{t("import.pending.infoText")}</Notification>
<Loading />
<hr />
</>
);
};
const ImportRepository: FC<Props> = ({ const ImportRepository: FC<Props> = ({
repositoryTypes, repositoryTypes,
pageLoading, pageLoading,
@@ -92,13 +106,7 @@ const ImportRepository: FC<Props> = ({
error={error} error={error}
showContentOnError={true} showContentOnError={true}
> >
{importPending && ( <ImportPendingLoading importPending={importPending} />
<>
<Notification type="info">{t("import.pending.infoText")}</Notification>
<Loading />
<hr />
</>
)}
<ImportRepositoryTypeSelect <ImportRepositoryTypeSelect
repositoryTypes={repositoryTypes} repositoryTypes={repositoryTypes}
repositoryType={repositoryType} repositoryType={repositoryType}