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}.
*
* @param repository the repository {@link Repository}
* @param afterCreation consumer which expects a repository {@link Repository}
* @return {@link Repository} the created repository
* @param repository the repository to create
* @param afterCreation consumer which is executed after the repository was created
* @return created repository
*
* @since 2.11.0
*/

View File

@@ -48,6 +48,20 @@ type Props = {
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> = ({
repositoryTypes,
pageLoading,
@@ -92,13 +106,7 @@ const ImportRepository: FC<Props> = ({
error={error}
showContentOnError={true}
>
{importPending && (
<>
<Notification type="info">{t("import.pending.infoText")}</Notification>
<Loading />
<hr />
</>
)}
<ImportPendingLoading importPending={importPending} />
<ImportRepositoryTypeSelect
repositoryTypes={repositoryTypes}
repositoryType={repositoryType}