Skip to content

Commit ed4c5b9

Browse files
committed
switch initial spinner to mx_Spinner
1 parent 4e170a2 commit ed4c5b9

3 files changed

Lines changed: 29 additions & 6 deletions

File tree

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
Copyright 2015 OpenMarket Ltd
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
.mx_Spinner {
18+
display: -webkit-flex;
19+
display: flex;
20+
-webkit-align-items: center;
21+
-webkit-justify-content: center;
22+
align-items: center;
23+
justify-content: center;
24+
height: 100%;
25+
}

‎src/skins/vector/views/atoms/Spinner.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ module.exports = React.createClass({
2626
var h = this.props.h || 32;
2727
var imgClass = this.props.imgClassName || "";
2828
return (
29-
<div>
29+
<div className="mx_Spinner">
3030
<img src="img/spinner.gif" width={w} height={h} className={imgClass}/>
3131
</div>
3232
);

‎src/skins/vector/views/pages/MatrixChat.js‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ var sdk = require('matrix-react-sdk')
2323

2424
var MatrixChatController = require('matrix-react-sdk/lib/controllers/pages/MatrixChat')
2525

26-
// should be atomised
27-
var Loader = require("react-loader");
28-
2926
var dis = require('matrix-react-sdk/lib/dispatcher');
3027
var Matrix = require("matrix-js-sdk");
3128
var ContextualMenu = require("../../../../ContextualMenu");
@@ -156,8 +153,9 @@ var MatrixChat = React.createClass({
156153
);
157154
}
158155
} else if (this.state.logged_in) {
156+
var Spinner = sdk.getComponent('atoms.Spinner');
159157
return (
160-
<Loader />
158+
<Spinner />
161159
);
162160
} else if (this.state.screen == 'register') {
163161
return (
@@ -175,4 +173,4 @@ var MatrixChat = React.createClass({
175173
}
176174
});
177175

178-
module.exports = DragDropContext(HTML5Backend)(MatrixChat);
176+
module.exports = DragDropContext(HTML5Backend)(MatrixChat);

0 commit comments

Comments
 (0)