added create branch trans, fixed branchtable trans, moved branches modules

This commit is contained in:
Florian Scholdei
2019-04-02 09:27:34 +02:00
parent d8a33e0fc2
commit db0a835bca
12 changed files with 35 additions and 13 deletions

View File

@@ -54,7 +54,10 @@
"branches": "Branches" "branches": "Branches"
}, },
"create": { "create": {
"title": "Branch erstellen" "title": "Branch erstellen",
"source": "Quellbranch",
"name": "Name",
"submit": "Branch erstellen"
} }
}, },
"branch": { "branch": {

View File

@@ -54,7 +54,10 @@
"branches": "Branches" "branches": "Branches"
}, },
"create": { "create": {
"title": "Create Branch" "title": "Create Branch",
"source": "Source Branch",
"name": "Name",
"submit": "Create Branch"
} }
}, },
"branch": { "branch": {

View File

@@ -19,7 +19,7 @@ import namespaceStrategies from "./config/modules/namespaceStrategies";
import indexResources from "./modules/indexResource"; import indexResources from "./modules/indexResource";
import type { BrowserHistory } from "history/createBrowserHistory"; import type { BrowserHistory } from "history/createBrowserHistory";
import branches from "./repos/modules/branches"; import branches from "./repos/branches/modules/branches";
function createReduxStore(history: BrowserHistory) { function createReduxStore(history: BrowserHistory) {
const composeEnhancers = const composeEnhancers =

View File

@@ -3,7 +3,7 @@ import React from "react";
import type { Repository, Branch } from "@scm-manager/ui-types"; import type { Repository, Branch } from "@scm-manager/ui-types";
import { ButtonGroup, Button } from "@scm-manager/ui-components"; import { ButtonGroup, Button } from "@scm-manager/ui-components";
import { translate } from "react-i18next"; import { translate } from "react-i18next";
import { createChangesetLink, createSourcesLink } from "../../modules/branches"; import { createChangesetLink, createSourcesLink } from "../modules/branches";
type Props = { type Props = {
repository: Repository, repository: Repository,

View File

@@ -0,0 +1,16 @@
//@flow
import React from "react";
type Props = {};
class CreateBranch extends React.Component<Props> {
render() {
return (
<>
<p>Form placeholder</p>
</>
);
}
}
export default translate("repos")(BranchForm);

View File

@@ -37,4 +37,4 @@ class BranchTable extends React.Component<Props> {
} }
} }
export default translate("users")(BranchTable); export default translate("repos")(BranchTable);

View File

@@ -11,7 +11,7 @@ import {
getBranchByName, getBranchByName,
getFetchBranchFailure, getFetchBranchFailure,
isFetchBranchPending isFetchBranchPending
} from "../../modules/branches"; } from "../modules/branches";
import { ErrorPage, Loading } from "@scm-manager/ui-components"; import { ErrorPage, Loading } from "@scm-manager/ui-components";
type Props = { type Props = {

View File

@@ -5,7 +5,7 @@ import {
getBranches, getBranches,
getFetchBranchesFailure, getFetchBranchesFailure,
isFetchBranchesPending isFetchBranchesPending
} from "../../modules/branches"; } from "../modules/branches";
import { connect } from "react-redux"; import { connect } from "react-redux";
import type { Branch, Repository } from "@scm-manager/ui-types"; import type { Branch, Repository } from "@scm-manager/ui-types";
import { compose } from "redux"; import { compose } from "redux";

View File

@@ -3,15 +3,15 @@ import {
FAILURE_SUFFIX, FAILURE_SUFFIX,
PENDING_SUFFIX, PENDING_SUFFIX,
SUCCESS_SUFFIX SUCCESS_SUFFIX
} from "../../modules/types"; } from "../../../modules/types";
import { apiClient } from "@scm-manager/ui-components"; import { apiClient } from "@scm-manager/ui-components";
import type { import type {
Action, Action,
Branch, Branch,
Repository Repository
} from "@scm-manager/ui-types"; } from "@scm-manager/ui-types";
import { isPending } from "../../modules/pending"; import { isPending } from "../../../modules/pending";
import { getFailure } from "../../modules/failure"; import { getFailure } from "../../../modules/failure";
export const FETCH_BRANCHES = "scm/repos/FETCH_BRANCHES"; export const FETCH_BRANCHES = "scm/repos/FETCH_BRANCHES";
export const FETCH_BRANCHES_PENDING = `${FETCH_BRANCHES}_${PENDING_SUFFIX}`; export const FETCH_BRANCHES_PENDING = `${FETCH_BRANCHES}_${PENDING_SUFFIX}`;

View File

@@ -1,5 +1,5 @@
import configureMockStore from "redux-mock-store"; import configureMockStore from "redux-mock-store";
import thunk from "redux-thunk"; import thunk from "redux-thunk/index";
import fetchMock from "fetch-mock"; import fetchMock from "fetch-mock";
import reducer, { import reducer, {
FETCH_BRANCHES, FETCH_BRANCHES,

View File

@@ -16,7 +16,7 @@ import {
getBranches, getBranches,
getFetchBranchesFailure, getFetchBranchesFailure,
isFetchBranchesPending isFetchBranchesPending
} from "../modules/branches"; } from "../branches/modules/branches";
import { compose } from "redux"; import { compose } from "redux";
type Props = { type Props = {

View File

@@ -12,7 +12,7 @@ import {
getBranches, getBranches,
getFetchBranchesFailure, getFetchBranchesFailure,
isFetchBranchesPending isFetchBranchesPending
} from "../../modules/branches"; } from "../../branches/modules/branches";
import { compose } from "redux"; import { compose } from "redux";
import Content from "./Content"; import Content from "./Content";
import { fetchSources, isDirectory } from "../modules/sources"; import { fetchSources, isDirectory } from "../modules/sources";