From c15c9100e30c878741dd639dd42b62b3b187fee4 Mon Sep 17 00:00:00 2001 From: Kerry Archibald Date: Wed, 2 Mar 2022 16:23:09 +0100 Subject: [PATCH] replace all require(svgs) with esm import Signed-off-by: Kerry Archibald --- src/components/structures/FileDropTarget.tsx | 3 ++- src/components/structures/GroupView.js | 22 ++++++++++++------- src/components/structures/MyGroups.js | 3 ++- src/components/structures/RoomStatusBar.tsx | 3 ++- src/components/structures/UserMenu.tsx | 3 ++- src/components/views/avatars/WidgetAvatar.tsx | 15 ++++++++----- .../GroupInviteTileContextMenu.js | 3 ++- .../dialogs/AddExistingToSpaceDialog.tsx | 3 ++- .../CreateSpaceFromCommunityDialog.tsx | 3 ++- .../views/dialogs/ForwardDialog.tsx | 3 ++- src/components/views/dialogs/InviteDialog.tsx | 11 ++++++---- .../views/dialogs/ModalWidgetDialog.tsx | 4 ++-- .../views/dialogs/UploadConfirmDialog.tsx | 3 ++- .../security/SetupEncryptionDialog.tsx | 6 +++-- src/components/views/elements/AddressTile.tsx | 3 ++- src/components/views/elements/AppWarning.tsx | 4 +++- src/components/views/elements/SSOButtons.tsx | 18 ++++++++++----- .../views/groups/GroupMemberList.js | 3 ++- src/components/views/groups/GroupRoomInfo.js | 3 ++- src/components/views/groups/GroupRoomList.js | 3 ++- src/components/views/messages/MAudioBody.tsx | 3 ++- src/components/views/messages/MImageBody.tsx | 3 ++- .../views/messages/MStickerBody.tsx | 3 ++- src/components/views/messages/MVideoBody.tsx | 3 ++- .../views/messages/MVoiceMessageBody.tsx | 3 ++- .../views/right_panel/EncryptionPanel.tsx | 3 ++- src/components/views/rooms/EntityTile.tsx | 3 ++- .../views/rooms/LinkPreviewGroup.tsx | 3 ++- src/components/views/rooms/MemberList.tsx | 3 ++- .../views/rooms/MessageComposer.tsx | 3 ++- src/components/views/rooms/ReplyPreview.tsx | 3 ++- .../tabs/room/SecurityRoomSettingsTab.tsx | 3 ++- .../tabs/user/GeneralUserSettingsTab.tsx | 3 ++- 33 files changed, 104 insertions(+), 54 deletions(-) diff --git a/src/components/structures/FileDropTarget.tsx b/src/components/structures/FileDropTarget.tsx index 6032de6e583..72a86978d92 100644 --- a/src/components/structures/FileDropTarget.tsx +++ b/src/components/structures/FileDropTarget.tsx @@ -17,6 +17,7 @@ limitations under the License. import React, { useEffect, useState } from "react"; import { _t } from "../../languageHandler"; +import FileDropSvg from '../../../res/img/upload-big.svg'; interface IProps { parent: HTMLElement; @@ -109,7 +110,7 @@ const FileDropTarget: React.FC = ({ parent, onFileDrop }) => { if (state.dragging) { return
- + { _t("Drop file here to upload") }
; } diff --git a/src/components/structures/GroupView.js b/src/components/structures/GroupView.js index 338e8596649..bfeec99ae7c 100644 --- a/src/components/structures/GroupView.js +++ b/src/components/structures/GroupView.js @@ -46,6 +46,12 @@ import { createSpaceFromCommunity } from "../../utils/space"; import { Action } from "../../dispatcher/actions"; import { RightPanelPhases } from "../../stores/right-panel/RightPanelStorePhases"; import { UPDATE_EVENT } from "../../stores/AsyncStore"; +import CreateRoomSvg from '../../../res/img/icons-create-room.svg'; +import CancelSmallSvg from '../../../res/img/cancel-small.svg'; +import CancelSvg from '../../../res/img/cancel.svg'; +import ExternalLinkSvg from '../../../res/img/external-link.svg'; +import AddRoomSvg from '../../../res/img/icons-room-add.svg'; +import CameraSvg from '../../../res/img/camera.svg'; const LONG_DESC_PLACEHOLDER = _td( `

HTML for your community's page

@@ -135,7 +141,7 @@ class CategoryRoomList extends React.Component { ( - +
{ _t('Add a Room') }
@@ -235,7 +241,7 @@ class FeaturedRoom extends React.Component { const deleteButton = this.props.editing ? Delete - +
{ _t('Add a User') }
@@ -386,7 +392,7 @@ class FeaturedUser extends React.Component { const deleteButton = this.props.editing ? Delete - + ; } @@ -925,7 +931,7 @@ export default class GroupView extends React.Component { onClick={this._onAddRoomsClick} >
- +
{ _t('Add rooms to this community') } @@ -1257,7 +1263,7 @@ export default class GroupView extends React.Component {