diff --git a/scm-ui/public/locales/de/repos.json b/scm-ui/public/locales/de/repos.json index 8350ecc581..3a90f9080a 100644 --- a/scm-ui/public/locales/de/repos.json +++ b/scm-ui/public/locales/de/repos.json @@ -54,7 +54,10 @@ "branches": "Branches" }, "create": { - "title": "Branch erstellen" + "title": "Branch erstellen", + "source": "Quellbranch", + "name": "Name", + "submit": "Branch erstellen" } }, "branch": { diff --git a/scm-ui/public/locales/en/repos.json b/scm-ui/public/locales/en/repos.json index fef882c90e..6adede7b82 100644 --- a/scm-ui/public/locales/en/repos.json +++ b/scm-ui/public/locales/en/repos.json @@ -54,7 +54,10 @@ "branches": "Branches" }, "create": { - "title": "Create Branch" + "title": "Create Branch", + "source": "Source Branch", + "name": "Name", + "submit": "Create Branch" } }, "branch": { diff --git a/scm-ui/src/createReduxStore.js b/scm-ui/src/createReduxStore.js index cd24f46de2..eb0586d657 100644 --- a/scm-ui/src/createReduxStore.js +++ b/scm-ui/src/createReduxStore.js @@ -19,7 +19,7 @@ import namespaceStrategies from "./config/modules/namespaceStrategies"; import indexResources from "./modules/indexResource"; import type { BrowserHistory } from "history/createBrowserHistory"; -import branches from "./repos/modules/branches"; +import branches from "./repos/branches/modules/branches"; function createReduxStore(history: BrowserHistory) { const composeEnhancers = diff --git a/scm-ui/src/repos/branches/components/BranchButtonGroup.js b/scm-ui/src/repos/branches/components/BranchButtonGroup.js index b7c7a843ec..dc170963e9 100644 --- a/scm-ui/src/repos/branches/components/BranchButtonGroup.js +++ b/scm-ui/src/repos/branches/components/BranchButtonGroup.js @@ -3,7 +3,7 @@ import React from "react"; import type { Repository, Branch } from "@scm-manager/ui-types"; import { ButtonGroup, Button } from "@scm-manager/ui-components"; import { translate } from "react-i18next"; -import { createChangesetLink, createSourcesLink } from "../../modules/branches"; +import { createChangesetLink, createSourcesLink } from "../modules/branches"; type Props = { repository: Repository, diff --git a/scm-ui/src/repos/branches/components/BranchForm.js b/scm-ui/src/repos/branches/components/BranchForm.js new file mode 100644 index 0000000000..614a719338 --- /dev/null +++ b/scm-ui/src/repos/branches/components/BranchForm.js @@ -0,0 +1,16 @@ +//@flow +import React from "react"; + +type Props = {}; + +class CreateBranch extends React.Component { + render() { + return ( + <> +

Form placeholder

+ + ); + } +} + +export default translate("repos")(BranchForm); diff --git a/scm-ui/src/repos/branches/components/BranchTable.js b/scm-ui/src/repos/branches/components/BranchTable.js index e85fa0d625..85dd854f21 100644 --- a/scm-ui/src/repos/branches/components/BranchTable.js +++ b/scm-ui/src/repos/branches/components/BranchTable.js @@ -37,4 +37,4 @@ class BranchTable extends React.Component { } } -export default translate("users")(BranchTable); +export default translate("repos")(BranchTable); diff --git a/scm-ui/src/repos/branches/containers/BranchView.js b/scm-ui/src/repos/branches/containers/BranchView.js index 4774e2825a..5a90812ac9 100644 --- a/scm-ui/src/repos/branches/containers/BranchView.js +++ b/scm-ui/src/repos/branches/containers/BranchView.js @@ -11,7 +11,7 @@ import { getBranchByName, getFetchBranchFailure, isFetchBranchPending -} from "../../modules/branches"; +} from "../modules/branches"; import { ErrorPage, Loading } from "@scm-manager/ui-components"; type Props = { diff --git a/scm-ui/src/repos/branches/containers/BranchesOverview.js b/scm-ui/src/repos/branches/containers/BranchesOverview.js index b39c821494..4f4ca4a75d 100644 --- a/scm-ui/src/repos/branches/containers/BranchesOverview.js +++ b/scm-ui/src/repos/branches/containers/BranchesOverview.js @@ -5,7 +5,7 @@ import { getBranches, getFetchBranchesFailure, isFetchBranchesPending -} from "../../modules/branches"; +} from "../modules/branches"; import { connect } from "react-redux"; import type { Branch, Repository } from "@scm-manager/ui-types"; import { compose } from "redux"; diff --git a/scm-ui/src/repos/modules/branches.js b/scm-ui/src/repos/branches/modules/branches.js similarity index 97% rename from scm-ui/src/repos/modules/branches.js rename to scm-ui/src/repos/branches/modules/branches.js index 9468443fea..03c0c1a9eb 100644 --- a/scm-ui/src/repos/modules/branches.js +++ b/scm-ui/src/repos/branches/modules/branches.js @@ -3,15 +3,15 @@ import { FAILURE_SUFFIX, PENDING_SUFFIX, SUCCESS_SUFFIX -} from "../../modules/types"; +} from "../../../modules/types"; import { apiClient } from "@scm-manager/ui-components"; import type { Action, Branch, Repository } from "@scm-manager/ui-types"; -import { isPending } from "../../modules/pending"; -import { getFailure } from "../../modules/failure"; +import { isPending } from "../../../modules/pending"; +import { getFailure } from "../../../modules/failure"; export const FETCH_BRANCHES = "scm/repos/FETCH_BRANCHES"; export const FETCH_BRANCHES_PENDING = `${FETCH_BRANCHES}_${PENDING_SUFFIX}`; diff --git a/scm-ui/src/repos/modules/branches.test.js b/scm-ui/src/repos/branches/modules/branches.test.js similarity index 99% rename from scm-ui/src/repos/modules/branches.test.js rename to scm-ui/src/repos/branches/modules/branches.test.js index 5e9b4e0f1f..754a3803e9 100644 --- a/scm-ui/src/repos/modules/branches.test.js +++ b/scm-ui/src/repos/branches/modules/branches.test.js @@ -1,5 +1,5 @@ import configureMockStore from "redux-mock-store"; -import thunk from "redux-thunk"; +import thunk from "redux-thunk/index"; import fetchMock from "fetch-mock"; import reducer, { FETCH_BRANCHES, diff --git a/scm-ui/src/repos/containers/ChangesetsRoot.js b/scm-ui/src/repos/containers/ChangesetsRoot.js index f6e0c3d359..c4f40e0d74 100644 --- a/scm-ui/src/repos/containers/ChangesetsRoot.js +++ b/scm-ui/src/repos/containers/ChangesetsRoot.js @@ -16,7 +16,7 @@ import { getBranches, getFetchBranchesFailure, isFetchBranchesPending -} from "../modules/branches"; +} from "../branches/modules/branches"; import { compose } from "redux"; type Props = { diff --git a/scm-ui/src/repos/sources/containers/Sources.js b/scm-ui/src/repos/sources/containers/Sources.js index 05705a61d1..7b87776e73 100644 --- a/scm-ui/src/repos/sources/containers/Sources.js +++ b/scm-ui/src/repos/sources/containers/Sources.js @@ -12,7 +12,7 @@ import { getBranches, getFetchBranchesFailure, isFetchBranchesPending -} from "../../modules/branches"; +} from "../../branches/modules/branches"; import { compose } from "redux"; import Content from "./Content"; import { fetchSources, isDirectory } from "../modules/sources";