From 5b650c88b3bcd88d9a69f736fdf55a68c012d3d9 Mon Sep 17 00:00:00 2001 From: Tilo Date: Mon, 16 Oct 2023 12:44:01 +0200 Subject: [PATCH] [ENG-1252] Hidden files will now be 50% opacity. (#1548) * [ENG-1252] Hidden files will now be grayscale and at 50% opacity. * [ENG-1252] Removed grayscale * [ENG-1252] Make enverything opacity 50 --- interface/app/$libraryId/Explorer/View/GridList.tsx | 2 +- interface/app/$libraryId/Explorer/View/GridView.tsx | 5 +++-- interface/app/$libraryId/Explorer/View/ListView/index.tsx | 8 ++++++-- interface/app/$libraryId/Explorer/View/MediaView.tsx | 7 +++++-- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/interface/app/$libraryId/Explorer/View/GridList.tsx b/interface/app/$libraryId/Explorer/View/GridList.tsx index cac2a748e..a3648fa19 100644 --- a/interface/app/$libraryId/Explorer/View/GridList.tsx +++ b/interface/app/$libraryId/Explorer/View/GridList.tsx @@ -20,6 +20,7 @@ import { getQuickPreviewStore } from '../QuickPreview/store'; import { getExplorerStore, isCut, useExplorerStore } from '../store'; import { uniqueId } from '../util'; import { useExplorerViewContext } from '../ViewContext'; +import clsx from 'clsx'; const SelectoContext = createContext<{ selecto: React.RefObject; @@ -625,7 +626,6 @@ export default ({ children }: { children: RenderItem }) => { {(index) => { const item = explorer.items?.[index]; - if (!item) return null; return ( diff --git a/interface/app/$libraryId/Explorer/View/GridView.tsx b/interface/app/$libraryId/Explorer/View/GridView.tsx index 9d8fb604d..323e86cf4 100644 --- a/interface/app/$libraryId/Explorer/View/GridView.tsx +++ b/interface/app/$libraryId/Explorer/View/GridView.tsx @@ -25,6 +25,7 @@ const GridViewItem = memo(({ data, selected, cut, isRenaming }: GridViewItemProp const location = getItemLocation(data); const isEphemeralLocation = useMatch('/:libraryId/ephemeral/:ephemeralId'); const isFolder = 'is_dir' in data.item ? data.item.is_dir || data.type === 'Location' : false; + const hidden = filePathData?.hidden ?? false; const showSize = showBytesInGridView && @@ -34,7 +35,7 @@ const GridViewItem = memo(({ data, selected, cut, isRenaming }: GridViewItemProp (!isRenaming || (isRenaming && !selected)); return ( - +