From 61081ca6b90bb033d9b747099fd99ad3d70926da Mon Sep 17 00:00:00 2001 From: Andy Chen <44120813+achen5671@users.noreply.github.com> Date: Thu, 15 Aug 2024 13:09:16 -0400 Subject: [PATCH] new viewmode setting (#10976) --- .../editor/panels/Assets/container/index.tsx | 47 ++++++++++++--- .../editor/panels/Files/container/index.tsx | 57 ------------------- .../src/primitives/tailwind/Slider/index.tsx | 2 +- 3 files changed, 41 insertions(+), 65 deletions(-) diff --git a/packages/ui/src/components/editor/panels/Assets/container/index.tsx b/packages/ui/src/components/editor/panels/Assets/container/index.tsx index 75977e7330..75677ce558 100644 --- a/packages/ui/src/components/editor/panels/Assets/container/index.tsx +++ b/packages/ui/src/components/editor/panels/Assets/container/index.tsx @@ -50,16 +50,18 @@ import { FiRefreshCcw } from 'react-icons/fi' import { HiDotsVertical } from 'react-icons/hi' import { HiMagnifyingGlass, HiOutlineFolder, HiOutlinePlusCircle } from 'react-icons/hi2' import { IoIosArrowDown, IoIosArrowForward } from 'react-icons/io' -import { IoArrowBack } from 'react-icons/io5' +import { IoArrowBack, IoSettingsSharp } from 'react-icons/io5' import { twMerge } from 'tailwind-merge' import Button from '../../../../../primitives/tailwind/Button' import Input from '../../../../../primitives/tailwind/Input' import LoadingView from '../../../../../primitives/tailwind/LoadingView' +import Slider from '../../../../../primitives/tailwind/Slider' import Tooltip from '../../../../../primitives/tailwind/Tooltip' import { ContextMenu } from '../../../../tailwind/ContextMenu' import InfiniteScroll from '../../../../tailwind/InfiniteScroll' +import { Popup } from '../../../../tailwind/Popup' +import InputGroup from '../../../input/Group' import DeleteFileModal from '../../Files/browserGrid/DeleteFileModal' -import { ViewModeSettings } from '../../Files/container' import { FileIcon } from '../../Files/icon' import { FileUploadProgress } from '../../Files/upload/FileUploadProgress' import { AssetIconMap } from '../icons' @@ -125,6 +127,37 @@ function mapCategoriesHelper(collapsedCategories: { [key: string]: boolean }) { return result } +const ViewModeSettings = () => { + const { t } = useTranslation() + + const viewModeSettings = useHookstate(getMutableState(FilesViewModeSettings)) + + return ( + +