mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-06-18 18:16:26 +00:00
Ongoing rewrite work
This commit is contained in:
7
src/frontend/js/app/error/main.ejs
Normal file
7
src/frontend/js/app/error/main.ejs
Normal file
@ -0,0 +1,7 @@
|
||||
<i class="fe fe-alert-triangle mr-2" aria-hidden="true"></i>
|
||||
<%= code ? '<strong>' + code + '</strong> — ' : '' %>
|
||||
<%- message %>
|
||||
|
||||
<% if (retry) { %>
|
||||
<br><br><a href="#" class="btn btn-sm btn-warning retry">Try again</a>
|
||||
<% } %>
|
29
src/frontend/js/app/error/main.js
Normal file
29
src/frontend/js/app/error/main.js
Normal file
@ -0,0 +1,29 @@
|
||||
'use strict';
|
||||
|
||||
const Mn = require('backbone.marionette');
|
||||
const template = require('./main.ejs');
|
||||
|
||||
module.exports = Mn.View.extend({
|
||||
template: template,
|
||||
className: 'alert alert-icon alert-warning m-5',
|
||||
|
||||
ui: {
|
||||
retry: 'a.retry'
|
||||
},
|
||||
|
||||
events: {
|
||||
'click @ui.retry': function (e) {
|
||||
e.preventDefault();
|
||||
this.getOption('retry')();
|
||||
}
|
||||
},
|
||||
|
||||
templateContext: function () {
|
||||
return {
|
||||
message: this.getOption('message'),
|
||||
code: this.getOption('code'),
|
||||
retry: typeof this.getOption('retry') === 'function'
|
||||
};
|
||||
}
|
||||
|
||||
});
|
Reference in New Issue
Block a user