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
|
@ -24,7 +24,6 @@ import { mediaFromMxc } from "../../../customisations/Media";
|
|||
import { IUserAddress } from '../../../UserAddress';
|
||||
import BaseAvatar from '../avatars/BaseAvatar';
|
||||
import EmailUserIcon from "../../../../res/img/icon-email-user.svg";
|
||||
import AddressDeleteSvg from '../../../../res/img/icon-address-delete.svg';
|
||||
|
||||
interface IProps {
|
||||
address: IUserAddress;
|
||||
|
@ -125,7 +124,7 @@ export default class AddressTile extends React.Component<IProps> {
|
|||
if (this.props.canDismiss) {
|
||||
dismiss = (
|
||||
<div className="mx_AddressTile_dismiss" onClick={this.props.onDismissed}>
|
||||
<img src={AddressDeleteSvg} width="9" height="9" />
|
||||
<img src={require("../../../../res/img/icon-address-delete.svg").default} width="9" height="9" />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
import React from 'react';
|
||||
|
||||
import WarningSvg from '../../../../res/img/warning.svg';
|
||||
|
||||
interface IProps {
|
||||
errorMsg?: string;
|
||||
}
|
||||
|
@ -10,7 +8,7 @@ const AppWarning: React.FC<IProps> = (props) => {
|
|||
return (
|
||||
<div className='mx_AppPermissionWarning'>
|
||||
<div className='mx_AppPermissionWarningImage'>
|
||||
<img src={WarningSvg} alt='' />
|
||||
<img src={require("../../../../res/img/warning.svg").default} alt='' />
|
||||
</div>
|
||||
<div className='mx_AppPermissionWarningText'>
|
||||
<span className='mx_AppPermissionWarningTextLabel'>{ props.errorMsg || "Error" }</span>
|
||||
|
|
|
@ -25,12 +25,6 @@ import { _t } from "../../../languageHandler";
|
|||
import { IdentityProviderBrand, IIdentityProvider, ISSOFlow } from "../../../Login";
|
||||
import AccessibleTooltipButton from "./AccessibleTooltipButton";
|
||||
import { mediaFromMxc } from "../../../customisations/Media";
|
||||
import AppleSvg from '../../../../res/img/element-icons/brands/apple.svg';
|
||||
import FacebookSvg from '../../../../res/img/element-icons/brands/facebook.svg';
|
||||
import GithubSvg from '../../../../res/img/element-icons/brands/github.svg';
|
||||
import GitlabSvg from '../../../../res/img/element-icons/brands/gitlab.svg';
|
||||
import GoogleSvg from '../../../../res/img/element-icons/brands/google.svg';
|
||||
import TwitterSvg from '../../../../res/img/element-icons/brands/twitter.svg';
|
||||
|
||||
interface ISSOButtonProps extends Omit<IProps, "flow"> {
|
||||
idp: IIdentityProvider;
|
||||
|
@ -40,17 +34,17 @@ interface ISSOButtonProps extends Omit<IProps, "flow"> {
|
|||
const getIcon = (brand: IdentityProviderBrand | string) => {
|
||||
switch (brand) {
|
||||
case IdentityProviderBrand.Apple:
|
||||
return AppleSvg;
|
||||
return require(`../../../../res/img/element-icons/brands/apple.svg`).default;
|
||||
case IdentityProviderBrand.Facebook:
|
||||
return FacebookSvg;
|
||||
return require(`../../../../res/img/element-icons/brands/facebook.svg`).default;
|
||||
case IdentityProviderBrand.Github:
|
||||
return GithubSvg;
|
||||
return require(`../../../../res/img/element-icons/brands/github.svg`).default;
|
||||
case IdentityProviderBrand.Gitlab:
|
||||
return GitlabSvg;
|
||||
return require(`../../../../res/img/element-icons/brands/gitlab.svg`).default;
|
||||
case IdentityProviderBrand.Google:
|
||||
return GoogleSvg;
|
||||
return require(`../../../../res/img/element-icons/brands/google.svg`).default;
|
||||
case IdentityProviderBrand.Twitter:
|
||||
return TwitterSvg;
|
||||
return require(`../../../../res/img/element-icons/brands/twitter.svg`).default;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue