Add Loading Spinner while waiting for repository import

This commit is contained in:
Eduard Heimbuch
2020-11-25 12:12:16 +01:00
parent 10ed51733c
commit 4e1e51d1b9
6 changed files with 75 additions and 37 deletions

View File

@@ -268,19 +268,19 @@ export function importRepoFromUrl(link: string, repository: RepositoryImport, ca
export function importRepoPending(): Action {
return {
type: CREATE_REPO_PENDING
type: IMPORT_REPO_PENDING
};
}
export function importRepoSuccess(): Action {
return {
type: CREATE_REPO_SUCCESS
type: IMPORT_REPO_SUCCESS
};
}
export function importRepoFailure(err: Error): Action {
return {
type: CREATE_REPO_FAILURE,
type: IMPORT_REPO_FAILURE,
payload: err
};
}
@@ -643,6 +643,14 @@ export function isAbleToCreateRepos(state: object) {
return !!(state.repos && state.repos.list && state.repos.list._links && state.repos.list._links.create);
}
export function isImportRepoPending(state: object) {
return isPending(state, IMPORT_REPO);
}
export function getImportRepoFailure(state: object) {
return getFailure(state, IMPORT_REPO);
}
export function isCreateRepoPending(state: object) {
return isPending(state, CREATE_REPO);
}