From 6357ec77e27ce68d30791b3b89a670246f0f448a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Maren=20S=C3=BCwer?=
Date: Thu, 22 Nov 2018 10:26:13 +0100
Subject: [PATCH] addHistory
---
scm-ui/src/repos/containers/RepositoryRoot.js | 26 ++++++++++----
.../src/repos/sources/containers/Content.js | 13 +++----
.../repos/sources/containers/FileHistory.js | 36 +++++++++++++++++++
3 files changed, 62 insertions(+), 13 deletions(-)
create mode 100644 scm-ui/src/repos/sources/containers/FileHistory.js
diff --git a/scm-ui/src/repos/containers/RepositoryRoot.js b/scm-ui/src/repos/containers/RepositoryRoot.js
index 94768d2b6a..6831fde68f 100644
--- a/scm-ui/src/repos/containers/RepositoryRoot.js
+++ b/scm-ui/src/repos/containers/RepositoryRoot.js
@@ -29,13 +29,14 @@ import Permissions from "../permissions/containers/Permissions";
import type { History } from "history";
import EditNavLink from "../components/EditNavLink";
+import FileHistory from "../sources/containers/FileHistory";
import BranchRoot from "./ChangesetsRoot";
import ChangesetView from "./ChangesetView";
import PermissionsNavLink from "../components/PermissionsNavLink";
import Sources from "../sources/containers/Sources";
import RepositoryNavLink from "../components/RepositoryNavLink";
import { getRepositoriesLink } from "../../modules/indexResource";
-import {ExtensionPoint} from "@scm-manager/ui-extensions";
+import { ExtensionPoint } from "@scm-manager/ui-extensions";
type Props = {
namespace: string,
@@ -152,6 +153,15 @@ class RepositoryRoot extends React.Component {
)}
/>
+ (
+
+ )}
+ />
(
@@ -172,9 +182,10 @@ class RepositoryRoot extends React.Component {
/>
)}
/>
-
@@ -197,9 +208,10 @@ class RepositoryRoot extends React.Component {
label={t("repository-root.sources")}
activeOnlyWhenExact={false}
/>
-
{
-
+
-
+
-
-
-
- {t("sources.content.historyLink")}
+
+
+
+ {t("sources.content.historyLink")}
+
diff --git a/scm-ui/src/repos/sources/containers/FileHistory.js b/scm-ui/src/repos/sources/containers/FileHistory.js
new file mode 100644
index 0000000000..c5f4c66936
--- /dev/null
+++ b/scm-ui/src/repos/sources/containers/FileHistory.js
@@ -0,0 +1,36 @@
+//@flow
+
+import React from "react";
+import { translate } from "react-i18next";
+import type { File, Repository } from "@scm-manager/ui-types";
+import {
+ DateFromNow,
+ ErrorNotification,
+ Loading
+} from "@scm-manager/ui-components";
+import { connect } from "react-redux";
+import ImageViewer from "../components/content/ImageViewer";
+import SourcecodeViewer from "../components/content/SourcecodeViewer";
+import DownloadViewer from "../components/content/DownloadViewer";
+import FileSize from "../components/FileSize";
+import injectSheet from "react-jss";
+import classNames from "classnames";
+import { ExtensionPoint } from "@scm-manager/ui-extensions";
+import { getContentType } from "./contentType";
+
+type Props = {
+ classes: any,
+ t: string => string
+};
+
+class FileHistory extends React.Component {
+ componentDidMount() {}
+
+ render() {
+ return "History";
+ }
+}
+
+const mapStateToProps = (state: any, ownProps: Props) => {};
+
+export default connect(mapStateToProps)(translate("repos")(FileHistory));