Skip to content

Commit 46541a3

Browse files
committed
logout button on splashscreen to avoid wedging users whose server has gone awol
1 parent c9fe0b9 commit 46541a3

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

src/skins/vector/css/pages/MatrixChat.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,18 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17+
.mx_MatrixChat_splash {
18+
position: relative;
19+
height: 100%;
20+
}
21+
22+
.mx_MatrixChat_splashButtons {
23+
text-align: center;
24+
width: 100%;
25+
position: absolute;
26+
bottom: 30px;
27+
}
28+
1729
.mx_MatrixChat_wrapper {
1830
display: -webkit-box;
1931
display: -moz-box;

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,14 @@ module.exports = React.createClass({
6161
});
6262
},
6363

64+
onLogoutClick: function(event) {
65+
dis.dispatch({
66+
action: 'logout'
67+
});
68+
event.stopPropagation();
69+
event.preventDefault();
70+
},
71+
6472
handleResize: function(e) {
6573
var hideLhsThreshold = 1000;
6674
var showLhsThreshold = 1000;
@@ -157,7 +165,10 @@ module.exports = React.createClass({
157165
} else if (this.state.logged_in) {
158166
var Spinner = sdk.getComponent('atoms.Spinner');
159167
return (
160-
<Spinner />
168+
<div className="mx_MatrixChat_splash">
169+
<Spinner />
170+
<a href="#" className="mx_MatrixChat_splashButtons" onClick={ this.onLogoutClick }>Logout</a>
171+
</div>
161172
);
162173
} else if (this.state.screen == 'register') {
163174
return (

0 commit comments

Comments
 (0)