diff --git a/packages/client/src/components/Article/Body/Items.js b/packages/client/src/components/Article/Body/Items.js index 4306fc231a..4320ecb726 100644 --- a/packages/client/src/components/Article/Body/Items.js +++ b/packages/client/src/components/Article/Body/Items.js @@ -1,5 +1,7 @@ -import CatalogUserReactSvgUrl from "PUBLIC_DIR/images/catalog.user.react.svg?url"; -import CatalogFolderReactSvgUrl from "PUBLIC_DIR/images/catalog.folder.react.svg?url"; +import CatalogFolderReactSvgUrl from "ASSETS_DIR/images/catalog.folder.react.svg?url"; +import ClearTrashReactSvgUrl from "ASSETS_DIR/images/clear.trash.react.svg?url"; +import CatalogUserReactSvgUrl from "PUBLIC_DIR/images/catalog.user.react.svg?url"; +//import CatalogFolderReactSvgUrl from "PUBLIC_DIR/images/catalog.folder.react.svg?url"; import CatalogArchiveReactSvgUrl from "PUBLIC_DIR/images/catalog.archive.react.svg?url"; import CatalogSharedReactSvgUrl from "PUBLIC_DIR/images/catalog.shared.react.svg?url"; import CatalogPortfolioReactSvgUrl from "PUBLIC_DIR/images/catalog.portfolio.react.svg?url"; @@ -219,7 +221,7 @@ const Items = ({ ); const getFolderIcon = React.useCallback((item) => { - let iconUrl = "images/catalog.folder.react.svg"; + let iconUrl = CatalogFolderReactSvgUrl; switch (item.rootFolderType) { case FolderType.USER: @@ -318,7 +320,7 @@ const Items = ({ ? item.newItems > 0 && true : isTrash && !trashIsEmpty; const labelBadge = showBadge ? item.newItems : null; - const iconBadge = isTrash ? "images/clear.trash.react.svg" : null; + const iconBadge = isTrash ? ClearTrashReactSvgUrl : null; return ( @@ -205,7 +211,7 @@ const PureThirdPartyListContainer = ({ {boxConnectItem && ( @@ -213,7 +219,7 @@ const PureThirdPartyListContainer = ({ {dropboxConnectItem && ( @@ -221,7 +227,7 @@ const PureThirdPartyListContainer = ({ {oneDriveConnectItem && ( @@ -229,7 +235,7 @@ const PureThirdPartyListContainer = ({ {nextCloudConnectItem && ( @@ -237,13 +243,13 @@ const PureThirdPartyListContainer = ({ {/* {webDavConnectItem && ( )} */} { { id: "actions_upload-folders", className: "main-button_drop-down", - icon: "images/actions.upload.react.svg", + icon: ActionsUploadReactSvgUrl, label: t("UploadFolder"), disabled: isPrivacy, onClick: onUploadFolderClick, @@ -244,14 +253,14 @@ const ArticleMainButtonContent = (props) => { { id: "actions_template", className: "main-button_drop-down", - icon: "images/form.react.svg", + icon: FormReactSvgUrl, label: t("Translations:NewForm"), key: "new-form", items: [ { id: "actions_template_blank", className: "main-button_drop-down_sub", - icon: "images/form.blank.react.svg", + icon: FormBlankReactSvgUrl, label: t("Translations:SubNewForm"), onClick: onCreate, action: "docxf", @@ -260,7 +269,7 @@ const ArticleMainButtonContent = (props) => { { id: "actions_template_from-file", className: "main-button_drop-down_sub", - icon: "images/form.file.react.svg", + icon: FormFileReactSvgUrl, label: t("Translations:SubNewFormFile"), onClick: onShowSelectFileDialog, disabled: isPrivacy, @@ -269,7 +278,7 @@ const ArticleMainButtonContent = (props) => { { id: "actions_template_oforms-gallery", className: "main-button_drop-down_sub", - icon: "images/form.gallery.react.svg", + icon: FormGalleryReactSvgUrl, label: t("Common:OFORMsGallery"), onClick: onShowGallery, disabled: isPrivacy, @@ -313,7 +322,7 @@ const ArticleMainButtonContent = (props) => { { id: "actions_new-document", className: "main-button_drop-down", - icon: "images/actions.documents.react.svg", + icon: ActionsDocumentsReactSvgUrl, label: t("NewDocument"), onClick: onCreate, action: "docx", @@ -322,7 +331,7 @@ const ArticleMainButtonContent = (props) => { { id: "actions_new-spreadsheet", className: "main-button_drop-down", - icon: "images/spreadsheet.react.svg", + icon: SpreadsheetReactSvgUrl, label: t("NewSpreadsheet"), onClick: onCreate, action: "xlsx", @@ -331,7 +340,7 @@ const ArticleMainButtonContent = (props) => { { id: "actions_new-presentation", className: "main-button_drop-down", - icon: "images/actions.presentation.react.svg", + icon: ActionsPresentationReactSvgUrl, label: t("NewPresentation"), onClick: onCreate, action: "pptx", @@ -341,7 +350,7 @@ const ArticleMainButtonContent = (props) => { { id: "actions_new-folder", className: "main-button_drop-down", - icon: "images/catalog.folder.react.svg", + icon: CatalogFolderReactSvgUrl, label: t("NewFolder"), onClick: onCreate, key: "new-folder", @@ -364,7 +373,7 @@ const ArticleMainButtonContent = (props) => { { id: "actions_upload-files", className: "main-button_drop-down", - icon: "images/actions.upload.react.svg", + icon: ActionsUploadReactSvgUrl, label: t("UploadFiles"), onClick: onUploadFileClick, key: "upload-files", diff --git a/packages/client/src/components/Badges.js b/packages/client/src/components/Badges.js index 0a502b1658..29ed25f89b 100644 --- a/packages/client/src/components/Badges.js +++ b/packages/client/src/components/Badges.js @@ -1,4 +1,5 @@ -import AccessEditFormMediumReactSvgUrl from "PUBLIC_DIR/images/access.edit.form.medium.react.svg?url"; +import UnpinReactSvgUrl from "ASSETS_DIR/images/unpin.react.svg?url"; +import AccessEditFormMediumReactSvgUrl from "PUBLIC_DIR/images/access.edit.form.medium.react.svg?url"; import AccessEditFormReactSvgUrl from "PUBLIC_DIR/images/access.edit.form.react.svg?url"; import FileActionsConvertEditDocReactSvgUrl from "PUBLIC_DIR/images/file.actions.convert.edit.doc.react.svg?url"; import RefreshReactSvgUrl from "PUBLIC_DIR/images/refresh.react.svg?url"; @@ -119,7 +120,7 @@ const Badges = ({ const iconRefresh = RefreshReactSvgUrl; - const iconPin = "images/unpin.react.svg"; + const iconPin = UnpinReactSvgUrl; const unpinIconProps = { "data-id": id, diff --git a/packages/client/src/components/EmptyContainer/EmptyFilterContainer.js b/packages/client/src/components/EmptyContainer/EmptyFilterContainer.js index 97053f52ec..5cd68067e3 100644 --- a/packages/client/src/components/EmptyContainer/EmptyFilterContainer.js +++ b/packages/client/src/components/EmptyContainer/EmptyFilterContainer.js @@ -1,4 +1,5 @@ -import ClearEmptyFilterSvgUrl from "PUBLIC_DIR/images/clear.empty.filter.svg?url"; +import EmptyScreenFilterAltSvgUrl from "ASSETS_DIR/images/empty_screen_filter_alt.svg?url"; +import ClearEmptyFilterSvgUrl from "PUBLIC_DIR/images/clear.empty.filter.svg?url"; import React from "react"; import { withTranslation } from "react-i18next"; import { inject, observer } from "mobx-react"; @@ -57,7 +58,7 @@ const EmptyFilterContainer = ({ ); diff --git a/packages/client/src/components/EmptyContainer/EmptyFolderContainer.js b/packages/client/src/components/EmptyContainer/EmptyFolderContainer.js index 291f5e5f90..60e9369cc8 100644 --- a/packages/client/src/components/EmptyContainer/EmptyFolderContainer.js +++ b/packages/client/src/components/EmptyContainer/EmptyFolderContainer.js @@ -1,4 +1,6 @@ -import EmptyScreenAltSvgUrl from "PUBLIC_DIR/images/empty_screen_alt.svg?url"; +import PlusSvgUrl from "ASSETS_DIR/images/plus.svg?url"; +import UpSvgUrl from "ASSETS_DIR/images/up.svg?url"; +import EmptyScreenAltSvgUrl from "PUBLIC_DIR/images/empty_screen_alt.svg?url"; import { inject, observer } from "mobx-react"; import React from "react"; import { withTranslation } from "react-i18next"; @@ -49,7 +51,7 @@ const EmptyFolderContainer = ({
plus_icon plus_icon @@ -94,7 +96,7 @@ const EmptyFolderContainer = ({
up_icon @@ -111,7 +113,7 @@ const EmptyFolderContainer = ({
up_icon diff --git a/packages/client/src/components/EmptyContainer/RootFolderContainer.js b/packages/client/src/components/EmptyContainer/RootFolderContainer.js index 5ce177ce9b..bf10d2e371 100644 --- a/packages/client/src/components/EmptyContainer/RootFolderContainer.js +++ b/packages/client/src/components/EmptyContainer/RootFolderContainer.js @@ -1,3 +1,7 @@ +import PrivacySvgUrl from "ASSETS_DIR/images/privacy.svg?url"; +import PersonSvgUrl from "ASSETS_DIR/images/person.svg?url"; +import PlusSvgUrl from "ASSETS_DIR/images/plus.svg?url"; +import EmptyFolderImageSvgUrl from "ASSETS_DIR/images/empty-folder-image.svg?url"; import React from "react"; import styled from "styled-components"; import { FolderType } from "@docspace/common/constants"; @@ -76,7 +80,7 @@ const RootFolderContainer = (props) => { : t("ArchiveEmptyScreen"); const privateRoomHeader = t("PrivateRoomHeader"); - const privacyIcon = ; + const privacyIcon = ; const privateRoomDescTranslations = [ t("PrivateRoomDescriptionSafest"), t("PrivateRoomDescriptionSecure"), @@ -273,7 +277,7 @@ const RootFolderContainer = (props) => {
person_icon @@ -287,7 +291,7 @@ const RootFolderContainer = (props) => {
plus_icon @@ -301,7 +305,7 @@ const RootFolderContainer = (props) => {
folder_icon @@ -315,7 +319,7 @@ const RootFolderContainer = (props) => {
person_icon diff --git a/packages/client/src/components/Icons.js b/packages/client/src/components/Icons.js index 713c4f51b6..a35669de18 100644 --- a/packages/client/src/components/Icons.js +++ b/packages/client/src/components/Icons.js @@ -1,3 +1,4 @@ +import SecuritySvgUrl from "ASSETS_DIR/images/security.svg?url"; import styled from "styled-components"; import commonIconsStyles from "@docspace/components/utils/common-icons-style"; @@ -9,7 +10,7 @@ import EditFormIcon from "ASSETS_DIR/images/file.actions.edit.form.react.svg"; import Base from "@docspace/components/themes/base"; export const EncryptedFileIcon = styled.div` - background: url("images/security.svg") no-repeat 0 0 / 16px 16px transparent; + background: url(${SecuritySvgUrl}) no-repeat 0 0 / 16px 16px transparent; height: 16px; position: absolute; width: 16px; diff --git a/packages/client/src/components/ItemIcon.js b/packages/client/src/components/ItemIcon.js index 77527a3ffb..7e118de940 100644 --- a/packages/client/src/components/ItemIcon.js +++ b/packages/client/src/components/ItemIcon.js @@ -1,3 +1,4 @@ +import SecuritySvgUrl from "ASSETS_DIR/images/security.svg?url"; import React from "react"; import { inject, observer } from "mobx-react"; import styled, { css } from "styled-components"; @@ -15,7 +16,7 @@ const StyledIcon = styled.img` `; const EncryptedFileIcon = styled.div` - background: url("images/security.svg") no-repeat 0 0 / 16px 16px transparent; + background: url(${SecuritySvgUrl}) no-repeat 0 0 / 16px 16px transparent; height: 16px; position: absolute; width: 16px; diff --git a/packages/client/src/components/PeopleArticle/Body/index.js b/packages/client/src/components/PeopleArticle/Body/index.js index 4d12e733ed..b10b13b4f0 100644 --- a/packages/client/src/components/PeopleArticle/Body/index.js +++ b/packages/client/src/components/PeopleArticle/Body/index.js @@ -1,4 +1,5 @@ -import CatalogFolderReactSvgUrl from "PUBLIC_DIR/images/catalog.folder.react.svg?url"; +import DepartmentsGroupReactSvgUrl from "ASSETS_DIR/images/departments.group.react.svg?url"; +import CatalogFolderReactSvgUrl from "PUBLIC_DIR/images/catalog.folder.react.svg?url"; import React from "react"; import { withTranslation } from "react-i18next"; import Filter from "@docspace/common/api/people/filter"; @@ -14,7 +15,7 @@ import { AppServerConfig } from "@docspace/common/constants"; import CatalogItem from "@docspace/components/catalog-item"; import withLoader from "../../../HOCs/withLoader"; -const departmentsIcon = "images/departments.group.react.svg"; +const departmentsIcon = DepartmentsGroupReactSvgUrl; const groupIcon = CatalogFolderReactSvgUrl; const ArticleBodyContent = ({ diff --git a/packages/client/src/components/RoomSelector/index.js b/packages/client/src/components/RoomSelector/index.js index 1869314073..965b713d16 100644 --- a/packages/client/src/components/RoomSelector/index.js +++ b/packages/client/src/components/RoomSelector/index.js @@ -1,3 +1,4 @@ +import EmptyScreenCorporatePngUrl from "ASSETS_DIR/images/empty_screen_corporate.png"; import React from "react"; import { withTranslation } from "react-i18next"; @@ -188,13 +189,13 @@ const RoomSelector = ({ accessRights={accessRights} selectedAccessRight={selectedAccessRight} onAccessRightsChange={onAccessRightsChange} - emptyScreenImage={emptyScreenImage || "images/empty_screen_corporate.png"} + emptyScreenImage={emptyScreenImage || EmptyScreenCorporatePngUrl} emptyScreenHeader={emptyScreenHeader || t("EmptyRoomsHeader")} emptyScreenDescription={ emptyScreenDescription || t("EmptyRoomsDescription") } searchEmptyScreenImage={ - searchEmptyScreenImage || "images/empty_screen_corporate.png" + searchEmptyScreenImage || EmptyScreenCorporatePngUrl } searchEmptyScreenHeader={ searchEmptyScreenHeader || t("SearchEmptyRoomsHeader") diff --git a/packages/client/src/components/dialogs/AvatarEditorDialog/editor/avatar-cropper.js b/packages/client/src/components/dialogs/AvatarEditorDialog/editor/avatar-cropper.js index fc6051e090..61d7331561 100644 --- a/packages/client/src/components/dialogs/AvatarEditorDialog/editor/avatar-cropper.js +++ b/packages/client/src/components/dialogs/AvatarEditorDialog/editor/avatar-cropper.js @@ -1,4 +1,6 @@ -import ZoomMinusReactSvgUrl from "PUBLIC_DIR/images/zoom-minus.react.svg?url"; +import IconCropperGridSvgUrl from "ASSETS_DIR/images/icon-cropper-grid.svg?url"; +import TrashReactSvgUrl from "ASSETS_DIR/images/trash.react.svg?url"; +import ZoomMinusReactSvgUrl from "PUBLIC_DIR/images/zoom-minus.react.svg?url"; import ZoomPlusReactSvgUrl from "PUBLIC_DIR/images/zoom-plus.react.svg?url"; import React, { useEffect } from "react"; import styled from "styled-components"; @@ -145,7 +147,7 @@ const AvatarCropper = ({
- +
{t("Common:Delete")}
diff --git a/packages/client/src/components/dialogs/CreateEditRoomDialog/sub-components/IconEditor/IconCropper.js b/packages/client/src/components/dialogs/CreateEditRoomDialog/sub-components/IconEditor/IconCropper.js index 6e81c54c79..f0fb6083b6 100644 --- a/packages/client/src/components/dialogs/CreateEditRoomDialog/sub-components/IconEditor/IconCropper.js +++ b/packages/client/src/components/dialogs/CreateEditRoomDialog/sub-components/IconEditor/IconCropper.js @@ -1,4 +1,6 @@ -import ZoomMinusReactSvgUrl from "PUBLIC_DIR/images/zoom-minus.react.svg?url"; +import IconCropperGridSvgUrl from "ASSETS_DIR/images/icon-cropper-grid.svg?url"; +import TrashReactSvgUrl from "ASSETS_DIR/images/trash.react.svg?url"; +import ZoomMinusReactSvgUrl from "PUBLIC_DIR/images/zoom-minus.react.svg?url"; import ZoomPlusReactSvgUrl from "PUBLIC_DIR/images/zoom-plus.react.svg?url"; import React, { useState, useEffect } from "react"; import styled from "styled-components"; @@ -159,7 +161,7 @@ const IconCropper = ({
- +
{t("Common:Delete")}
diff --git a/packages/client/src/components/dialogs/CreateEditRoomDialog/sub-components/PermanentSettings/index.js b/packages/client/src/components/dialogs/CreateEditRoomDialog/sub-components/PermanentSettings/index.js index ecbcf4ad00..9623ad40d5 100644 --- a/packages/client/src/components/dialogs/CreateEditRoomDialog/sub-components/PermanentSettings/index.js +++ b/packages/client/src/components/dialogs/CreateEditRoomDialog/sub-components/PermanentSettings/index.js @@ -1,3 +1,4 @@ +import SecuritySvgUrl from "ASSETS_DIR/images/security.svg?url"; import React from "react"; import styled from "styled-components"; import { Trans } from "react-i18next"; @@ -61,7 +62,7 @@ const PermanentSettings = ({ diff --git a/packages/client/src/components/dialogs/CreateEditRoomDialog/sub-components/RoomType.js b/packages/client/src/components/dialogs/CreateEditRoomDialog/sub-components/RoomType.js index 5cec08bcb9..600ac8cf62 100644 --- a/packages/client/src/components/dialogs/CreateEditRoomDialog/sub-components/RoomType.js +++ b/packages/client/src/components/dialogs/CreateEditRoomDialog/sub-components/RoomType.js @@ -1,3 +1,4 @@ +import ArrowReactSvgUrl from "ASSETS_DIR/images/arrow.react.svg?url"; import React from "react"; import PropTypes from "prop-types"; import styled from "styled-components"; @@ -176,7 +177,7 @@ const RoomType = ({ {}} /> diff --git a/packages/client/src/components/dialogs/CreateEditRoomDialog/sub-components/ThirdPartyStorage/FolderInput.js b/packages/client/src/components/dialogs/CreateEditRoomDialog/sub-components/ThirdPartyStorage/FolderInput.js index 58085f1ec5..16f5920a7b 100644 --- a/packages/client/src/components/dialogs/CreateEditRoomDialog/sub-components/ThirdPartyStorage/FolderInput.js +++ b/packages/client/src/components/dialogs/CreateEditRoomDialog/sub-components/ThirdPartyStorage/FolderInput.js @@ -1,3 +1,4 @@ +import FolderReactSvgUrl from "ASSETS_DIR/images/folder.react.svg?url"; import React, { useState, useEffect } from "react"; import styled from "styled-components"; @@ -143,7 +144,7 @@ const FolderInput = ({
diff --git a/packages/client/src/components/panels/UploadPanel/index.js b/packages/client/src/components/panels/UploadPanel/index.js index 7c5d4a1b08..1977c94491 100644 --- a/packages/client/src/components/panels/UploadPanel/index.js +++ b/packages/client/src/components/panels/UploadPanel/index.js @@ -1,3 +1,5 @@ +import ClearActiveReactSvgUrl from "ASSETS_DIR/images/clear.active.react.svg?url"; +import ButtonCancelReactSvgUrl from "ASSETS_DIR/images/button.cancel.react.svg?url"; import React from "react"; import IconButton from "@docspace/components/icon-button"; import Backdrop from "@docspace/components/backdrop"; @@ -112,7 +114,7 @@ class UploadPanelComponent extends React.Component { {uploaded && converted ? ( { case 3: return AccessNoneReactSvgUrl; case 4: - return "images/catalog.question.react.svg"; + return CatalogQuestionReactSvgUrl; case 5: return AccessReviewReactSvgUrl; case 6: diff --git a/packages/client/src/pages/AccountsHome/Section/Header/index.js b/packages/client/src/pages/AccountsHome/Section/Header/index.js index 97c2e6f988..b64e674c58 100644 --- a/packages/client/src/pages/AccountsHome/Section/Header/index.js +++ b/packages/client/src/pages/AccountsHome/Section/Header/index.js @@ -1,4 +1,6 @@ -import PersonAdminReactSvgUrl from "PUBLIC_DIR/images/person.admin.react.svg?url"; +import PlusSvgUrl from "ASSETS_DIR/images/plus.svg?url"; +import PanelReactSvgUrl from "ASSETS_DIR/images/panel.react.svg?url"; +import PersonAdminReactSvgUrl from "PUBLIC_DIR/images/person.admin.react.svg?url"; import PersonManagerReactSvgUrl from "PUBLIC_DIR/images/person.manager.react.svg?url"; import PersonUserReactSvgUrl from "PUBLIC_DIR/images/person.user.react.svg?url"; import InviteAgainReactSvgUrl from "PUBLIC_DIR/images/invite.again.react.svg?url"; @@ -306,7 +308,7 @@ const SectionHeaderContent = (props) => { className="action-button" directionX="left" title={t("Common:Actions")} - iconName="images/plus.svg" + iconName={PlusSvgUrl} size={15} getData={getContextOptions} isDisabled={false} @@ -323,7 +325,7 @@ const SectionHeaderContent = (props) => { ) : !hasGalleryFiles ? ( {
{comment ? t("Common:EditButton") : t("Common:AddButton")} diff --git a/packages/client/src/pages/Home/InfoPanel/Body/views/NoItem/NoFileOrFolderItem.js b/packages/client/src/pages/Home/InfoPanel/Body/views/NoItem/NoFileOrFolderItem.js index ddc9644d35..ef56085a31 100644 --- a/packages/client/src/pages/Home/InfoPanel/Body/views/NoItem/NoFileOrFolderItem.js +++ b/packages/client/src/pages/Home/InfoPanel/Body/views/NoItem/NoFileOrFolderItem.js @@ -1,3 +1,4 @@ +import EmptyScreenInfoPanelPngUrl from "ASSETS_DIR/images/empty_screen_info_panel.png"; import React from "react"; import { StyledNoItemContainer } from "../../styles/noItem"; @@ -9,7 +10,7 @@ const NoFileOrFolderItem = ({ t }) => {
diff --git a/packages/client/src/pages/Home/InfoPanel/Body/views/NoItem/NoGalleryItem.js b/packages/client/src/pages/Home/InfoPanel/Body/views/NoItem/NoGalleryItem.js index 0ed1fb9623..2b99394d67 100644 --- a/packages/client/src/pages/Home/InfoPanel/Body/views/NoItem/NoGalleryItem.js +++ b/packages/client/src/pages/Home/InfoPanel/Body/views/NoItem/NoGalleryItem.js @@ -1,3 +1,4 @@ +import FormGallerySearchReactSvgUrl from "ASSETS_DIR/images/form-gallery-search.react.svg?url"; import React from "react"; import styled from "styled-components"; import Text from "@docspace/components/text"; @@ -15,7 +16,7 @@ const NoGalleryItem = ({ t }) => { Empty Screen Gallery image diff --git a/packages/client/src/pages/Home/InfoPanel/Body/views/NoItem/NoRoomItem.js b/packages/client/src/pages/Home/InfoPanel/Body/views/NoItem/NoRoomItem.js index e69c30b54c..7581311afe 100644 --- a/packages/client/src/pages/Home/InfoPanel/Body/views/NoItem/NoRoomItem.js +++ b/packages/client/src/pages/Home/InfoPanel/Body/views/NoItem/NoRoomItem.js @@ -1,3 +1,4 @@ +import InfoPanelRoomEmptyScreenSvgUrl from "ASSETS_DIR/images/info-panel-room-empty-screen.svg?url"; import React from "react"; import Text from "@docspace/components/text"; @@ -8,7 +9,7 @@ const NoRoomItem = ({ t }) => {
No Room Image
diff --git a/packages/client/src/pages/Home/InfoPanel/Body/views/SeveralItems/index.js b/packages/client/src/pages/Home/InfoPanel/Body/views/SeveralItems/index.js index 29bbb9fffd..c9fa74fc6b 100644 --- a/packages/client/src/pages/Home/InfoPanel/Body/views/SeveralItems/index.js +++ b/packages/client/src/pages/Home/InfoPanel/Body/views/SeveralItems/index.js @@ -1,10 +1,11 @@ +import EmptyScreenInfoPanelPngUrl from "ASSETS_DIR/images/empty_screen_info_panel.png"; import React from "react"; import { StyledSeveralItemsContainer } from "../../styles/severalItems"; const SeveralItems = ({ isAccounts }) => { const imgSrc = isAccounts ? "static/images/empty_screen-accounts-info-panel.png" - : "images/empty_screen_info_panel.png"; + : EmptyScreenInfoPanelPngUrl; return ( diff --git a/packages/client/src/pages/Home/InfoPanel/Header/index.js b/packages/client/src/pages/Home/InfoPanel/Header/index.js index 5a7fa1276e..1b8ddbbe2d 100644 --- a/packages/client/src/pages/Home/InfoPanel/Header/index.js +++ b/packages/client/src/pages/Home/InfoPanel/Header/index.js @@ -1,3 +1,4 @@ +import PanelReactSvgUrl from "ASSETS_DIR/images/panel.react.svg?url"; import React from "react"; import { inject, observer } from "mobx-react"; import { withTranslation } from "react-i18next"; @@ -102,7 +103,7 @@ const InfoPanelHeaderContent = (props) => { props.theme.filesSection.rowView.checkedBackground}; @@ -49,7 +50,7 @@ const StyledSimpleFilesRow = styled(Row)` cursor: ${(props) => !props.isThirdPartyFolder && (props.checked || props.isActive) && - "url(/static/images/cursor.palm.react.svg), auto"}; + `url(${CursorPalmReactSvgUrl}), auto`}; ${(props) => props.inProgress && css` diff --git a/packages/client/src/pages/Home/Section/Body/TableView/TableRow.js b/packages/client/src/pages/Home/Section/Body/TableView/TableRow.js index 51c6007dd4..8828d089b0 100644 --- a/packages/client/src/pages/Home/Section/Body/TableView/TableRow.js +++ b/packages/client/src/pages/Home/Section/Body/TableView/TableRow.js @@ -17,6 +17,7 @@ import TypeCell from "./sub-components/TypeCell"; import TagsCell from "./sub-components/TagsCell"; import styled, { css } from "styled-components"; import Base from "@docspace/components/themes/base"; +import CursorPalmReactSvgURL from "PUBLIC_DIR/images/cursor.palm.react.svg"; const hotkeyBorderStyle = css` border-bottom: 1px solid; @@ -91,7 +92,7 @@ const StyledTableRow = styled(TableRow)` cursor: ${(props) => !props.isThirdPartyFolder && (props.checked || props.isActive) && - "url(/static/images/cursor.palm.react.svg), auto !important"}; + `url(${CursorPalmReactSvgURL}), auto !important`}; ${(props) => props.inProgress && diff --git a/packages/client/src/pages/Home/Section/Header/index.js b/packages/client/src/pages/Home/Section/Header/index.js index 996fdc8ba7..ff5f8ec6c5 100644 --- a/packages/client/src/pages/Home/Section/Header/index.js +++ b/packages/client/src/pages/Home/Section/Header/index.js @@ -1,4 +1,21 @@ -import ShareReactSvgUrl from "PUBLIC_DIR/images/share.react.svg?url"; +import FolderLockedReactSvgUrl from "ASSETS_DIR/images/folder.locked.react.svg?url"; +import ActionsDocumentsReactSvgUrl from "ASSETS_DIR/images/actions.documents.react.svg?url"; +import SpreadsheetReactSvgUrl from "ASSETS_DIR/images/spreadsheet.react.svg?url"; +import ActionsPresentationReactSvgUrl from "ASSETS_DIR/images/actions.presentation.react.svg?url"; +import FormReactSvgUrl from "ASSETS_DIR/images/form.react.svg?url"; +import FormBlankReactSvgUrl from "ASSETS_DIR/images/form.blank.react.svg?url"; +import FormFileReactSvgUrl from "ASSETS_DIR/images/form.file.react.svg?url"; +import FormGalleryReactSvgUrl from "ASSETS_DIR/images/form.gallery.react.svg?url"; +import CatalogFolderReactSvgUrl from "ASSETS_DIR/images/catalog.folder.react.svg?url"; +import ActionsUploadReactSvgUrl from "ASSETS_DIR/images/actions.upload.react.svg?url"; +import ClearTrashReactSvgUrl from "ASSETS_DIR/images/clear.trash.react.svg?url"; +import SubtractReactSvgUrl from "ASSETS_DIR/images/subtract.react.svg?url"; +import ReconnectSvgUrl from "ASSETS_DIR/images/reconnect.svg?url"; +import SettingsReactSvgUrl from "ASSETS_DIR/images/settings.react.svg?url"; +import DownloadReactSvgUrl from "ASSETS_DIR/images/download.react.svg?url"; +import MoveReactSvgUrl from "ASSETS_DIR/images/move.react.svg?url"; +import RenameReactSvgUrl from "ASSETS_DIR/images/rename.react.svg?url"; +import ShareReactSvgUrl from "PUBLIC_DIR/images/share.react.svg?url"; import InvitationLinkReactSvgUrl from "PUBLIC_DIR/images/invitation.link.react.svg?url"; import InfoOutlineReactSvgUrl from "PUBLIC_DIR/images/info.outline.react.svg?url"; import PersonReactSvgUrl from "PUBLIC_DIR/images/person.react.svg?url"; @@ -138,7 +155,7 @@ class SectionHeaderContent extends React.Component { key: "new-room", label: t("NewRoom"), onClick: this.onCreateRoom, - icon: "images/folder.locked.react.svg", + icon: FolderLockedReactSvgUrl, }, ] : [ @@ -147,25 +164,25 @@ class SectionHeaderContent extends React.Component { key: "new-document", label: t("NewDocument"), onClick: this.createDocument, - icon: "images/actions.documents.react.svg", + icon: ActionsDocumentsReactSvgUrl, }, { id: "personal_new-spreadsheet", key: "new-spreadsheet", label: t("NewSpreadsheet"), onClick: this.createSpreadsheet, - icon: "images/spreadsheet.react.svg", + icon: SpreadsheetReactSvgUrl, }, { id: "personal_new-presentation", key: "new-presentation", label: t("NewPresentation"), onClick: this.createPresentation, - icon: "images/actions.presentation.react.svg", + icon: ActionsPresentationReactSvgUrl, }, { id: "personal_form-template", - icon: "images/form.react.svg", + icon: FormReactSvgUrl, label: t("Translations:NewForm"), key: "new-form-base", items: [ @@ -173,14 +190,14 @@ class SectionHeaderContent extends React.Component { id: "personal_template_black", key: "new-form", label: t("Translations:SubNewForm"), - icon: "images/form.blank.react.svg", + icon: FormBlankReactSvgUrl, onClick: this.createForm, }, { id: "personal_template_new-form-file", key: "new-form-file", label: t("Translations:SubNewFormFile"), - icon: "images/form.file.react.svg", + icon: FormFileReactSvgUrl, onClick: this.createFormFromFile, disabled: isPrivacyFolder, }, @@ -188,7 +205,7 @@ class SectionHeaderContent extends React.Component { id: "personal_template_oforms-gallery", key: "oforms-gallery", label: t("Common:OFORMsGallery"), - icon: "images/form.gallery.react.svg", + icon: FormGalleryReactSvgUrl, onClick: this.onShowGallery, disabled: isPrivacyFolder || (isMobile && isTablet), }, @@ -199,7 +216,7 @@ class SectionHeaderContent extends React.Component { key: "new-folder", label: t("NewFolder"), onClick: this.createFolder, - icon: "images/catalog.folder.react.svg", + icon: CatalogFolderReactSvgUrl, }, /*{ key: "separator", isSeparator: true }, { @@ -207,7 +224,7 @@ class SectionHeaderContent extends React.Component { label: t("UploadToFolder"), onClick: this.uploadToFolder, disabled: true, - icon: "images/actions.upload.react.svg", + icon: ActionsUploadReactSvgUrl, },*/ ]; @@ -375,7 +392,7 @@ class SectionHeaderContent extends React.Component { label: t("ArchiveAction"), onClick: this.onEmptyTrashAction, disabled: !canDeleteAll, - icon: "images/clear.trash.react.svg", + icon: ClearTrashReactSvgUrl, }, { id: "header_option_restore-all", @@ -383,7 +400,7 @@ class SectionHeaderContent extends React.Component { label: t("RestoreAll"), onClick: this.onRestoreAllArchiveAction, disabled: !canRestoreAll, - icon: "images/subtract.react.svg", + icon: SubtractReactSvgUrl, }, ]; } @@ -411,7 +428,7 @@ class SectionHeaderContent extends React.Component { label: t("RecycleBinAction"), onClick: this.onEmptyTrashAction, disabled: !isRecycleBinFolder, - icon: "images/clear.trash.react.svg", + icon: ClearTrashReactSvgUrl, }, { id: "header_option_restore-all", @@ -419,7 +436,7 @@ class SectionHeaderContent extends React.Component { label: t("RestoreAll"), onClick: this.onRestoreAllAction, disabled: !isRecycleBinFolder, - icon: "images/subtract.react.svg", + icon: SubtractReactSvgUrl, }, { id: "header_option_show-info", @@ -433,7 +450,7 @@ class SectionHeaderContent extends React.Component { id: "header_option_reconnect-storage", key: "reconnect-storage", label: t("Common:ReconnectStorage"), - icon: "images/reconnect.svg", + icon: ReconnectSvgUrl, onClick: () => onClickReconnectStorage(selectedFolder, t), disabled: !selectedFolder.providerKey || !isRoom, }, @@ -441,7 +458,7 @@ class SectionHeaderContent extends React.Component { id: "header_option_edit-room", key: "edit-room", label: t("EditRoom"), - icon: "images/settings.react.svg", + icon: SettingsReactSvgUrl, onClick: () => onClickEditRoom(selectedFolder), disabled: !isRoom, }, @@ -483,7 +500,7 @@ class SectionHeaderContent extends React.Component { label: t("Common:Download"), onClick: this.downloadAction, disabled: isDisabled, - icon: "images/download.react.svg", + icon: DownloadReactSvgUrl, }, { id: "header_option_move-to", @@ -491,7 +508,7 @@ class SectionHeaderContent extends React.Component { label: t("MoveTo"), onClick: this.onMoveAction, disabled: isDisabled, - icon: "images/move.react.svg", + icon: MoveReactSvgUrl, }, { id: "header_option_copy", @@ -507,7 +524,7 @@ class SectionHeaderContent extends React.Component { label: t("Rename"), onClick: this.renameAction, disabled: isDisabled, - icon: "images/rename.react.svg", + icon: RenameReactSvgUrl, }, { id: "header_option_separator-3", diff --git a/packages/client/src/pages/PaymentsEnterprise/sub-components/advantagesContainer.js b/packages/client/src/pages/PaymentsEnterprise/sub-components/advantagesContainer.js index 50aafa697d..643672726a 100644 --- a/packages/client/src/pages/PaymentsEnterprise/sub-components/advantagesContainer.js +++ b/packages/client/src/pages/PaymentsEnterprise/sub-components/advantagesContainer.js @@ -1,3 +1,9 @@ +import PaymentsEnterpriseSvgUrl from "ASSETS_DIR/images/payments_enterprise.svg?url"; +import PaymentsEnterpriseCubesSvgUrl from "ASSETS_DIR/images/payments_enterprise_cubes.svg?url"; +import PaymentsEnterpriseLockSvgUrl from "ASSETS_DIR/images/payments_enterprise_lock.svg?url"; +import PaymentsEnterpriseSmartphoneSvgUrl from "ASSETS_DIR/images/payments_enterprise_smartphone.svg?url"; +import PaymentsEnterpriseUpdateSvgUrl from "ASSETS_DIR/images/payments_enterprise_update.svg?url"; +import PaymentsEnterpriseHelpSvgUrl from "ASSETS_DIR/images/payments_enterprise_help.svg?url"; import React from "react"; import styled from "styled-components"; @@ -16,7 +22,7 @@ const StyledBodyAdvantages = styled.div` grid-template-rows: repeat(4, min-content); grid-row-gap: 18px; - background: url("images/payments_enterprise.svg") + background: url(${PaymentsEnterpriseSvgUrl}) ${(props) => props.theme.client.paymentsEnterprise.background} bottom 32px right 32px no-repeat; @@ -49,7 +55,7 @@ const AdvantagesContainer = ({ organizationName }) => { Icon_cubes { Icon_lock { Icon_smartphone { Icon_update { Icon_help (props.theme.isBase ? "#eceef1" : "#474747")} - url(PlusThemeSvgUrl) no-repeat center; + url(${PlusThemeSvgUrl}) no-repeat center; } .add-theme { diff --git a/packages/client/src/pages/PortalSettings/categories/common/sub-components/colorSchemeDialog.js b/packages/client/src/pages/PortalSettings/categories/common/sub-components/colorSchemeDialog.js index db692d9571..bacfbb83df 100644 --- a/packages/client/src/pages/PortalSettings/categories/common/sub-components/colorSchemeDialog.js +++ b/packages/client/src/pages/PortalSettings/categories/common/sub-components/colorSchemeDialog.js @@ -38,8 +38,8 @@ const StyledComponent = styled(ModalDialog)` props.currentColorAccent ? props.currentColorAccent : props.theme.isBase - ? `#eceef1 url(PlusThemeSvgUrl) no-repeat center` - : `#474747 url(PlusThemeSvgUrl) no-repeat center`}; + ? `#eceef1 url(${PlusThemeSvgUrl}) no-repeat center` + : `#474747 url(${PlusThemeSvgUrl}) no-repeat center`}; } .buttons-box { @@ -47,8 +47,8 @@ const StyledComponent = styled(ModalDialog)` props.currentColorButtons ? props.currentColorButtons : props.theme.isBase - ? `#eceef1 url(PlusThemeSvgUrl) no-repeat center` - : `#474747 url(PlusThemeSvgUrl) no-repeat center`}; + ? `#eceef1 url(${PlusThemeSvgUrl}) no-repeat center` + : `#474747 url(${PlusThemeSvgUrl}) no-repeat center`}; } .modal-add-theme { diff --git a/packages/client/src/pages/PortalSettings/categories/data-management/backup/common-container/DirectThirdPartyConnection.js b/packages/client/src/pages/PortalSettings/categories/data-management/backup/common-container/DirectThirdPartyConnection.js index 0bb1fad43e..854799449e 100644 --- a/packages/client/src/pages/PortalSettings/categories/data-management/backup/common-container/DirectThirdPartyConnection.js +++ b/packages/client/src/pages/PortalSettings/categories/data-management/backup/common-container/DirectThirdPartyConnection.js @@ -1,4 +1,5 @@ -import RefreshReactSvgUrl from "PUBLIC_DIR/images/refresh.react.svg?url"; +import VerticalDotsReactSvgUrl from "ASSETS_DIR/images/vertical-dots.react.svg?url"; +import RefreshReactSvgUrl from "PUBLIC_DIR/images/refresh.react.svg?url"; import AccessNoneReactSvgUrl from "PUBLIC_DIR/images/access.none.react.svg?url"; import React, { useEffect, useState, useReducer } from "react"; import Button from "@docspace/components/button"; @@ -333,7 +334,7 @@ const DirectThirdPartyConnection = (props) => { plus_icon diff --git a/packages/client/src/pages/PrivateRoomsPage/index.js b/packages/client/src/pages/PrivateRoomsPage/index.js index 26d0d1c5ed..7f615e20c0 100644 --- a/packages/client/src/pages/PrivateRoomsPage/index.js +++ b/packages/client/src/pages/PrivateRoomsPage/index.js @@ -1,3 +1,4 @@ +import DarkGeneralPngUrl from "ASSETS_DIR/images/dark_general.png"; import React, { useEffect, useState } from "react"; import styled from "styled-components"; import Text from "@docspace/components/text"; @@ -122,7 +123,7 @@ const PrivacyPageComponent = ({ t, history, tReady }) => { Logo { className="send-again-icon" color={"#316daa"} tooltipContent={t("EmailNotVerified")} - iconName={"images/send.clock.react.svg"} + iconName={SendClockReactSvgUrl} /> )}
@@ -118,7 +119,7 @@ const MainProfile = (props) => { className="send-again-icon" color={"#316daa"} tooltipContent={t("EmailNotVerified")} - iconName={"images/send.clock.react.svg"} + iconName={SendClockReactSvgUrl} /> + ); const tickIcon = ( - + ); const ActiveSessions = ({ diff --git a/packages/client/src/pages/Settings/Section/Body/ConnectedClouds.js b/packages/client/src/pages/Settings/Section/Body/ConnectedClouds.js index 82db8428ee..a8001be8a1 100644 --- a/packages/client/src/pages/Settings/Section/Body/ConnectedClouds.js +++ b/packages/client/src/pages/Settings/Section/Body/ConnectedClouds.js @@ -1,4 +1,6 @@ -import AccessEditReactSvgUrl from "PUBLIC_DIR/images/access.edit.react.svg?url"; +import FolderReactSvgUrl from "ASSETS_DIR/images/folder.react.svg?url"; +import PlusSvgUrl from "ASSETS_DIR/images/plus.svg?url"; +import AccessEditReactSvgUrl from "PUBLIC_DIR/images/access.edit.react.svg?url"; import CatalogTrashReactSvgUrl from "PUBLIC_DIR/images/catalog.trash.react.svg?url"; import EmptyScreenAltSvgUrl from "PUBLIC_DIR/images/empty_screen_alt.svg?url"; import React from "react"; @@ -171,7 +173,7 @@ class ConnectClouds extends React.Component { key: `${index}_open`, "data-provider-id": item.provider_id, "data-provider-key": item.provider_key, - icon: "images/folder.react.svg", + icon: FolderReactSvgUrl, label: t("Home:Open"), onClick: this.openLocation, disabled: !isMobile, @@ -296,7 +298,7 @@ class ConnectClouds extends React.Component {
plus_icon diff --git a/packages/client/src/store/AccountsContextOptionsStore.js b/packages/client/src/store/AccountsContextOptionsStore.js index 12c92e4020..4fb0d7d24d 100644 --- a/packages/client/src/store/AccountsContextOptionsStore.js +++ b/packages/client/src/store/AccountsContextOptionsStore.js @@ -1,4 +1,16 @@ -import ProfileReactSvgUrl from "PUBLIC_DIR/images/profile.react.svg?url"; +import PencilReactSvgUrl from "ASSETS_DIR/images/pencil.react.svg?url"; +import ChangeMailReactSvgUrl from "ASSETS_DIR/images/change.mail.react.svg?url"; +import ChangeSecurityReactSvgUrl from "ASSETS_DIR/images/change.security.react.svg?url"; +import FolderReactSvgUrl from "ASSETS_DIR/images/folder.react.svg?url"; +import EnableReactSvgUrl from "ASSETS_DIR/images/enable.react.svg?url"; +import RemoveReactSvgUrl from "ASSETS_DIR/images/remove.react.svg?url"; +import RessingDataReactSvgUrl from "ASSETS_DIR/images/ressing_data.react.svg?url"; +import DelDataReactSvgUrl from "ASSETS_DIR/images/del_data.react.svg?url"; +import TrashReactSvgUrl from "ASSETS_DIR/images/trash.react.svg?url"; +import InfoReactSvgUrl from "ASSETS_DIR/images/info.react.svg?url"; +import RestoreAuthReactSvgUrl from "ASSETS_DIR/images/restore.auth.react.svg?url"; +import DisableReactSvgUrl from "ASSETS_DIR/images/disable.react.svg?url"; +import ProfileReactSvgUrl from "PUBLIC_DIR/images/profile.react.svg?url"; import RefreshReactSvgUrl from "PUBLIC_DIR/images/refresh.react.svg?url"; import InviteAgainReactSvgUrl from "PUBLIC_DIR/images/invite.again.react.svg?url"; import ChangeToEmployeeReactSvgUrl from "PUBLIC_DIR/images/change.to.employee.react.svg?url"; @@ -62,7 +74,7 @@ class AccountsContextOptionsStore { return { id: "option_change-name", key: option, - icon: "images/pencil.react.svg", + icon: PencilReactSvgUrl, label: t("PeopleTranslations:NameChangeButton"), onClick: this.toggleChangeNameDialog, }; @@ -70,7 +82,7 @@ class AccountsContextOptionsStore { return { id: "option_change-email", key: option, - icon: "images/change.mail.react.svg", + icon: ChangeMailReactSvgUrl, label: t("PeopleTranslations:EmailChangeButton"), onClick: () => this.toggleChangeEmailDialog(item), }; @@ -78,7 +90,7 @@ class AccountsContextOptionsStore { return { id: "option_change-password", key: option, - icon: "images/change.security.react.svg", + icon: ChangeSecurityReactSvgUrl, label: t("PeopleTranslations:PasswordChangeButton"), onClick: () => this.toggleChangePasswordDialog(item), }; @@ -93,7 +105,7 @@ class AccountsContextOptionsStore { case "room-list": return { key: option, - icon: "images/folder.react.svg", + icon: FolderReactSvgUrl, label: "Room list", onClick: () => this.openUserRoomList(item), }; @@ -101,7 +113,7 @@ class AccountsContextOptionsStore { return { id: "option_enable", key: option, - icon: "images/enable.react.svg", + icon: EnableReactSvgUrl, label: t("PeopleTranslations:EnableUserButton"), onClick: () => this.onEnableClick(t, item), }; @@ -109,7 +121,7 @@ class AccountsContextOptionsStore { return { id: "option_disable", key: option, - icon: "images/remove.react.svg", + icon: RemoveReactSvgUrl, label: t("PeopleTranslations:DisableUserButton"), onClick: () => this.onDisableClick(t, item), }; @@ -118,7 +130,7 @@ class AccountsContextOptionsStore { return { id: "option_reassign-data", key: option, - icon: "images/ressing_data.react.svg", + icon: RessingDataReactSvgUrl, label: t("PeopleTranslations:ReassignData"), onClick: () => this.onReassignDataClick(item), }; @@ -126,7 +138,7 @@ class AccountsContextOptionsStore { return { id: "option_delete-personal-data", key: option, - icon: "images/del_data.react.svg", + icon: DelDataReactSvgUrl, label: t("PeopleTranslations:RemoveData"), onClick: () => this.onDeletePersonalDataClick(t, item), }; @@ -134,7 +146,7 @@ class AccountsContextOptionsStore { return { id: "option_delete-user", key: option, - icon: "images/trash.react.svg", + icon: TrashReactSvgUrl, label: t("DeleteProfileEverDialog:DeleteUser"), onClick: () => this.toggleDeleteProfileEverDialog(item), }; @@ -143,7 +155,7 @@ class AccountsContextOptionsStore { return { id: "option_details", key: option, - icon: "images/info.react.svg", + icon: InfoReactSvgUrl, label: t("Common:Info"), onClick: this.onDetailsClick, }; @@ -160,7 +172,7 @@ class AccountsContextOptionsStore { return { id: "option_reset-auth", key: option, - icon: "images/restore.auth.react.svg", + icon: RestoreAuthReactSvgUrl, label: t("PeopleTranslations:ResetAuth"), onClick: () => this.onResetAuth(item), }; @@ -243,7 +255,7 @@ class AccountsContextOptionsStore { label: t("Common:Info"), disabled: isVisible, onClick: () => setIsVisible(true), - icon: "images/info.react.svg", + icon: InfoReactSvgUrl, }, { key: "cm-invite", @@ -257,14 +269,14 @@ class AccountsContextOptionsStore { label: t("Common:Enable"), disabled: !hasUsersToActivate, onClick: () => onChangeStatus(EmployeeStatus.Active), - icon: "images/enable.react.svg", + icon: EnableReactSvgUrl, }, { key: "cm-disable", label: t("PeopleTranslations:DisableUserButton"), disabled: !hasUsersToDisable, onClick: () => onChangeStatus(EmployeeStatus.Disabled), - icon: "images/disable.react.svg", + icon: DisableReactSvgUrl, }, { key: "cm-delete", diff --git a/packages/client/src/store/ContextOptionsStore.js b/packages/client/src/store/ContextOptionsStore.js index ded59be09c..1ca6285388 100644 --- a/packages/client/src/store/ContextOptionsStore.js +++ b/packages/client/src/store/ContextOptionsStore.js @@ -1,4 +1,21 @@ -import LockedReactSvgUrl from "PUBLIC_DIR/images/locked.react.svg?url"; +import HistoryReactSvgUrl from "ASSETS_DIR/images/history.react.svg?url"; +import HistoryFinalizedReactSvgUrl from "ASSETS_DIR/images/history-finalized.react.svg?url"; +import MoveReactSvgUrl from "ASSETS_DIR/images/move.react.svg?url"; +import CheckBoxReactSvgUrl from "ASSETS_DIR/images/check-box.react.svg?url"; +import FolderReactSvgUrl from "ASSETS_DIR/images/folder.react.svg?url"; +import ReconnectSvgUrl from "ASSETS_DIR/images/reconnect.svg?url"; +import SettingsReactSvgUrl from "ASSETS_DIR/images/settings.react.svg?url"; +import FileActionsOwnerReactSvgUrl from "ASSETS_DIR/images/file.actions.owner.react.svg?url"; +import FolderLocationReactSvgUrl from "ASSETS_DIR/images/folder.location.react.svg?url"; +import TickRoundedSvgUrl from "ASSETS_DIR/images/tick.rounded.svg?url"; +import FavoritesReactSvgUrl from "ASSETS_DIR/images/favorites.react.svg?url"; +import DownloadReactSvgUrl from "ASSETS_DIR/images/download.react.svg?url"; +import DownloadAsReactSvgUrl from "ASSETS_DIR/images/download-as.react.svg?url"; +import RenameReactSvgUrl from "ASSETS_DIR/images/rename.react.svg?url"; +import RemoveSvgUrl from "ASSETS_DIR/images/remove.svg?url"; +import SubtractReactSvgUrl from "ASSETS_DIR/images/subtract.react.svg?url"; +import TrashReactSvgUrl from "ASSETS_DIR/images/trash.react.svg?url"; +import LockedReactSvgUrl from "PUBLIC_DIR/images/locked.react.svg?url"; import CopyReactSvgUrl from "PUBLIC_DIR/images/copy.react.svg?url"; import DuplicateReactSvgUrl from "PUBLIC_DIR/images/duplicate.react.svg?url"; import FormFillRectSvgUrl from "PUBLIC_DIR/images/form.fill.rect.svg?url"; @@ -505,7 +522,7 @@ class ContextOptionsStore { id: "option_show-version-history", key: "show-version-history", label: t("ShowVersionHistory"), - icon: "images/history.react.svg", + icon: HistoryReactSvgUrl, onClick: () => this.showVersionHistory(item.id, item.access), disabled: false, }, @@ -515,13 +532,13 @@ class ContextOptionsStore { id: "option_version", key: "version", label: t("VersionHistory"), - icon: "images/history-finalized.react.svg", + icon: HistoryFinalizedReactSvgUrl, items: [ { id: "option_finalize-version", key: "finalize-version", label: t("FinalizeVersion"), - icon: "images/history-finalized.react.svg", + icon: HistoryFinalizedReactSvgUrl, onClick: () => this.finalizeVersion(item.id, item.access), disabled: false, }, @@ -529,7 +546,7 @@ class ContextOptionsStore { id: "option_version-history", key: "show-version-history", label: t("ShowVersionHistory"), - icon: "images/history.react.svg", + icon: HistoryReactSvgUrl, onClick: () => this.showVersionHistory(item.id, item.access), disabled: false, @@ -542,7 +559,7 @@ class ContextOptionsStore { id: "option_finalize-version", key: "finalize-version", label: t("FinalizeVersion"), - icon: "images/history-finalized.react.svg", + icon: HistoryFinalizedReactSvgUrl, onClick: () => this.finalizeVersion(item.id), disabled: false, }, @@ -550,7 +567,7 @@ class ContextOptionsStore { id: "option_version-history", key: "show-version-history", label: t("ShowVersionHistory"), - icon: "images/history.react.svg", + icon: HistoryReactSvgUrl, onClick: () => this.showVersionHistory(item.id, item.access), disabled: false, }, @@ -570,7 +587,7 @@ class ContextOptionsStore { id: "option_move-to", key: "move-to", label: t("MoveTo"), - icon: "images/move.react.svg", + icon: MoveReactSvgUrl, onClick: this.onMoveAction, disabled: false, }, @@ -598,7 +615,7 @@ class ContextOptionsStore { id: "option_move-to", key: "move-to", label: t("MoveTo"), - icon: "images/move.react.svg", + icon: MoveReactSvgUrl, onClick: this.onMoveAction, disabled: false, }, @@ -625,7 +642,7 @@ class ContextOptionsStore { id: "option_select", key: "select", label: t("Common:SelectAction"), - icon: "images/check-box.react.svg", + icon: CheckBoxReactSvgUrl, onClick: () => this.onSelect(item), disabled: false, }, @@ -633,7 +650,7 @@ class ContextOptionsStore { id: "option_open", key: "open", label: t("Open"), - icon: "images/folder.react.svg", + icon: FolderReactSvgUrl, onClick: () => this.onOpenFolder(item), disabled: false, }, @@ -685,7 +702,7 @@ class ContextOptionsStore { id: "option_reconnect-storage", key: "reconnect-storage", label: t("Common:ReconnectStorage"), - icon: "images/reconnect.svg", + icon: ReconnectSvgUrl, onClick: () => this.onClickReconnectStorage(item, t), disabled: false, }, @@ -693,7 +710,7 @@ class ContextOptionsStore { id: "option_edit-room", key: "edit-room", label: t("EditRoom"), - icon: "images/settings.react.svg", + icon: SettingsReactSvgUrl, onClick: () => this.onClickEditRoom(item), disabled: false, }, @@ -746,7 +763,7 @@ class ContextOptionsStore { id: "option_owner-change", key: "owner-change", label: t("Translations:OwnerChange"), - icon: "images/file.actions.owner.react.svg", + icon: FileActionsOwnerReactSvgUrl, onClick: this.onOwnerChange, disabled: false, }, @@ -783,7 +800,7 @@ class ContextOptionsStore { id: "option_open-location", key: "open-location", label: t("OpenLocation"), - icon: "images/folder.location.react.svg", + icon: FolderLocationReactSvgUrl, onClick: () => this.onOpenLocation(item), disabled: false, }, @@ -791,7 +808,7 @@ class ContextOptionsStore { id: "option_mark-read", key: "mark-read", label: t("MarkRead"), - icon: "images/tick.rounded.svg", + icon: TickRoundedSvgUrl, onClick: () => this.onClickMarkRead(item), disabled: false, }, @@ -799,7 +816,7 @@ class ContextOptionsStore { id: "option_mark-as-favorite", key: "mark-as-favorite", label: t("MarkAsFavorite"), - icon: "images/favorites.react.svg", + icon: FavoritesReactSvgUrl, onClick: (e) => this.onClickFavorite(e, item.id, t), disabled: false, "data-action": "mark", @@ -809,7 +826,7 @@ class ContextOptionsStore { id: "option_remove-from-favorites", key: "remove-from-favorites", label: t("RemoveFromFavorites"), - icon: "images/favorites.react.svg", + icon: FavoritesReactSvgUrl, onClick: (e) => this.onClickFavorite(e, item.id, t), disabled: false, "data-action": "remove", @@ -819,7 +836,7 @@ class ContextOptionsStore { id: "option_download", key: "download", label: t("Common:Download"), - icon: "images/download.react.svg", + icon: DownloadReactSvgUrl, onClick: () => this.onClickDownload(item, t), disabled: false, }, @@ -827,7 +844,7 @@ class ContextOptionsStore { id: "option_download-as", key: "download-as", label: t("Translations:DownloadAs"), - icon: "images/download-as.react.svg", + icon: DownloadAsReactSvgUrl, onClick: this.onClickDownloadAs, disabled: false, }, @@ -836,7 +853,7 @@ class ContextOptionsStore { id: "option_restore", key: "restore", label: t("Common:Restore"), - icon: "images/move.react.svg", + icon: MoveReactSvgUrl, onClick: this.onMoveAction, disabled: false, }, @@ -844,7 +861,7 @@ class ContextOptionsStore { id: "option_rename", key: "rename", label: t("Rename"), - icon: "images/rename.react.svg", + icon: RenameReactSvgUrl, onClick: () => this.onClickRename(item), disabled: false, }, @@ -856,7 +873,7 @@ class ContextOptionsStore { id: "option_unsubscribe", key: "unsubscribe", label: t("RemoveFromList"), - icon: "images/remove.svg", + icon: RemoveSvgUrl, onClick: this.onClickUnsubscribe, disabled: false, }, @@ -882,7 +899,7 @@ class ContextOptionsStore { id: "option_unarchive-room", key: "unarchive-room", label: t("Common:Restore"), - icon: "images/subtract.react.svg", + icon: SubtractReactSvgUrl, onClick: (e) => this.onClickArchive(e), disabled: false, "data-action": "unarchive", @@ -894,7 +911,7 @@ class ContextOptionsStore { label: isRootThirdPartyFolder ? t("Common:Disconnect") : t("Common:Delete"), - icon: "images/trash.react.svg", + icon: TrashReactSvgUrl, onClick: () => this.onClickDelete(item, t), disabled: false, }, @@ -995,7 +1012,7 @@ class ContextOptionsStore { archiveOptions = { key: "unarchive-room", label: t("Common:Restore"), - icon: "images/subtract.react.svg", + icon: SubtractReactSvgUrl, onClick: (e) => this.onClickArchive(e), disabled: false, "data-action": "unarchive", @@ -1019,7 +1036,7 @@ class ContextOptionsStore { options.push({ key: "delete-rooms", label: t("Common:Delete"), - icon: "images/trash.react.svg", + icon: TrashReactSvgUrl, onClick: () => deleteRooms(t), }); @@ -1085,7 +1102,7 @@ class ContextOptionsStore { { key: "mark-as-favorite", label: t("MarkAsFavorite"), - icon: "images/favorites.react.svg", + icon: FavoritesReactSvgUrl, onClick: (e) => this.onClickFavorite(e, favoriteItemsIds, t), disabled: !favoriteItems.length, "data-action": "mark", @@ -1094,7 +1111,7 @@ class ContextOptionsStore { { key: "remove-from-favorites", label: t("RemoveFromFavorites"), - icon: "images/favorites.react.svg", + icon: FavoritesReactSvgUrl, onClick: (e) => this.onClickFavorite(e, removeFromFavoriteItemsIds, t), disabled: favoriteItems.length || !removeFromFavoriteItems.length, "data-action": "remove", @@ -1103,7 +1120,7 @@ class ContextOptionsStore { { key: "download", label: t("Common:Download"), - icon: "images/download.react.svg", + icon: DownloadReactSvgUrl, onClick: () => this.filesActionsStore .downloadAction(t("Translations:ArchivingData")) @@ -1113,14 +1130,14 @@ class ContextOptionsStore { { key: "download-as", label: t("Translations:DownloadAs"), - icon: "images/download-as.react.svg", + icon: DownloadAsReactSvgUrl, onClick: this.onClickDownloadAs, disabled: !downloadAs, }, { key: "move-to", label: t("MoveTo"), - icon: "images/move.react.svg", + icon: MoveReactSvgUrl, onClick: this.onMoveAction, disabled: isRecycleBinFolder || !moveItems, }, @@ -1134,7 +1151,7 @@ class ContextOptionsStore { { key: "restore", label: t("Common:Restore"), - icon: "images/move.react.svg", + icon: MoveReactSvgUrl, onClick: this.onMoveAction, disabled: !isRecycleBinFolder || !restoreItems, }, @@ -1146,7 +1163,7 @@ class ContextOptionsStore { { key: "delete", label: t("Common:Delete"), - icon: "images/trash.react.svg", + icon: TrashReactSvgUrl, onClick: () => { if (this.settingsStore.confirmDelete) { setDeleteDialogVisible(true); diff --git a/packages/client/src/store/FilesActionsStore.js b/packages/client/src/store/FilesActionsStore.js index 163a3476d6..3566d4b22c 100644 --- a/packages/client/src/store/FilesActionsStore.js +++ b/packages/client/src/store/FilesActionsStore.js @@ -1,4 +1,6 @@ -import InfoOutlineReactSvgUrl from "PUBLIC_DIR/images/info.outline.react.svg?url"; +import SubtractReactSvgUrl from "ASSETS_DIR/images/subtract.react.svg?url"; +import FavoritesReactSvgUrl from "ASSETS_DIR/images/favorites.react.svg?url"; +import InfoOutlineReactSvgUrl from "PUBLIC_DIR/images/info.outline.react.svg?url"; import CopyToReactSvgUrl from "PUBLIC_DIR/images/copyTo.react.svg?url"; import DownloadReactSvgUrl from "PUBLIC_DIR/images/download.react.svg?url"; import DownloadAsReactSvgUrl from "PUBLIC_DIR/images/downloadAs.react.svg?url"; @@ -1531,7 +1533,7 @@ class FilesActionStore { id: "menu-unarchive", key: "unarchive", label: t("Common:Restore"), - iconUrl: "images/subtract.react.svg", + iconUrl: SubtractReactSvgUrl, onClick: () => this.archiveRooms("unarchive"), disabled: false, }; @@ -1691,7 +1693,7 @@ class FilesActionStore { .set("delete", { label: t("RemoveFromFavorites"), alt: t("RemoveFromFavorites"), - iconUrl: "images/favorites.react.svg", + iconUrl: FavoritesReactSvgUrl, onClick: () => { const items = selection.map((item) => item.id); this.setFavoriteAction("remove", items) diff --git a/packages/client/src/store/PeopleStore.js b/packages/client/src/store/PeopleStore.js index 00c43c65c6..7f7ac59723 100644 --- a/packages/client/src/store/PeopleStore.js +++ b/packages/client/src/store/PeopleStore.js @@ -1,4 +1,7 @@ -import ChangeToEmployeeReactSvgUrl from "PUBLIC_DIR/images/change.to.employee.react.svg?url"; +import InfoReactSvgUrl from "ASSETS_DIR/images/info.react.svg?url"; +import EnableReactSvgUrl from "ASSETS_DIR/images/enable.react.svg?url"; +import DisableReactSvgUrl from "ASSETS_DIR/images/disable.react.svg?url"; +import ChangeToEmployeeReactSvgUrl from "PUBLIC_DIR/images/change.to.employee.react.svg?url"; import InviteAgainReactSvgUrl from "PUBLIC_DIR/images/invite.again.react.svg?url"; import DeleteReactSvgUrl from "PUBLIC_DIR/images/delete.react.svg?url"; import { makeAutoObservable } from "mobx"; @@ -247,7 +250,7 @@ class PeopleStore { isVisible || !(isTablet() || isMobile() || isMobileRDD || !isDesktop()), onClick: (item) => this.onOpenInfoPanel(item), - iconUrl: "images/info.react.svg", + iconUrl: InfoReactSvgUrl, }, { id: "menu-invite", @@ -263,7 +266,7 @@ class PeopleStore { label: t("Common:Enable"), disabled: !hasUsersToActivate, onClick: () => this.onChangeStatus(EmployeeStatus.Active), - iconUrl: "images/enable.react.svg", + iconUrl: EnableReactSvgUrl, }, { id: "menu-disable", @@ -271,7 +274,7 @@ class PeopleStore { label: t("PeopleTranslations:DisableUserButton"), disabled: !hasUsersToDisable, onClick: () => this.onChangeStatus(EmployeeStatus.Disabled), - iconUrl: "images/disable.react.svg", + iconUrl: DisableReactSvgUrl, }, { id: "menu-delete", diff --git a/packages/client/src/store/ThirdPartyStore.js b/packages/client/src/store/ThirdPartyStore.js index d9eb82f3eb..4066c8dd7a 100644 --- a/packages/client/src/store/ThirdPartyStore.js +++ b/packages/client/src/store/ThirdPartyStore.js @@ -1,3 +1,23 @@ +import IconBoxSmallReactSvgUrl from "ASSETS_DIR/images/icon_box_small.react.svg?url"; +import IconBoxReactSvgUrl from "ASSETS_DIR/images/icon_box.react.svg?url"; +import IconDropboxSmallReactSvgUrl from "ASSETS_DIR/images/icon_dropbox_small.react.svg?url"; +import IconDropboxReactSvgUrl from "ASSETS_DIR/images/icon_dropbox.react.svg?url"; +import IconGoogleDriveSmallReactSvgUrl from "ASSETS_DIR/images/icon_google_drive_small.react.svg?url"; +import IconGoogleDriveReactSvgUrl from "ASSETS_DIR/images/icon_google_drive.react.svg?url"; +import IconOnedriveSmallReactSvgUrl from "ASSETS_DIR/images/icon_onedrive_small.react.svg?url"; +import IconOnedriveReactSvgUrl from "ASSETS_DIR/images/icon_onedrive.react.svg?url"; +import IconSharepointSmallReactSvgUrl from "ASSETS_DIR/images/icon_sharepoint_small.react.svg?url"; +import IconSharepointReactSvgUrl from "ASSETS_DIR/images/icon_sharepoint.react.svg?url"; +import IconKdriveSmallReactSvgUrl from "ASSETS_DIR/images/icon_kdrive_small.react.svg?url"; +import IconKdriveReactSvgUrl from "ASSETS_DIR/images/icon_kdrive.react.svg?url"; +import IconYandexDiskSmallReactSvgUrl from "ASSETS_DIR/images/icon_yandex_disk_small.react.svg?url"; +import IconYandexDiskReactSvgUrl from "ASSETS_DIR/images/icon_yandex_disk.react.svg?url"; +import IconOwncloudSmallReactSvgUrl from "ASSETS_DIR/images/icon_owncloud_small.react.svg?url"; +import IconOwncloudReactSvgUrl from "ASSETS_DIR/images/icon_owncloud.react.svg?url"; +import IconNextcloudSmallReactSvgUrl from "ASSETS_DIR/images/icon_nextcloud_small.react.svg?url"; +import IconNextcloudReactSvgUrl from "ASSETS_DIR/images/icon_nextcloud.react.svg?url"; +import IconWebdavSmallReactSvgUrl from "ASSETS_DIR/images/icon_webdav_small.react.svg?url"; +import IconWebdavReactSvgUrl from "ASSETS_DIR/images/icon_webdav.react.svg?url"; import { makeAutoObservable } from "mobx"; import api from "@docspace/common/api"; @@ -92,38 +112,38 @@ class ThirdPartyStore { getThirdPartyIcon = (iconName, size = "big") => { switch (iconName) { case "Box": - if (size === "small") return "images/icon_box_small.react.svg"; - return "images/icon_box.react.svg"; + if (size === "small") return IconBoxSmallReactSvgUrl; + return IconBoxReactSvgUrl; case "DropboxV2": - if (size === "small") return "images/icon_dropbox_small.react.svg"; - return "images/icon_dropbox.react.svg"; + if (size === "small") return IconDropboxSmallReactSvgUrl; + return IconDropboxReactSvgUrl; case "GoogleDrive": - if (size === "small") return "images/icon_google_drive_small.react.svg"; - return "images/icon_google_drive.react.svg"; + if (size === "small") return IconGoogleDriveSmallReactSvgUrl; + return IconGoogleDriveReactSvgUrl; case "OneDrive": - if (size === "small") return "images/icon_onedrive_small.react.svg"; - return "images/icon_onedrive.react.svg"; + if (size === "small") return IconOnedriveSmallReactSvgUrl; + return IconOnedriveReactSvgUrl; case "SharePoint": - if (size === "small") return "images/icon_sharepoint_small.react.svg"; - return "images/icon_sharepoint.react.svg"; + if (size === "small") return IconSharepointSmallReactSvgUrl; + return IconSharepointReactSvgUrl; case "kDrive": - if (size === "small") return "images/icon_kdrive_small.react.svg"; - return "images/icon_kdrive.react.svg"; + if (size === "small") return IconKdriveSmallReactSvgUrl; + return IconKdriveReactSvgUrl; case "Yandex": - if (size === "small") return "images/icon_yandex_disk_small.react.svg"; - return "images/icon_yandex_disk.react.svg"; + if (size === "small") return IconYandexDiskSmallReactSvgUrl; + return IconYandexDiskReactSvgUrl; case "OwnCloud": - if (size === "small") return "images/icon_owncloud_small.react.svg"; - return "images/icon_owncloud.react.svg"; + if (size === "small") return IconOwncloudSmallReactSvgUrl; + return IconOwncloudReactSvgUrl; case "NextCloud": - if (size === "small") return "images/icon_nextcloud_small.react.svg"; - return "images/icon_nextcloud.react.svg"; + if (size === "small") return IconNextcloudSmallReactSvgUrl; + return IconNextcloudReactSvgUrl; case "OneDriveForBusiness": - if (size === "small") return "images/icon_onedrive_small.react.svg"; - return "images/icon_onedrive.react.svg"; + if (size === "small") return IconOnedriveSmallReactSvgUrl; + return IconOnedriveReactSvgUrl; case "WebDav": - if (size === "small") return "images/icon_webdav_small.react.svg"; - return "images/icon_webdav.react.svg"; + if (size === "small") return IconWebdavSmallReactSvgUrl; + return IconWebdavReactSvgUrl; default: return "";