From 6285f07757db8a8bd21327185a1bca322bc355c8 Mon Sep 17 00:00:00 2001 From: jingrow Date: Thu, 2 Apr 2026 22:49:36 +0800 Subject: [PATCH] =?UTF-8?q?tls=5Fcertificate=E9=A1=B5=E9=9D=A2=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E6=A0=8F=E5=A2=9E=E5=8A=A0=E5=A4=8D=E5=88=B6=E7=A7=81?= =?UTF-8?q?=E9=92=A5=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pagetype/tls_certificate/tls_certificate.js | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/jcloud/jcloud/pagetype/tls_certificate/tls_certificate.js b/jcloud/jcloud/pagetype/tls_certificate/tls_certificate.js index 1812148..3f99ecd 100644 --- a/jcloud/jcloud/pagetype/tls_certificate/tls_certificate.js +++ b/jcloud/jcloud/pagetype/tls_certificate/tls_certificate.js @@ -19,16 +19,9 @@ jingrow.ui.form.on('TLS Certificate', { }); }); } - if (!frm.pg.wildcard) { - frm.add_custom_button('Copy Private Key', () => { - jingrow.confirm( - `Are you sure you want to copy private - key. You should ONLY do this for custom - domains. And notify user of their - responsibility on handling private - key.`, - () => jingrow.utils.copy_to_clipboard(frm.pg.private_key), - ); + if (frm.pg.private_key) { + frm.add_custom_button(__('Copy Private Key'), () => { + jingrow.utils.copy_to_clipboard(frm.pg.private_key); }); } },