mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 08:25:44 +01:00
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:
@@ -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
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -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}
|
||||||
|
|||||||
Reference in New Issue
Block a user