diff --git a/packages/client/src/pages/PortalSettings/categories/integration/ThirdPartyServicesSettings/sub-components/consumerItem.js b/packages/client/src/pages/PortalSettings/categories/integration/ThirdPartyServicesSettings/sub-components/consumerItem.js index aa50790fe2..2d4ce6ea9c 100644 --- a/packages/client/src/pages/PortalSettings/categories/integration/ThirdPartyServicesSettings/sub-components/consumerItem.js +++ b/packages/client/src/pages/PortalSettings/categories/integration/ThirdPartyServicesSettings/sub-components/consumerItem.js @@ -6,6 +6,7 @@ import Box from "@docspace/components/box"; import Text from "@docspace/components/text"; import ConsumerToggle from "./consumerToggle"; import { Base } from "@docspace/components/themes"; +import { thirdpartiesLogo } from "@docspace/common/utils/image-helpers"; const StyledBox = styled(Box)` .consumer-icon { @@ -43,8 +44,7 @@ class ConsumerItem extends React.Component { t, } = this.props; - //TODO: think about assets impßort - const logo = `/images/thirdparties/${consumer.name.toLowerCase()}.svg`; + const logo = thirdpartiesLogo.get(`${consumer.name.toLowerCase()}.svg`); return ( <> diff --git a/packages/common/utils/image-helpers.js b/packages/common/utils/image-helpers.js index acacdf8a38..f1df6c0d53 100644 --- a/packages/common/utils/image-helpers.js +++ b/packages/common/utils/image-helpers.js @@ -1,3 +1,30 @@ +import AppleidSvgUrl from "PUBLIC_DIR/images/thirdparties/appleid.svg?url"; +import BitlySvgUrl from "PUBLIC_DIR/images/thirdparties/bitly.svg?url"; +import BoxSvgUrl from "PUBLIC_DIR/images/thirdparties/box.svg?url"; +import ClickatellSvgUrl from "PUBLIC_DIR/images/thirdparties/clickatell.svg?url"; +import DocusignSvgUrl from "PUBLIC_DIR/images/thirdparties/docusign.svg?url"; +import DropboxSvgUrl from "PUBLIC_DIR/images/thirdparties/dropbox.svg?url"; +import EasybibSvgUrl from "PUBLIC_DIR/images/thirdparties/easybib.svg?url"; +import FacebookSvgUrl from "PUBLIC_DIR/images/thirdparties/facebook.svg?url"; +import FirebaseSvgUrl from "PUBLIC_DIR/images/thirdparties/firebase.svg?url"; +import GoogleSvgUrl from "PUBLIC_DIR/images/thirdparties/google.svg?url"; +import GooglecloudSvgUrl from "PUBLIC_DIR/images/thirdparties/googlecloud.svg?url"; +import LinkedinSvgUrl from "PUBLIC_DIR/images/thirdparties/linkedin.svg?url"; +import MailruSvgUrl from "PUBLIC_DIR/images/thirdparties/mailru.svg?url"; +import MicrosoftSvgUrl from "PUBLIC_DIR/images/thirdparties/microsoft.svg?url"; +import RackspaceSvgUrl from "PUBLIC_DIR/images/thirdparties/rackspace.svg?url"; +import S3SvgUrl from "PUBLIC_DIR/images/thirdparties/s3.svg?url"; +import SelectelSvgUrl from "PUBLIC_DIR/images/thirdparties/selectel.svg?url"; +import SkydriveSvgUrl from "PUBLIC_DIR/images/thirdparties/skydrive.svg?url"; +import SmscSvgUrl from "PUBLIC_DIR/images/thirdparties/smsc.svg?url"; +import TelegramSvgUrl from "PUBLIC_DIR/images/thirdparties/telegram.svg?url"; +import TwilioSvgUrl from "PUBLIC_DIR/images/thirdparties/twilio.svg?url"; +import TwitterSvgUrl from "PUBLIC_DIR/images/thirdparties/twitter.svg?url"; +import VkSvgUrl from "PUBLIC_DIR/images/thirdparties/vk.svg?url"; +import WordpressSvgUrl from "PUBLIC_DIR/images/thirdparties/wordpress.svg?url"; +import YahooSvgUrl from "PUBLIC_DIR/images/thirdparties/yahoo.svg?url"; +import YandexSvgUrl from "PUBLIC_DIR/images/thirdparties/yandex.svg?url"; + import AviSvg24Url from "PUBLIC_DIR/images/icons/24/avi.svg?url"; import CsvSvg24Url from "PUBLIC_DIR/images/icons/24/csv.svg?url"; import DjvuSvg24Url from "PUBLIC_DIR/images/icons/24/djvu.svg?url"; @@ -307,6 +334,7 @@ export const iconSize24 = new Map([ ["xml.svg", XmlSvg24Url], ["xps.svg", XpsSvg24Url], ]); + export const iconSize32 = new Map([ ["avi.svg", AviSvg32Url], ["csv.svg", CsvSvg32Url], @@ -375,6 +403,7 @@ export const iconSize32 = new Map([ ["xml.svg", XmlSvg32Url], ["xps.svg", XpsSvg32Url], ]); + export const iconSize64 = new Map([ ["avi.svg", AviSvg64Url], ["csv.svg", CsvSvg64Url], @@ -437,6 +466,7 @@ export const iconSize64 = new Map([ ["xml.svg", XmlSvg64Url], ["xps.svg", XpsSvg64Url], ]); + export const iconSize96 = new Map([ ["avi.svg", AviSvg96Url], ["csv.svg", CsvSvg96Url], @@ -499,3 +529,32 @@ export const iconSize96 = new Map([ ["xml.svg", XmlSvg96Url], ["xps.svg", XpsSvg96Url], ]); + +export const thirdpartiesLogo = new Map([ + ["appleid.svg", AppleidSvgUrl], + ["bitly.svg", BitlySvgUrl], + ["box.svg", BoxSvgUrl], + ["clickatell.svg", ClickatellSvgUrl], + ["docusign.svg", DocusignSvgUrl], + ["dropbox.svg", DropboxSvgUrl], + ["easybib.svg", EasybibSvgUrl], + ["facebook.svg", FacebookSvgUrl], + ["firebase.svg", FirebaseSvgUrl], + ["google.svg", GoogleSvgUrl], + ["googlecloud.svg", GooglecloudSvgUrl], + ["linkedin.svg", LinkedinSvgUrl], + ["mailru.svg", MailruSvgUrl], + ["microsoft.svg", MicrosoftSvgUrl], + ["rackspace.svg", RackspaceSvgUrl], + ["s3.svg", S3SvgUrl], + ["selectel.svg", SelectelSvgUrl], + ["skydrive.svg", SkydriveSvgUrl], + ["smsc.svg", SmscSvgUrl], + ["telegram.svg", TelegramSvgUrl], + ["twilio.svg", TwilioSvgUrl], + ["twitter.svg", TwitterSvgUrl], + ["vk.svg", VkSvgUrl], + ["wordpress.svg", WordpressSvgUrl], + ["yahoo.svg", YahooSvgUrl], + ["yandex.svg", YandexSvgUrl], +]);