From 61fd859539e5fc9fa3ebdafb52290284cc4082e9 Mon Sep 17 00:00:00 2001 From: Luis Felix Date: Thu, 22 Aug 2024 23:12:13 -0400 Subject: [PATCH] OV-29: * use of icons of FontAwsome as suggested --- .../bundles/common/components/components.ts | 10 ++- .../bundles/common/components/icons/icons.tsx | 80 ------------------- 2 files changed, 9 insertions(+), 81 deletions(-) delete mode 100644 frontend/src/bundles/common/components/icons/icons.tsx diff --git a/frontend/src/bundles/common/components/components.ts b/frontend/src/bundles/common/components/components.ts index f553b549b..67c22df79 100644 --- a/frontend/src/bundles/common/components/components.ts +++ b/frontend/src/bundles/common/components/components.ts @@ -8,7 +8,6 @@ export { RouterProvider } from './router-provider/router-provider.js'; export { VideoModal } from './video-modal/video-modal.js'; export { DownloadIcon } from '@chakra-ui/icons'; export { ViewIcon, ViewOffIcon } from '@chakra-ui/icons'; -export { createIcon } from '@chakra-ui/react'; export { Box, Center, @@ -20,6 +19,7 @@ export { FormControl, FormErrorMessage, Heading, + Icon, IconButton, InputGroup, InputRightElement, @@ -27,6 +27,14 @@ export { Text, VStack, } from '@chakra-ui/react'; +export { + faCircleUser, + faCloudArrowUp, + faFont, + faT, + faTableColumns, +} from '@fortawesome/free-solid-svg-icons'; +export { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; export { FormikProvider as FormProvider } from 'formik'; export { Provider as StoreProvider } from 'react-redux'; export { Outlet as RouterOutlet } from 'react-router-dom'; diff --git a/frontend/src/bundles/common/components/icons/icons.tsx b/frontend/src/bundles/common/components/icons/icons.tsx deleted file mode 100644 index a412bcb82..000000000 --- a/frontend/src/bundles/common/components/icons/icons.tsx +++ /dev/null @@ -1,80 +0,0 @@ -import { createIcon } from '../components.js'; - -const TemplatesIcon = createIcon({ - displayName: 'Templates', - viewBox: '0 0 18 18', - d: 'M2 18c-.55 0-1.02-.196-1.413-.587A1.926 1.926 0 010 16V2C0 1.45.196.98.588.587A1.926 1.926 0 012 0h14c.55 0 1.02.196 1.413.588C17.803.979 18 1.45 18 2v14c0 .55-.196 1.02-.587 1.413A1.926 1.926 0 0116 18H2zm14-5H2v3h14v-3zm-2.5-2H16V2h-2.5v9zM2 11h2.5V2H2v9zm4.5 0h5V2h-5v9z', -}); - -const AvatarIcon = createIcon({ - displayName: 'Avatar', - viewBox: '0 0 20 20', - d: 'M7 12.25c-.35 0-.646-.12-.888-.363A1.207 1.207 0 015.75 11c0-.35.12-.646.362-.887.242-.242.538-.363.888-.363s.646.12.888.363c.241.241.362.537.362.887s-.12.646-.362.887A1.207 1.207 0 017 12.25zm6 0c-.35 0-.646-.12-.887-.363A1.207 1.207 0 0111.75 11c0-.35.12-.646.363-.887.241-.242.537-.363.887-.363s.646.12.887.363c.242.241.363.537.363.887s-.12.646-.363.887a1.207 1.207 0 01-.887.363zM10 18c2.233 0 4.125-.775 5.675-2.325C17.225 14.125 18 12.233 18 10c0-.4-.025-.787-.075-1.162a4.844 4.844 0 00-.275-1.088c-.35.083-.7.146-1.05.188-.35.041-.717.062-1.1.062a9.787 9.787 0 01-4.3-.975A9.983 9.983 0 017.75 4.3a9.86 9.86 0 01-2.287 3.388A9.768 9.768 0 012 9.85V10c0 2.233.775 4.125 2.325 5.675C5.875 17.225 7.767 18 10 18zm0 2a9.738 9.738 0 01-3.9-.788 10.099 10.099 0 01-3.175-2.137c-.9-.9-1.612-1.958-2.137-3.175A9.738 9.738 0 010 10c0-1.383.263-2.683.787-3.9a10.099 10.099 0 012.138-3.175c.9-.9 1.958-1.612 3.175-2.137A9.738 9.738 0 0110 0c1.383 0 2.683.263 3.9.787a10.098 10.098 0 013.175 2.138c.9.9 1.613 1.958 2.137 3.175A9.738 9.738 0 0120 10a9.738 9.738 0 01-.788 3.9 10.098 10.098 0 01-2.137 3.175c-.9.9-1.958 1.613-3.175 2.137A9.738 9.738 0 0110 20zM8.65 2.125a8.016 8.016 0 002.85 2.813C12.7 5.646 14.033 6 15.5 6c.233 0 .458-.013.675-.037.217-.026.442-.055.675-.088A8.016 8.016 0 0014 3.062C12.8 2.354 11.467 2 10 2c-.233 0-.458.013-.675.038-.217.025-.442.054-.675.087zm-6.225 5.35A7.987 7.987 0 004.65 5.6a7.96 7.96 0 001.425-2.575A7.987 7.987 0 003.85 4.9a7.96 7.96 0 00-1.425 2.575z', -}); - -const ScriptIcon = createIcon({ - displayName: 'Script', - viewBox: '0 0 20 20', - d: 'M6.45 15.975c.267 0 .458-.088.575-.262a1.46 1.46 0 00.225-.613c.033-.167.063-.333.088-.5.024-.167.054-.35.087-.55.033-.183.07-.383.112-.6.042-.217.088-.467.138-.75.383-.083.758-.154 1.125-.212.367-.059.725-.105 1.075-.138.383-.05.762-.088 1.137-.112.375-.025.738-.055 1.088-.088a14.583 14.583 0 00.55 1.975c.133.383.28.7.438.95.158.25.354.467.587.65.233.183.487.283.762.3a.98.98 0 00.713-.225c.15-.117.225-.292.225-.525 0-.233-.067-.525-.2-.875a4.578 4.578 0 01-.213-.563 6.29 6.29 0 00-.212-.587 84.039 84.039 0 01-.225-.637 8.6 8.6 0 01-.175-.563c.217-.017.412-.054.588-.113a1.29 1.29 0 00.437-.237c.117-.1.204-.22.262-.362.059-.142.088-.296.088-.463a.885.885 0 00-.112-.463.878.878 0 00-.338-.312 1.494 1.494 0 00-.563-.162 3.379 3.379 0 00-.762.012l-.1-.887a17.417 17.417 0 00-.125-.888 24.24 24.24 0 01-.137-.875 6.051 6.051 0 00-.188-.875 3.873 3.873 0 00-.425-1.112 3.034 3.034 0 00-.625-.763 2.274 2.274 0 00-.713-.412A2.565 2.565 0 0010.775 4a2.53 2.53 0 00-1.05.225c-.333.15-.667.375-1 .675-.183.183-.367.38-.55.587a4.789 4.789 0 00-.525.738 1.231 1.231 0 00-.363-.2 1.23 1.23 0 00-.362-.05.717.717 0 00-.462.15c-.125.1-.188.267-.188.5a8.145 8.145 0 01-.2 1.8c-.083.433-.175.862-.275 1.287-.1.425-.192.855-.275 1.288-.183.033-.346.08-.488.137-.141.059-.262.121-.362.188a.735.735 0 00-.287.313.907.907 0 00-.088.387c0 .117.017.225.05.325s.092.192.175.275a.798.798 0 00.3.188c.117.041.25.07.4.087-.017.2-.03.387-.037.563-.009.175-.013.345-.013.512 0 .35.025.65.075.9.05.25.125.458.225.625.1.167.23.287.388.363.158.075.354.112.587.112zM8.225 10.4c.1-.383.217-.754.35-1.113.133-.358.283-.729.45-1.112.267-.617.55-1.108.85-1.475.3-.367.567-.55.8-.55.183 0 .342.142.475.425.133.283.242.708.325 1.275.05.333.092.692.125 1.075s.067.742.1 1.075c-.283.017-.575.037-.875.063-.3.024-.592.054-.875.087-.283.033-.57.07-.862.112-.292.042-.58.088-.863.138zM2 20c-.55 0-1.02-.196-1.413-.587A1.926 1.926 0 010 18V2C0 1.45.196.98.588.587A1.926 1.926 0 012 0h16c.55 0 1.02.196 1.413.588C19.803.979 20 1.45 20 2v16c0 .55-.196 1.02-.587 1.413A1.926 1.926 0 0118 20H2zm0-2h16V2H2v16z', -}); - -const TextIcon = createIcon({ - displayName: 'Text', - viewBox: '0 0 20 16', - d: 'M5 16V3H0V0h13v3H8v13H5zm9 0V8h-3V5h9v3h-3v8h-3z', -}); - -const AssetsIcon = createIcon({ - displayName: 'Assets', - viewBox: '0 0 22 16', - d: 'M5.5 16c-1.517 0-2.813-.525-3.888-1.575C.537 13.375 0 12.092 0 10.575c0-1.3.392-2.458 1.175-3.475S2.983 5.433 4.25 5.15c.417-1.533 1.25-2.775 2.5-3.725C8 .475 9.417 0 11 0c1.95 0 3.604.68 4.963 2.038C17.32 3.396 18 5.05 18 7c1.15.133 2.104.63 2.863 1.488A4.407 4.407 0 0122 11.5c0 1.25-.438 2.313-1.313 3.188C19.813 15.562 18.75 16 17.5 16H12c-.55 0-1.02-.196-1.412-.588A1.926 1.926 0 0110 14V8.85L8.4 10.4 7 9l4-4 4 4-1.4 1.4L12 8.85V14h5.5c.7 0 1.292-.242 1.775-.725.483-.483.725-1.075.725-1.775s-.242-1.292-.725-1.775C18.792 9.242 18.2 9 17.5 9H16V7c0-1.383-.488-2.563-1.463-3.538C13.563 2.487 12.383 2 11 2s-2.563.487-3.537 1.462C6.487 4.438 6 5.617 6 7h-.5c-.967 0-1.792.342-2.475 1.025A3.372 3.372 0 002 10.5c0 .967.342 1.792 1.025 2.475A3.372 3.372 0 005.5 14H8v2H5.5z', -}); - -const ChatGhptIcon = createIcon({ - displayName: 'ChatGhpt', - viewBox: '0 0 24 20', - path: ( - <> - - - - - - - - ), -}); - -const LanguageIcon = createIcon({ - displayName: 'Language', - viewBox: '0 0 20 18', - d: 'M9.864 18l4.118-10.8h1.9L20 18h-1.9l-.973-2.745h-4.39L11.766 18h-1.9zm-7.15-2.7l-1.266-1.26 4.57-4.545a10.416 10.416 0 01-1.437-1.8A15.57 15.57 0 013.394 5.4h1.9c.302.585.603 1.095.905 1.53.302.435.664.87 1.086 1.305.498-.495 1.014-1.189 1.55-2.081.535-.893.939-1.744 1.21-2.554H0V1.8h6.335V0h1.81v1.8h6.335v1.8h-2.625c-.316 1.08-.792 2.19-1.425 3.33-.634 1.14-1.26 2.01-1.878 2.61l2.172 2.205-.679 1.845-2.76-2.813-4.57 4.523zm10.59-1.62h3.257l-1.629-4.59-1.629 4.59z', -}); - -export { - AssetsIcon, - AvatarIcon, - ChatGhptIcon, - LanguageIcon, - ScriptIcon, - TemplatesIcon, - TextIcon, -};