diff --git a/internal/web/actions/default/servers/certs/updatePopup.go b/internal/web/actions/default/servers/certs/updatePopup.go index 004fca2a..16bde78d 100644 --- a/internal/web/actions/default/servers/certs/updatePopup.go +++ b/internal/web/actions/default/servers/certs/updatePopup.go @@ -26,18 +26,20 @@ func (this *UpdatePopupAction) RunGet(params struct { this.ErrorPage(err) return } - certConfigJSON := certConfigResp.SslCertJSON + var certConfigJSON = certConfigResp.SslCertJSON if len(certConfigJSON) == 0 { this.NotFound("cert", params.CertId) return } - certConfig := &sslconfigs.SSLCertConfig{} + var certConfig = &sslconfigs.SSLCertConfig{} err = json.Unmarshal(certConfigJSON, certConfig) if err != nil { this.ErrorPage(err) return } + certConfig.CertData = nil // cert & key 不需要在界面上显示 + certConfig.KeyData = nil this.Data["certConfig"] = certConfig this.Show() diff --git a/web/public/js/components/common/file-textarea.js b/web/public/js/components/common/file-textarea.js index e43376cc..e9e5a82f 100644 --- a/web/public/js/components/common/file-textarea.js +++ b/web/public/js/components/common/file-textarea.js @@ -21,6 +21,9 @@ Vue.component("file-textarea", { }, setValue: function (value) { this.realValue = value + }, + focus: function () { + this.$refs.textarea.focus() } }, template: `` diff --git a/web/views/@default/servers/certs/updatePopup.html b/web/views/@default/servers/certs/updatePopup.html index f1aa7fdc..10561801 100644 --- a/web/views/@default/servers/certs/updatePopup.html +++ b/web/views/@default/servers/certs/updatePopup.html @@ -1,6 +1,6 @@ {$layout "layout_popup"} -