Revert "replace all require(.svg) with esm import" (#7969)
* Revert "replace all require(svgs) with esm import (#7948)"
This reverts commit 61cd463a3b
.
* add .default to svg icon inline requires
Signed-off-by: Kerry Archibald <kerrya@element.io>
* add shameful eslint ignore
Signed-off-by: Kerry Archibald <kerrya@element.io>
* format eslintrc
Signed-off-by: Kerry Archibald <kerrya@element.io>
* add missed MFileBody change
Signed-off-by: Kerry Archibald <kerrya@element.io>
* one more broken svg
Signed-off-by: Kerry Archibald <kerrya@element.io>
* and ignore it
Signed-off-by: Kerry Archibald <kerrya@element.io>
This commit is contained in:
parent
8a7ffb4f90
commit
d98a73b003
36 changed files with 119 additions and 131 deletions
|
@ -25,7 +25,6 @@ import E2EIcon, { E2EState } from './E2EIcon';
|
|||
import { replaceableComponent } from "../../../utils/replaceableComponent";
|
||||
import BaseAvatar from '../avatars/BaseAvatar';
|
||||
import PresenceLabel from "./PresenceLabel";
|
||||
import PlusSvg from '../../../../res/img/plus.svg';
|
||||
|
||||
export enum PowerStatus {
|
||||
Admin = "admin",
|
||||
|
@ -160,7 +159,7 @@ export default class EntityTile extends React.PureComponent<IProps, IState> {
|
|||
if (this.props.showInviteButton) {
|
||||
inviteButton = (
|
||||
<div className="mx_EntityTile_invite">
|
||||
<img src={PlusSvg} width="16" height="16" />
|
||||
<img src={require("../../../../res/img/plus.svg").default} width="16" height="16" />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -25,7 +25,6 @@ import AccessibleButton from "../elements/AccessibleButton";
|
|||
import { _t } from "../../../languageHandler";
|
||||
import MatrixClientContext from "../../../contexts/MatrixClientContext";
|
||||
import { useAsyncMemo } from "../../../hooks/useAsyncMemo";
|
||||
import CancelSvg from '../../../../res/img/cancel.svg';
|
||||
|
||||
const INITIAL_NUM_PREVIEWS = 2;
|
||||
|
||||
|
@ -73,7 +72,7 @@ const LinkPreviewGroup: React.FC<IProps> = ({ links, mxEvent, onCancelClick, onH
|
|||
className="mx_filterFlipColor"
|
||||
alt=""
|
||||
role="presentation"
|
||||
src={CancelSvg}
|
||||
src={require("../../../../res/img/cancel.svg").default}
|
||||
width="18"
|
||||
height="18"
|
||||
/>
|
||||
|
|
|
@ -50,7 +50,6 @@ import SpaceStore from "../../../stores/spaces/SpaceStore";
|
|||
import { shouldShowComponent } from "../../../customisations/helpers/UIComponents";
|
||||
import { UIComponent } from "../../../settings/UIFeature";
|
||||
import PosthogTrackers from "../../../PosthogTrackers";
|
||||
import EllipsisSvg from '../../../../res/img/ellipsis.svg';
|
||||
|
||||
const INITIAL_LOAD_NUM_MEMBERS = 30;
|
||||
const INITIAL_LOAD_NUM_INVITED = 5;
|
||||
|
@ -317,7 +316,7 @@ export default class MemberList extends React.Component<IProps, IState> {
|
|||
<EntityTile
|
||||
className="mx_EntityTile_ellipsis"
|
||||
avatarJsx={
|
||||
<BaseAvatar url={EllipsisSvg} name="..." width={36} height={36} />
|
||||
<BaseAvatar url={require("../../../../res/img/ellipsis.svg").default} name="..." width={36} height={36} />
|
||||
}
|
||||
name={text}
|
||||
presenceState="online"
|
||||
|
|
|
@ -52,7 +52,6 @@ import { SettingUpdatedPayload } from "../../../dispatcher/payloads/SettingUpdat
|
|||
import MessageComposerButtons from './MessageComposerButtons';
|
||||
import { ButtonEvent } from '../elements/AccessibleButton';
|
||||
import { ViewRoomPayload } from "../../../dispatcher/payloads/ViewRoomPayload";
|
||||
import RoomReplaceSvg from '../../../../res/img/room_replaced.svg';
|
||||
|
||||
let instanceCount = 0;
|
||||
|
||||
|
@ -409,7 +408,7 @@ export default class MessageComposer extends React.Component<IProps, IState> {
|
|||
controls.push(<div className="mx_MessageComposer_replaced_wrapper" key="room_replaced">
|
||||
<div className="mx_MessageComposer_replaced_valign">
|
||||
<img className="mx_MessageComposer_roomReplaced_icon"
|
||||
src={RoomReplaceSvg}
|
||||
src={require("../../../../res/img/room_replaced.svg").default}
|
||||
/>
|
||||
<span className="mx_MessageComposer_roomReplaced_header">
|
||||
{ _t("This room has been replaced and is no longer active.") }
|
||||
|
|
|
@ -23,7 +23,6 @@ import { RoomPermalinkCreator } from "../../../utils/permalinks/Permalinks";
|
|||
import { replaceableComponent } from "../../../utils/replaceableComponent";
|
||||
import ReplyTile from './ReplyTile';
|
||||
import RoomContext, { TimelineRenderingType } from '../../../contexts/RoomContext';
|
||||
import CancelSvg from '../../../../res/img/cancel.svg';
|
||||
|
||||
function cancelQuoting(context: TimelineRenderingType) {
|
||||
dis.dispatch({
|
||||
|
@ -53,7 +52,7 @@ export default class ReplyPreview extends React.Component<IProps> {
|
|||
<div className="mx_ReplyPreview_header mx_ReplyPreview_cancel">
|
||||
<img
|
||||
className="mx_filterFlipColor"
|
||||
src={CancelSvg}
|
||||
src={require("../../../../res/img/cancel.svg").default}
|
||||
width="18"
|
||||
height="18"
|
||||
onClick={() => cancelQuoting(this.context.timelineRenderingType)}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue