mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-15 09:46:16 +01:00
cleanup
This commit is contained in:
@@ -51,7 +51,7 @@ type Props = {
|
|||||||
repository?: Repository;
|
repository?: Repository;
|
||||||
repositoryTypes?: RepositoryType[];
|
repositoryTypes?: RepositoryType[];
|
||||||
namespaceStrategy?: string;
|
namespaceStrategy?: string;
|
||||||
loading?: boolean;
|
loading: boolean;
|
||||||
indexResources?: any;
|
indexResources?: any;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -193,7 +193,7 @@ const RepositoryForm: FC<Props> = ({
|
|||||||
<RepositoryInformationForm
|
<RepositoryInformationForm
|
||||||
repository={repo}
|
repository={repo}
|
||||||
onChange={setRepo}
|
onChange={setRepo}
|
||||||
disabled={!(isModifiable() || createRepository)}
|
disabled={disabled}
|
||||||
setValid={contact => setValid({ ...valid, contact })}
|
setValid={contact => setValid({ ...valid, contact })}
|
||||||
/>
|
/>
|
||||||
{submitButton()}
|
{submitButton()}
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ const SmallButton = styled(Button)`
|
|||||||
|
|
||||||
const TopLevel = styled(Level)`
|
const TopLevel = styled(Level)`
|
||||||
margin-top: 1.5rem;
|
margin-top: 1.5rem;
|
||||||
margin-bottom: -1.5rem !important;
|
margin-bottom: -1.5rem;
|
||||||
height: 0;
|
height: 0;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0;
|
right: 0;
|
||||||
@@ -71,7 +71,7 @@ const RepositoryFormSwitcher: FC<Props> = ({ creationMode }) => {
|
|||||||
color={isCreateMode() ? "link is-selected" : undefined}
|
color={isCreateMode() ? "link is-selected" : undefined}
|
||||||
link={isImportMode() ? "/repos/create" : undefined}
|
link={isImportMode() ? "/repos/create" : undefined}
|
||||||
>
|
>
|
||||||
<MarginIcon name="fa fa-plus" color={isCreateMode() ? "white" : "default"} />{" "}
|
<MarginIcon name="fa fa-plus" color={isCreateMode() ? "white" : "default"} />
|
||||||
<p className="is-hidden-mobile is-hidden-tablet-only">{t("repositoryForm.createButton")}</p>
|
<p className="is-hidden-mobile is-hidden-tablet-only">{t("repositoryForm.createButton")}</p>
|
||||||
</SmallButton>
|
</SmallButton>
|
||||||
<SmallButton
|
<SmallButton
|
||||||
|
|||||||
@@ -57,12 +57,6 @@ export const CREATE_REPO_SUCCESS = `${CREATE_REPO}_${types.SUCCESS_SUFFIX}`;
|
|||||||
export const CREATE_REPO_FAILURE = `${CREATE_REPO}_${types.FAILURE_SUFFIX}`;
|
export const CREATE_REPO_FAILURE = `${CREATE_REPO}_${types.FAILURE_SUFFIX}`;
|
||||||
export const CREATE_REPO_RESET = `${CREATE_REPO}_${types.RESET_SUFFIX}`;
|
export const CREATE_REPO_RESET = `${CREATE_REPO}_${types.RESET_SUFFIX}`;
|
||||||
|
|
||||||
export const IMPORT_REPO = "scm/repos/IMPORT_REPO";
|
|
||||||
export const IMPORT_REPO_PENDING = `${IMPORT_REPO}_${types.PENDING_SUFFIX}`;
|
|
||||||
export const IMPORT_REPO_SUCCESS = `${IMPORT_REPO}_${types.SUCCESS_SUFFIX}`;
|
|
||||||
export const IMPORT_REPO_FAILURE = `${IMPORT_REPO}_${types.FAILURE_SUFFIX}`;
|
|
||||||
export const IMPORT_REPO_RESET = `${IMPORT_REPO}_${types.RESET_SUFFIX}`;
|
|
||||||
|
|
||||||
export const MODIFY_REPO = "scm/repos/MODIFY_REPO";
|
export const MODIFY_REPO = "scm/repos/MODIFY_REPO";
|
||||||
export const MODIFY_REPO_PENDING = `${MODIFY_REPO}_${types.PENDING_SUFFIX}`;
|
export const MODIFY_REPO_PENDING = `${MODIFY_REPO}_${types.PENDING_SUFFIX}`;
|
||||||
export const MODIFY_REPO_SUCCESS = `${MODIFY_REPO}_${types.SUCCESS_SUFFIX}`;
|
export const MODIFY_REPO_SUCCESS = `${MODIFY_REPO}_${types.SUCCESS_SUFFIX}`;
|
||||||
@@ -599,14 +593,6 @@ export function isAbleToCreateRepos(state: object) {
|
|||||||
return !!(state.repos && state.repos.list && state.repos.list._links && state.repos.list._links.create);
|
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) {
|
export function isCreateRepoPending(state: object) {
|
||||||
return isPending(state, CREATE_REPO);
|
return isPending(state, CREATE_REPO);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user