mirror of
https://github.com/xiaoxinpro/nginx-proxy-manager-zh.git
synced 2025-03-15 18:18:16 -04:00
fixed linting
This commit is contained in:
parent
be87c45f27
commit
8944609b63
@ -343,7 +343,6 @@ const internalCertificate = {
|
|||||||
* @returns {Promise}
|
* @returns {Promise}
|
||||||
*/
|
*/
|
||||||
download: (access, data) => {
|
download: (access, data) => {
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
access.can('certificates:get', data)
|
access.can('certificates:get', data)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
@ -366,8 +365,6 @@ const internalCertificate = {
|
|||||||
fileName: opName
|
fileName: opName
|
||||||
};
|
};
|
||||||
resolve(resp);
|
resolve(resp);
|
||||||
}).catch((err) => {
|
|
||||||
reject(err);
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
throw new error.ValidationError('Only Let\'sEncrypt certificates can be renewed');
|
throw new error.ValidationError('Only Let\'sEncrypt certificates can be renewed');
|
||||||
@ -377,10 +374,10 @@ const internalCertificate = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {String} source
|
* @param {String} source
|
||||||
* @param {String} out
|
* @param {String} out
|
||||||
* @returns {Promise}
|
* @returns {Promise}
|
||||||
*/
|
*/
|
||||||
zipDirectory(source, out) {
|
zipDirectory(source, out) {
|
||||||
const archive = archiver('zip', { zlib: { level: 9 } });
|
const archive = archiver('zip', { zlib: { level: 9 } });
|
||||||
const stream = fs.createWriteStream(out);
|
const stream = fs.createWriteStream(out);
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
<span class="dropdown-header"><%- i18n('audit-log', 'certificate') %> #<%- id %></span>
|
<span class="dropdown-header"><%- i18n('audit-log', 'certificate') %> #<%- id %></span>
|
||||||
<% if (provider === 'letsencrypt') { %>
|
<% if (provider === 'letsencrypt') { %>
|
||||||
<a href="#" class="renew dropdown-item"><i class="dropdown-icon fe fe-refresh-cw"></i> <%- i18n('certificates', 'force-renew') %></a>
|
<a href="#" class="renew dropdown-item"><i class="dropdown-icon fe fe-refresh-cw"></i> <%- i18n('certificates', 'force-renew') %></a>
|
||||||
<a href="#" class="download dropdown-item"><i class="dropdown-icon fe fe-download"></i><%- i18n('certificates', 'download') %></a>
|
<a href="#" class="download dropdown-item"><i class="dropdown-icon fe fe-download"></i> <%- i18n('certificates', 'download') %></a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<% } %>
|
<% } %>
|
||||||
<a href="#" class="delete dropdown-item"><i class="dropdown-icon fe fe-trash-2"></i> <%- i18n('str', 'delete') %></a>
|
<a href="#" class="delete dropdown-item"><i class="dropdown-icon fe fe-trash-2"></i> <%- i18n('str', 'delete') %></a>
|
||||||
|
@ -31,6 +31,7 @@ module.exports = Mn.View.extend({
|
|||||||
let win = window.open($(e.currentTarget).attr('rel'), '_blank');
|
let win = window.open($(e.currentTarget).attr('rel'), '_blank');
|
||||||
win.focus();
|
win.focus();
|
||||||
},
|
},
|
||||||
|
|
||||||
'click @ui.download': function (e) {
|
'click @ui.download': function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
App.Api.Nginx.Certificates.download(this.model.get('id'))
|
App.Api.Nginx.Certificates.download(this.model.get('id'))
|
||||||
|
@ -188,7 +188,7 @@
|
|||||||
"other-certificate-key": "Certificate Key",
|
"other-certificate-key": "Certificate Key",
|
||||||
"other-intermediate-certificate": "Intermediate Certificate",
|
"other-intermediate-certificate": "Intermediate Certificate",
|
||||||
"force-renew": "Renew Now",
|
"force-renew": "Renew Now",
|
||||||
"download":"Download",
|
"download": "Download",
|
||||||
"renew-title": "Renew Let'sEncrypt Certificate"
|
"renew-title": "Renew Let'sEncrypt Certificate"
|
||||||
},
|
},
|
||||||
"access-lists": {
|
"access-lists": {
|
||||||
|
Loading…
Reference in New Issue
Block a user