From c0fe1ffe55ab0b9cbeee0ded79f4f583481d8b14 Mon Sep 17 00:00:00 2001 From: hexxa Date: Tue, 21 Dec 2021 20:12:24 +0800 Subject: [PATCH] fix(fe/panel_files): small fixes --- src/client/web/src/components/panel_files.tsx | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/client/web/src/components/panel_files.tsx b/src/client/web/src/components/panel_files.tsx index 3a0a371..0543b4f 100644 --- a/src/client/web/src/components/panel_files.tsx +++ b/src/client/web/src/components/panel_files.tsx @@ -480,6 +480,7 @@ export class FilesPanel extends React.Component { ); + const detailColor = this.state.showDetail.has(item.name) ? "cyan0" : "grey0"; const op = item.isDir ? (
this.select(item.name)} className="float-l"> @@ -494,7 +495,7 @@ export class FilesPanel extends React.Component { onClick={() => this.toggleDetail(item.name)} className="float-l" > - {getIcon("RiInformationFill", "1.8rem", "black1")} + {getIcon("RiInformationFill", "1.8rem", detailColor)} this.select(item.name)} className="float-l"> @@ -781,6 +782,14 @@ export class FilesPanel extends React.Component { } ); + const rowsViewColorClass = + this.props.ui.control.controls.get(filesViewCtrl) === "rows" + ? "cyan0-font" + : "black-font"; + const tableViewColorClass = + this.props.ui.control.controls.get(filesViewCtrl) === "table" + ? "cyan0-font" + : "black-font"; const itemListPane = (
@@ -836,15 +845,15 @@ export class FilesPanel extends React.Component { { this.setView("rows"); }} />, { this.setView("table"); }}