Added gather ban message

This commit is contained in:
Chris Blanchard 2015-08-27 13:11:38 +01:00
parent 1e298638af
commit ca4dcf0361
3 changed files with 27 additions and 0 deletions

View file

@ -35,6 +35,10 @@ var showAuthenticationNotice = () => {
$("#auth-required").show(); $("#auth-required").show();
}; };
var showGatherBanNotice = () => {
$("#gather-banned").show();
};
var renderPage = (socket) => { var renderPage = (socket) => {
initialiseVisibilityMonitoring(socket); initialiseVisibilityMonitoring(socket);
React.render(<UserMenu />, document.getElementById('side-menu')); React.render(<UserMenu />, document.getElementById('side-menu'));
@ -66,6 +70,9 @@ var initialiseComponents = () => {
if (error === "Authentication Failed") { if (error === "Authentication Failed") {
removeAuthWidget(); removeAuthWidget();
showAuthenticationNotice(); showAuthenticationNotice();
} else if (error === "Gather Banned") {
removeAuthWidget();
showGatherBanNotice();
} }
}) })
}; };

View file

@ -1124,6 +1124,10 @@ var showAuthenticationNotice = function showAuthenticationNotice() {
$("#auth-required").show(); $("#auth-required").show();
}; };
var showGatherBanNotice = function showGatherBanNotice() {
$("#gather-banned").show();
};
var renderPage = function renderPage(socket) { var renderPage = function renderPage(socket) {
initialiseVisibilityMonitoring(socket); initialiseVisibilityMonitoring(socket);
React.render(React.createElement(UserMenu, null), document.getElementById('side-menu')); React.render(React.createElement(UserMenu, null), document.getElementById('side-menu'));
@ -1152,6 +1156,9 @@ var initialiseComponents = function initialiseComponents() {
if (error === "Authentication Failed") { if (error === "Authentication Failed") {
removeAuthWidget(); removeAuthWidget();
showAuthenticationNotice(); showAuthenticationNotice();
} else if (error === "Gather Banned") {
removeAuthWidget();
showGatherBanNotice();
} }
}); });
}; };

View file

@ -17,6 +17,19 @@
</div> </div>
</div> </div>
</div> </div>
<div class="row" id="gather-banned" style="display:none;">
<div class="col-lg-6 col-lg-offset-3">
<div class="jumbotron jumbo-auth text-center">
<div>
<img src="/images/ensl_logo.png" alt="ENSL Logo" />
</div>
<h3>You're currently barred from joining gathers</h3>
<h3><small>Either wait for the ban to expire or talk to an admin to get it lifted</small></h3>
<br />
<p><a class="btn btn-primary btn-lg" href="{{ redirect + "/bans" }}" role="button">See the ban list</a></p>
</div>
</div>
</div>
<div class="row" id="auth-required" style="display:none;"> <div class="row" id="auth-required" style="display:none;">
<div class="col-lg-6 col-lg-offset-3"> <div class="col-lg-6 col-lg-offset-3">
<div class="jumbotron jumbo-auth text-center"> <div class="jumbotron jumbo-auth text-center">