Remove logo spinner

Removed since design wants to avoid associating slowness with the brand.

Signed-off-by: Robin Townsend <robin@robin.town>
This commit is contained in:
Robin Townsend 2021-05-20 17:31:10 -04:00
parent d0d56d4b42
commit 332412782e
7 changed files with 14 additions and 204 deletions

View file

@ -16,7 +16,6 @@ limitations under the License.
import React from "react";
import {_t} from "../../../languageHandler";
import SettingsStore from "../../../settings/SettingsStore";
import {replaceableComponent} from "../../../utils/replaceableComponent";
@replaceableComponent("views.elements.InlineSpinner")
@ -24,31 +23,15 @@ export default class InlineSpinner extends React.Component {
render() {
const w = this.props.w || 16;
const h = this.props.h || 16;
const imgClass = this.props.imgClassName || "";
let icon;
if (SettingsStore.getValue('feature_new_spinner')) {
icon = (
<img
src={require("../../../../res/img/logo-spinner.svg")}
width={w}
height={h}
className={imgClass}
aria-label={_t("Loading...")}
/>
);
} else {
icon = (
return (
<div className="mx_InlineSpinner">
<div
className="mx_InlineSpinner_icon mx_Spinner_icon"
style={{width: w, height: h}}
aria-label={_t("Loading...")}
></div>
);
}
return (
<div className="mx_InlineSpinner">{ icon }</div>
</div>
);
}
}

View file

@ -18,41 +18,21 @@ limitations under the License.
import React from "react";
import PropTypes from "prop-types";
import {_t} from "../../../languageHandler";
import SettingsStore from "../../../settings/SettingsStore";
const Spinner = ({w = 32, h = 32, imgClassName, message}) => {
let icon;
if (SettingsStore.getValue('feature_new_spinner')) {
icon = (
<img
src={require("../../../../res/img/logo-spinner.svg")}
width={w}
height={h}
className={imgClassName}
aria-label={_t("Loading...")}
/>
);
} else {
icon = (
<div
className="mx_Spinner_icon"
style={{width: w, height: h}}
aria-label={_t("Loading...")}
></div>
);
}
const Spinner = ({w = 32, h = 32, message}) => (
<div className="mx_Spinner">
{ message && <React.Fragment><div className="mx_Spinner_Msg">{ message }</div>&nbsp;</React.Fragment> }
<div
className="mx_Spinner_icon"
style={{width: w, height: h}}
aria-label={_t("Loading...")}
></div>
</div>
);
return (
<div className="mx_Spinner">
{ message && <React.Fragment><div className="mx_Spinner_Msg">{ message }</div>&nbsp;</React.Fragment> }
{ icon }
</div>
);
};
Spinner.propTypes = {
w: PropTypes.number,
h: PropTypes.number,
imgClassName: PropTypes.string,
message: PropTypes.node,
};