mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-09 23:15:43 +01:00
refactoring content view
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
import React from "react";
|
||||
import { translate } from "react-i18next";
|
||||
import type { File } from "@scm-manager/ui-types";
|
||||
import { DownloadButton, DateFromNow } from "@scm-manager/ui-components";
|
||||
import { DownloadButton } from "@scm-manager/ui-components";
|
||||
|
||||
type Props = {
|
||||
t: string => string,
|
||||
@@ -12,39 +12,13 @@ type Props = {
|
||||
|
||||
class DownloadViewer extends React.Component<Props> {
|
||||
render() {
|
||||
const { t, file, revision } = this.props;
|
||||
const { t, file } = this.props;
|
||||
return (
|
||||
<div>
|
||||
<article className="media">
|
||||
<div className="content media-left">
|
||||
<h4>{file.name}</h4>
|
||||
</div>
|
||||
<div className="media-content" />
|
||||
<div className="media-right">
|
||||
<DownloadButton
|
||||
url={file._links.self.href}
|
||||
displayName={t("sources.content.downloadButton")}
|
||||
/>
|
||||
</div>
|
||||
</article>
|
||||
<table className="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{t("sources.description")}</td>
|
||||
<td>{file.description}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{t("sources.lastModified")}</td>
|
||||
<td>
|
||||
<DateFromNow date={file.lastModified} />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{t("sources.branch")}</td>
|
||||
<td>{revision}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<DownloadButton
|
||||
url={file._links.self.href}
|
||||
displayName={t("sources.content.downloadButton")}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user