mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 22:45:45 +01:00
fixed sources and changeset view for svn repos
This commit is contained in:
@@ -304,6 +304,7 @@ const reduceByBranchesSuccess = (state, payload) => {
|
||||
const byName = repoState.byName || {};
|
||||
repoState.byName = byName;
|
||||
|
||||
if(response._embedded) {
|
||||
const branches = response._embedded.branches;
|
||||
const names = branches.map(b => b.name);
|
||||
response._embedded.branches = names;
|
||||
@@ -316,6 +317,10 @@ const reduceByBranchesSuccess = (state, payload) => {
|
||||
byName
|
||||
}
|
||||
};
|
||||
}
|
||||
return {
|
||||
[key]: []
|
||||
};
|
||||
};
|
||||
|
||||
const reduceByBranchSuccess = (state, payload) => {
|
||||
|
||||
@@ -80,19 +80,17 @@ class ChangesetsRoot extends React.Component<Props> {
|
||||
return <Loading />;
|
||||
}
|
||||
|
||||
if (!repository || !branches) {
|
||||
if (!repository) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const url = this.stripEndingSlash(match.url);
|
||||
const branch = this.findSelectedBranch();
|
||||
const branch = branches ? this.findSelectedBranch() : null;
|
||||
const changesets = <Changesets repository={repository} branch={branch} />;
|
||||
|
||||
return (
|
||||
<div className="panel">
|
||||
<div className="panel-heading">
|
||||
{this.renderBranchSelector()}
|
||||
</div>
|
||||
<Route path={`${url}/:page?`} component={() => changesets} />
|
||||
</div>
|
||||
);
|
||||
@@ -102,6 +100,7 @@ class ChangesetsRoot extends React.Component<Props> {
|
||||
const { repository, branches, selected, t } = this.props;
|
||||
if (repository._links.branches) {
|
||||
return (
|
||||
<div className="panel-heading">
|
||||
<BranchSelector
|
||||
label={t("changesets.branchSelectorLabel")}
|
||||
branches={branches}
|
||||
@@ -110,6 +109,7 @@ class ChangesetsRoot extends React.Component<Props> {
|
||||
this.branchSelected(b);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -94,7 +94,7 @@ class Sources extends React.Component<Props> {
|
||||
if (currentFileIsDirectory) {
|
||||
return (
|
||||
<div className="panel">
|
||||
<div className="panel-heading">{this.renderBranchSelector()}</div>
|
||||
{this.renderBranchSelector()}
|
||||
<FileTree
|
||||
repository={repository}
|
||||
revision={revision}
|
||||
@@ -115,6 +115,7 @@ class Sources extends React.Component<Props> {
|
||||
|
||||
if (branches) {
|
||||
return (
|
||||
<div className="panel-heading">
|
||||
<BranchSelector
|
||||
branches={branches}
|
||||
selectedBranch={revision}
|
||||
@@ -123,6 +124,7 @@ class Sources extends React.Component<Props> {
|
||||
this.branchSelected(b);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user