From 68c011694af51346b518fe56b608595cdc0120dd Mon Sep 17 00:00:00 2001 From: hexxa Date: Sun, 16 Jan 2022 12:22:09 +0800 Subject: [PATCH] fix(fe/panel_files): remove detail info in the table view --- src/client/web/src/components/panel_files.tsx | 48 +++++-------------- 1 file changed, 13 insertions(+), 35 deletions(-) diff --git a/src/client/web/src/components/panel_files.tsx b/src/client/web/src/components/panel_files.tsx index de7af78..f2695bd 100644 --- a/src/client/web/src/components/panel_files.tsx +++ b/src/client/web/src/components/panel_files.tsx @@ -428,6 +428,10 @@ export class FilesPanel extends React.Component { ); + const modTimeTitle = this.props.msg.pkg.get("item.modTime"); + const sizeTitle = this.props.msg.pkg.get("item.size"); + const itemSize = FileSize(item.size, { round: 0 }); + const content = item.isDir ? (
@@ -438,7 +442,10 @@ export class FilesPanel extends React.Component { {item.name}
- {item.modTime.slice(0, item.modTime.indexOf("T"))} + + {`${modTimeTitle}: `} + {`${item.modTime}`} +
@@ -454,38 +461,16 @@ export class FilesPanel extends React.Component { {item.name}
- {item.modTime.slice(0, item.modTime.indexOf("T"))} -  /  - {FileSize(item.size, { round: 0 })} + {`${sizeTitle}: `} + {`${itemSize} | `} + {`SHA1: `} + {item.sha1}
- -
- {`SHA1: `}
, - this.generateHash(itemPath)} - size={"2rem"} - className="grey3-font" - />, - ])} - className="item-info" - childrenStyles={List([{}, { justifyContent: "flex-end" }])} - /> -
{item.sha1}
- ); - const detailColor = this.state.showDetail.has(item.name) - ? "cyan1" - : "grey0"; const op = item.isDir ? (
this.select(item.name)} className="float-l"> @@ -496,13 +481,6 @@ export class FilesPanel extends React.Component {
) : (
- this.toggleDetail(item.name)} - className="float-l" - > - {getIcon("RiMore2Fill", "1.8rem", detailColor)} - - this.select(item.name)} className="float-l"> {isSelected ? getIcon("RiCheckboxFill", "1.8rem", "cyan1") @@ -577,7 +555,7 @@ export class FilesPanel extends React.Component { ? `${dirPath}${item.name}` : `${dirPath}/${item.name}`; - const selectedIconColor = isSelected ? "cyan1-font" : "grey0-font"; + const selectedIconColor = isSelected ? "cyan1-font" : "black1-font"; const descIconColor = this.state.showDetail.has(item.name) ? "cyan1-font"