mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-09 15:05:44 +01:00
use i18n for missing extension warning / fix encoding for branches containing slashes
This commit is contained in:
@@ -171,18 +171,18 @@ class Sources extends React.Component<Props, State> {
|
||||
const mapStateToProps = (state, ownProps) => {
|
||||
const { repository, match } = ownProps;
|
||||
const { revision, path } = match.params;
|
||||
const decodedRevision = revision ? decodeURIComponent(revision) : undefined;
|
||||
const decodedRevision = revision ? decodeURIComponent(revision) : revision;
|
||||
const loading = isFetchBranchesPending(state, repository);
|
||||
const error = getFetchBranchesFailure(state, repository);
|
||||
const branches = getBranches(state, repository);
|
||||
const currentFileIsDirectory = decodedRevision
|
||||
const currentFileIsDirectory = revision
|
||||
? isDirectory(state, repository, decodedRevision, path)
|
||||
: isDirectory(state, repository, revision, path);
|
||||
const sources = getSources(state, repository, revision, path);
|
||||
: isDirectory(state, repository, decodedRevision, path);
|
||||
const sources = getSources(state, repository, decodedRevision, path);
|
||||
|
||||
return {
|
||||
repository,
|
||||
revision: decodedRevision,
|
||||
revision,
|
||||
path,
|
||||
loading,
|
||||
error,
|
||||
@@ -198,7 +198,7 @@ const mapDispatchToProps = dispatch => {
|
||||
dispatch(fetchBranches(repository));
|
||||
},
|
||||
fetchSources: (repository: Repository, revision: string, path: string) => {
|
||||
dispatch(fetchSources(repository, revision, path));
|
||||
dispatch(fetchSources(repository, decodeURIComponent(revision), path));
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user