replace all require(svgs) with esm import (#7948)
Signed-off-by: Kerry Archibald <kerrya@element.io>
This commit is contained in:
parent
522ad1aafb
commit
61cd463a3b
33 changed files with 104 additions and 54 deletions
|
@ -72,6 +72,9 @@ import { ScreenName } from '../../../PosthogTrackers';
|
|||
import { ViewRoomPayload } from "../../../dispatcher/payloads/ViewRoomPayload";
|
||||
import { KeyBindingAction } from "../../../accessibility/KeyboardShortcuts";
|
||||
import { getKeyBindingsManager } from "../../../KeyBindingsManager";
|
||||
import EmailPillSvg from '../../../../res/img/icon-email-pill-avatar.svg';
|
||||
import PillRemoveSvg from '../../../../res/img/icon-pill-remove.svg';
|
||||
import InfoSvg from '../../../../res/img/element-icons/info.svg';
|
||||
|
||||
// we have a number of types defined from the Matrix spec which can't reasonably be altered here.
|
||||
/* eslint-disable camelcase */
|
||||
|
@ -195,7 +198,7 @@ class DMUserTile extends React.PureComponent<IDMUserTileProps> {
|
|||
const avatar = (this.props.member as ThreepidMember).isEmail
|
||||
? <img
|
||||
className='mx_InviteDialog_userTile_avatar mx_InviteDialog_userTile_threepidAvatar'
|
||||
src={require("../../../../res/img/icon-email-pill-avatar.svg")}
|
||||
src={EmailPillSvg}
|
||||
width={avatarSize}
|
||||
height={avatarSize}
|
||||
/>
|
||||
|
@ -217,7 +220,7 @@ class DMUserTile extends React.PureComponent<IDMUserTileProps> {
|
|||
onClick={this.onRemove}
|
||||
>
|
||||
<img
|
||||
src={require("../../../../res/img/icon-pill-remove.svg")}
|
||||
src={PillRemoveSvg}
|
||||
alt={_t('Remove')}
|
||||
width={8}
|
||||
height={8}
|
||||
|
@ -301,7 +304,7 @@ class DMRoomTile extends React.PureComponent<IDMRoomTileProps> {
|
|||
const avatarSize = 36;
|
||||
const avatar = (this.props.member as ThreepidMember).isEmail
|
||||
? <img
|
||||
src={require("../../../../res/img/icon-email-pill-avatar.svg")}
|
||||
src={EmailPillSvg}
|
||||
width={avatarSize}
|
||||
height={avatarSize}
|
||||
/>
|
||||
|
@ -1472,7 +1475,7 @@ export default class InviteDialog extends React.PureComponent<IInviteDialogProps
|
|||
keySharingWarning =
|
||||
<p className='mx_InviteDialog_helpText'>
|
||||
<img
|
||||
src={require("../../../../res/img/element-icons/info.svg")}
|
||||
src={InfoSvg}
|
||||
width={14}
|
||||
height={14} />
|
||||
{ " " + _t("Invited people will be able to read old messages.") }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue