diff --git a/res/css/_common.scss b/res/css/_common.scss
index cf48358a4e..c087df04cb 100644
--- a/res/css/_common.scss
+++ b/res/css/_common.scss
@@ -428,6 +428,10 @@ input[type=text]:focus, input[type=password]:focus, textarea:focus {
border-radius: 8px;
padding: 0px;
box-shadow: none;
+
+ /* Don't show scroll-bars on spinner dialogs */
+ overflow-x: hidden;
+ overflow-y: hidden;
}
// TODO: Review mx_GeneralButton usage to see if it can use a different class
diff --git a/res/css/views/elements/_InlineSpinner.scss b/res/css/views/elements/_InlineSpinner.scss
index 612b6209c6..561b6cfb82 100644
--- a/res/css/views/elements/_InlineSpinner.scss
+++ b/res/css/views/elements/_InlineSpinner.scss
@@ -21,4 +21,12 @@ limitations under the License.
.mx_InlineSpinner img {
margin: 0px 6px;
vertical-align: -3px;
+
+ animation: spin 1s linear infinite;
+}
+
+@keyframes spin {
+ 100% {
+ transform: rotate(360deg);
+ }
}
diff --git a/res/css/views/elements/_Spinner.scss b/res/css/views/elements/_Spinner.scss
index 01b4f23c2c..db9f54b56c 100644
--- a/res/css/views/elements/_Spinner.scss
+++ b/res/css/views/elements/_Spinner.scss
@@ -23,6 +23,16 @@ limitations under the License.
flex: 1;
}
+.mx_Spinner img {
+ animation: spin 1s linear infinite;
+}
+
+@keyframes spin {
+ 100% {
+ transform: rotate(360deg);
+ }
+}
+
.mx_MatrixChat_middlePanel .mx_Spinner {
height: auto;
}
diff --git a/res/img/spinner.svg b/res/img/spinner.svg
new file mode 100644
index 0000000000..a18140c7e2
--- /dev/null
+++ b/res/img/spinner.svg
@@ -0,0 +1,3 @@
+
\ No newline at end of file
diff --git a/src/components/structures/MessagePanel.js b/src/components/structures/MessagePanel.js
index d11fee6360..481741dfd2 100644
--- a/src/components/structures/MessagePanel.js
+++ b/src/components/structures/MessagePanel.js
@@ -770,7 +770,7 @@ export default class MessagePanel extends React.Component {
topSpinner =
;
}
if (this.props.forwardPaginating) {
- bottomSpinner =
;
+ bottomSpinner =
;
}
const style = this.props.hidden ? { display: 'none' } : {};
diff --git a/src/components/views/elements/AppTile.js b/src/components/views/elements/AppTile.js
index 9129b8fe48..60cd1a2eba 100644
--- a/src/components/views/elements/AppTile.js
+++ b/src/components/views/elements/AppTile.js
@@ -29,7 +29,7 @@ import { _t } from '../../../languageHandler';
import * as sdk from '../../../index';
import AppPermission from './AppPermission';
import AppWarning from './AppWarning';
-import MessageSpinner from './MessageSpinner';
+import Spinner from './Spinner';
import WidgetUtils from '../../../utils/WidgetUtils';
import dis from '../../../dispatcher/dispatcher';
import ActiveWidgetStore from '../../../stores/ActiveWidgetStore';
@@ -740,7 +740,7 @@ export default class AppTile extends React.Component {
if (this.props.show) {
const loadingElement = (
-
+
);
if (!this.state.hasPermissionToLoad) {
diff --git a/src/components/views/elements/InlineSpinner.js b/src/components/views/elements/InlineSpinner.js
index ad70471d89..4842cba0c6 100644
--- a/src/components/views/elements/InlineSpinner.js
+++ b/src/components/views/elements/InlineSpinner.js
@@ -16,6 +16,7 @@ limitations under the License.
import React from "react";
import createReactClass from 'create-react-class';
+import {_t} from "../../../languageHandler";
export default createReactClass({
displayName: 'InlineSpinner',
@@ -24,10 +25,17 @@ export default createReactClass({
const w = this.props.w || 16;
const h = this.props.h || 16;
const imgClass = this.props.imgClassName || "";
+ const alt = this.props.alt || _t("Loading...");
return (
-
+
);
},
diff --git a/src/components/views/elements/MessageSpinner.js b/src/components/views/elements/MessageSpinner.js
deleted file mode 100644
index 1775fdd4d7..0000000000
--- a/src/components/views/elements/MessageSpinner.js
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
-Copyright 2017 Vector Creations Ltd
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-import React from 'react';
-import createReactClass from 'create-react-class';
-
-export default createReactClass({
- displayName: 'MessageSpinner',
-
- render: function() {
- const w = this.props.w || 32;
- const h = this.props.h || 32;
- const imgClass = this.props.imgClassName || "";
- const msg = this.props.msg || "Loading...";
- return (
-
-
{ msg }
-
-
- );
- },
-});
diff --git a/src/components/views/elements/Spinner.js b/src/components/views/elements/Spinner.js
index b1fe97d5d2..3d5697c72e 100644
--- a/src/components/views/elements/Spinner.js
+++ b/src/components/views/elements/Spinner.js
@@ -16,19 +16,29 @@ limitations under the License.
*/
import React from "react";
-import createReactClass from 'create-react-class';
+import PropTypes from "prop-types";
+import {_t} from "../../../languageHandler";
-export default createReactClass({
- displayName: 'Spinner',
+const Spinner = ({w = 32, h = 32, imgClassName, alt, message}) => {
+ return (
+