tls_certificate页面工具栏增加复制私钥按钮

This commit is contained in:
jingrow 2026-04-02 22:49:36 +08:00
parent 09ecafc25a
commit 6285f07757

View File

@ -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);
});
}
},