mirror of
https://github.com/eyebluecn/tank-front
synced 2024-04-21 12:31:55 +00:00
Fix some details.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
@import "../bootstrap/variables.less";
|
||||
//custom basic color
|
||||
@brand-primary: #358BFF;
|
||||
@brand-primary: #215891;
|
||||
@brand-success: #67C23A;
|
||||
@brand-info: #2DB7F5;
|
||||
@brand-warning: #E6A23C;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
enum Color {
|
||||
PRIMARY = "#358BFF",
|
||||
PRIMARY = "#215891",
|
||||
INFO = "#2DB7F5",
|
||||
SUCCESS = "#67C23A",
|
||||
WARNING = "#E6A23C",
|
||||
|
||||
@@ -98,6 +98,7 @@ let LangEn = {
|
||||
create: "Create",
|
||||
createTime: "Create Time",
|
||||
updateTime: "Update Time",
|
||||
deleteTime: "Deleted Time",
|
||||
root: "Root",
|
||||
fillInPicLink: "Fill in Picture Link",
|
||||
rePick: "Re Choose",
|
||||
@@ -134,7 +135,8 @@ let LangEn = {
|
||||
notChoose: "Not choose any file",
|
||||
exceed1000: "Exceed file limit 1000",
|
||||
noImageCache: "No image cache",
|
||||
recycleBin: "Recycle bin"
|
||||
recycleBin: "Recycle bin",
|
||||
deleted: "Deleted",
|
||||
},
|
||||
router: {
|
||||
allFiles: "All Files",
|
||||
|
||||
@@ -97,8 +97,9 @@ let LangZh = {
|
||||
moveTo: "移动到",
|
||||
upload: "上传",
|
||||
create: "新建",
|
||||
createTime: "创建日期",
|
||||
updateTime: "修改日期",
|
||||
createTime: "创建时间",
|
||||
updateTime: "修改时间",
|
||||
deleteTime: "删除时间",
|
||||
root: "根目录",
|
||||
fillInPicLink: "请填写图片链接",
|
||||
rePick: "重新选择",
|
||||
@@ -135,7 +136,8 @@ let LangZh = {
|
||||
notChoose: "没有选择文件",
|
||||
exceed1000: "最多只能同时选取1000个文件",
|
||||
noImageCache: "暂无图片缓存数据",
|
||||
recycleBin: "回收站"
|
||||
recycleBin: "回收站",
|
||||
deleted: "已删除",
|
||||
},
|
||||
router: {
|
||||
allFiles: "全部文件",
|
||||
|
||||
@@ -261,6 +261,7 @@ export default class List extends TankComponent<IProps, IState> {
|
||||
}
|
||||
};
|
||||
|
||||
//TODO: 1. 时间应该显示删除时间。 2. 面包屑跳转有问题。
|
||||
render() {
|
||||
const { pager, selectedMatters } = this;
|
||||
return (
|
||||
|
||||
+20
-10
@@ -1,9 +1,9 @@
|
||||
import React from "react";
|
||||
import { RouteComponentProps } from "react-router-dom";
|
||||
import {RouteComponentProps} from "react-router-dom";
|
||||
import "./Detail.less";
|
||||
import TankComponent from "../../common/component/TankComponent";
|
||||
import Matter from "../../common/model/matter/Matter";
|
||||
import { Spin, Space } from "antd";
|
||||
import {Space, Spin, Tag} from "antd";
|
||||
import StringUtil from "../../common/util/StringUtil";
|
||||
import TankTitle from "../widget/TankTitle";
|
||||
import DownloadToken from "../../common/model/download/token/DownloadToken";
|
||||
@@ -14,14 +14,17 @@ import ClipboardUtil from "../../common/util/ClipboardUtil";
|
||||
import Lang from "../../common/model/global/Lang";
|
||||
import InfoCell from "../widget/InfoCell";
|
||||
import TankContentCard from "../widget/TankContentCard";
|
||||
import Color from "../../common/model/base/option/Color";
|
||||
|
||||
interface RouteParam {
|
||||
uuid: string;
|
||||
}
|
||||
|
||||
interface IProps extends RouteComponentProps<RouteParam> {}
|
||||
interface IProps extends RouteComponentProps<RouteParam> {
|
||||
}
|
||||
|
||||
interface IState {}
|
||||
interface IState {
|
||||
}
|
||||
|
||||
export default class Detail extends TankComponent<IProps, IState> {
|
||||
matter = new Matter();
|
||||
@@ -33,7 +36,7 @@ export default class Detail extends TankComponent<IProps, IState> {
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
const { uuid } = this.props.match.params;
|
||||
const {uuid} = this.props.match.params;
|
||||
this.matter.uuid = uuid;
|
||||
let that = this;
|
||||
this.matter.httpDetail((response: any) => {
|
||||
@@ -45,7 +48,7 @@ export default class Detail extends TankComponent<IProps, IState> {
|
||||
}
|
||||
|
||||
copyLink = () => {
|
||||
const { privacy } = this.matter;
|
||||
const {privacy} = this.matter;
|
||||
const textToCopy = this.matter.getDownloadUrl(
|
||||
privacy ? this.downloadToken.uuid! : undefined
|
||||
);
|
||||
@@ -55,16 +58,16 @@ export default class Detail extends TankComponent<IProps, IState> {
|
||||
};
|
||||
|
||||
render() {
|
||||
const { matter } = this;
|
||||
const {matter} = this;
|
||||
return (
|
||||
<Spin tip={Lang.t("loading")} spinning={matter.detailLoading}>
|
||||
<div className="page-matter-detail">
|
||||
<TankTitle name={Lang.t("matter.fileDetail")} />
|
||||
<TankTitle name={Lang.t("matter.fileDetail")}/>
|
||||
|
||||
<TankContentCard>
|
||||
<div className="info">
|
||||
<InfoCell name={Lang.t("matter.fileInfo")}>
|
||||
{matter.name}
|
||||
{matter.name} <Tag color={Color.DANGER}>{Lang.t("matter.deleted")}</Tag>
|
||||
</InfoCell>
|
||||
<InfoCell name={Lang.t("matter.path")}>
|
||||
{matter.path}
|
||||
@@ -75,6 +78,13 @@ export default class Detail extends TankComponent<IProps, IState> {
|
||||
<InfoCell name={Lang.t("matter.updateTime")}>
|
||||
{DateUtil.simpleDateTime(matter.updateTime)}
|
||||
</InfoCell>
|
||||
{
|
||||
matter.deleted && (
|
||||
<InfoCell name={Lang.t("matter.deleteTime")}>
|
||||
{DateUtil.simpleDateTime(matter.deleteTime)}
|
||||
</InfoCell>
|
||||
)
|
||||
}
|
||||
{!matter.dir ? (
|
||||
<>
|
||||
<InfoCell name={Lang.t("matter.size")}>
|
||||
@@ -105,7 +115,7 @@ export default class Detail extends TankComponent<IProps, IState> {
|
||||
</div>
|
||||
|
||||
{!matter.dir && matter.uuid && matter.isImage() ? (
|
||||
<ImageCacheList initFilter={{ matterUuid: matter.uuid }} />
|
||||
<ImageCacheList initFilter={{matterUuid: matter.uuid}}/>
|
||||
) : null}
|
||||
</Spin>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user