[fix] Implementing comments from opi

This commit is contained in:
Alexandre Aubin 2016-12-01 22:23:41 -05:00
parent 35124f9c74
commit 32a7516927
3 changed files with 12 additions and 7 deletions

View file

@ -83,6 +83,10 @@
c.api('/domains/main', function(dataMain) { c.api('/domains/main', function(dataMain) {
c.api('/apps?installed', function(data) { // http://api.yunohost.org/#!/app/app_list_get_8 c.api('/apps?installed', function(data) { // http://api.yunohost.org/#!/app/app_list_get_8
// FIXME - This dirty trick (along with the previous API call
// for apps installed) should be removed once letsencrypt_ynh
// is not used by many people anymore. Probably around 07/2017
// or end of 2017...
enable_cert_management_ = true; enable_cert_management_ = true;
$.each(data['apps'], function(k, v) { $.each(data['apps'], function(k, v) {
if (v.id == "letsencrypt") if (v.id == "letsencrypt")
@ -98,7 +102,6 @@
url: "https://"+c.params['domain'], url: "https://"+c.params['domain'],
enable_cert_management: enable_cert_management_ enable_cert_management: enable_cert_management_
}; };
console.log(domain);
c.view('domain/domain_info', domain); c.view('domain/domain_info', domain);
}); });
}, 'PUT'); }, 'PUT');

View file

@ -302,6 +302,9 @@
"certificate_alert_good": "Okay, certificate looks good !", "certificate_alert_good": "Okay, certificate looks good !",
"certificate_alert_great": "Great ! You're using a valid Let's Encrypt certificate !", "certificate_alert_great": "Great ! You're using a valid Let's Encrypt certificate !",
"certificate_alert_unknown": "Unknown status", "certificate_alert_unknown": "Unknown status",
"certificate_manage" : "Manage SSL certificate",
"certificate_old_letsencrypt_app_conflict" : "The 'letsencrypt' app is currently installed and conflicts with this feature. Please uninstall it first to use the new certificate management interface.",
"ssl_certificate" : "SSL certificate",
"confirm_cert_install_LE": "Are you sure you want to install a Let's Encrypt certificate for this domain.", "confirm_cert_install_LE": "Are you sure you want to install a Let's Encrypt certificate for this domain.",
"confirm_cert_regen_selfsigned": "Are you sure you want to regenerate a self-signed certificate for this domain ?", "confirm_cert_regen_selfsigned": "Are you sure you want to regenerate a self-signed certificate for this domain ?",
"confirm_cert_manual_renew_LE": "Are you sure you want to manually renew the Let's Encrypt certificate for this domain now ?", "confirm_cert_manual_renew_LE": "Are you sure you want to manually renew the Let's Encrypt certificate for this domain now ?",

View file

@ -57,15 +57,14 @@
</div> </div>
<hr> <hr>
<div class="container"> <div class="container">
<p>Gérer le certificat</p> <p>{{t 'certificate_manage'}}</p>
{{#unless enable_cert_management}} {{#unless enable_cert_management}}
<p><span class="fa-fw fa-exclamation-circle"></span> The 'letsencrypt' <p><span class="fa-fw fa-exclamation-circle"></span>
app is currently installed and conflicts with this feature. Please {{t 'certificate_old_letsencrypt_app_conflict'}}
uninstall it first to use the new certificate management </p>
interface.</p>
{{/unless}} {{/unless}}
<a href="#/domains/{{name}}/cert-management" class="btn btn-default slide {{#unless enable_cert_management}}disabled{{/unless}}"> <a href="#/domains/{{name}}/cert-management" class="btn btn-default slide {{#unless enable_cert_management}}disabled{{/unless}}">
Certificat SSL <span class="fa-fw fa-lock"></span> {{t 'ssl_certificate'}} <span class="fa-fw fa-lock"></span>
</a> </a>
</div> </div>
<hr> <hr>