Added rate limiting logging and an error page for hitting the rate limit on opening characters
This commit is contained in:
20
rpg-docs/client/views/meta/error/error.html
Normal file
20
rpg-docs/client/views/meta/error/error.html
Normal file
@@ -0,0 +1,20 @@
|
||||
<template name="error">
|
||||
<app-header-layout has-scrolling-region fullbleed>
|
||||
<app-header class="app-grey white-text" fixed>
|
||||
<app-toolbar>
|
||||
<paper-icon-button icon="menu" drawer-toggle></paper-icon-button>
|
||||
</app-toolbar>
|
||||
</app-header>
|
||||
<div class="fit layout vertical center center-justified">
|
||||
<div class="paper-font-subhead"
|
||||
style="margin-left: 16px;
|
||||
margin-right: 16px;
|
||||
text-align: center;">
|
||||
{{#if errorMessage}}
|
||||
<div>{{errorMessage}}</div>
|
||||
<paper-button class="try-again">Try Again</paper-button>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
</app-header-layout>
|
||||
</template>
|
||||
17
rpg-docs/client/views/meta/error/error.js
Normal file
17
rpg-docs/client/views/meta/error/error.js
Normal file
@@ -0,0 +1,17 @@
|
||||
Template.error.onRendered(function(){
|
||||
const error = Session.get("error") || {};
|
||||
if (error.href) window.history.replaceState("", "", error.href);
|
||||
});
|
||||
|
||||
Template.error.helpers({
|
||||
errorMessage: function(){
|
||||
const error = Session.get("error") || {};
|
||||
return error.reason;
|
||||
},
|
||||
});
|
||||
|
||||
Template.error.events({
|
||||
"click .try-again": function(event, instance){
|
||||
window.location.reload();
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user