diff --git a/packages/web/src/javascripts/Components/ContentListView/Header/DisplayOptionsMenu.tsx b/packages/web/src/javascripts/Components/ContentListView/Header/DisplayOptionsMenu.tsx index 5f95a96e5..ed985905a 100644 --- a/packages/web/src/javascripts/Components/ContentListView/Header/DisplayOptionsMenu.tsx +++ b/packages/web/src/javascripts/Components/ContentListView/Header/DisplayOptionsMenu.tsx @@ -5,6 +5,7 @@ import { isSmartView, isSystemView, PrefKey, + SystemViewId, TagMutator, TagPreferences, VectorIconNameOrEmoji, @@ -23,6 +24,7 @@ import NoSubscriptionBanner from '@/Components/NoSubscriptionBanner/NoSubscripti import MenuRadioButtonItem from '@/Components/Menu/MenuRadioButtonItem' import MenuSwitchButtonItem from '@/Components/Menu/MenuSwitchButtonItem' import { Pill } from '@/Components/Preferences/PreferencesComponents/Content' +import { featureTrunkEnabled, FeatureTrunkName } from '@/FeatureTrunk' const DailyEntryModeEnabled = true @@ -201,6 +203,9 @@ const DisplayOptionsMenu: FunctionComponent = ({ ) } + const isFilesTableViewEnabled = featureTrunkEnabled(FeatureTrunkName.FilesTableView) + const shouldHideNonApplicableOptions = isFilesTableViewEnabled && selectedTag?.uuid === SystemViewId.Files + return (
Preferences for
@@ -283,76 +288,80 @@ const DisplayOptionsMenu: FunctionComponent = ({ ) : null} - -
View
- {!isFilesSmartView && ( - -
Show note preview
-
+ {!shouldHideNonApplicableOptions && ( + <> + +
View
+ {!isFilesSmartView && ( + +
Show note preview
+
+ )} + + Show date + + + Show tags + + + Show icon + + +
Other
+ + Show pinned + + + Show protected + + + Show archived + + + Show trashed + + )} - - Show date - - - Show tags - - - Show icon - - -
Other
- - Show pinned - - - Show protected - - - Show archived - - - Show trashed - {currentMode === 'tag' && DailyEntryModeEnabled && ( <> @@ -376,15 +385,18 @@ const DisplayOptionsMenu: FunctionComponent = ({ )} - - - + {!shouldHideNonApplicableOptions && ( + <> + + + + )}
) }