@@ -2385,18 +2385,29 @@ Vue.component("http-cache-refs-box", {
23852385Vue . component ( "ssl-certs-box" , {
23862386 props : [
23872387 "v-certs" , // 证书列表
2388+ "v-cert" , // 单个证书
23882389 "v-protocol" , // 协议:https|tls
2389- "v-view-size" , // 弹窗尺寸
2390- "v-single-mode" // 单证书模式
2390+ "v-view-size" , // 弹窗尺寸:normal, mini
2391+ "v-single-mode" , // 单证书模式
2392+ "v-description" // 描述文字
23912393 ] ,
23922394 data : function ( ) {
23932395 let certs = this . vCerts
23942396 if ( certs == null ) {
23952397 certs = [ ]
23962398 }
2399+ if ( this . vCert != null ) {
2400+ certs . push ( this . vCert )
2401+ }
2402+
2403+ let description = this . vDescription
2404+ if ( description == null || typeof ( description ) != "string" ) {
2405+ description = ""
2406+ }
23972407
23982408 return {
2399- certs : certs
2409+ certs : certs ,
2410+ description : description
24002411 }
24012412 } ,
24022413 methods : {
@@ -2461,13 +2472,14 @@ Vue.component("ssl-certs-box", {
24612472 template : `<div>
24622473 <input type="hidden" name="certIdsJSON" :value="JSON.stringify(certIds())"/>
24632474 <div v-if="certs != null && certs.length > 0">
2464- <div class="ui label small" v-for="(cert, index) in certs">
2475+ <div class="ui label small basic " v-for="(cert, index) in certs">
24652476 {{cert.name}} / {{cert.dnsNames}} / 有效至{{formatTime(cert.timeEndAt)}} <a href="" title="删除" @click.prevent="removeCert(index)"><i class="icon remove"></i></a>
24662477 </div>
24672478 <div class="ui divider" v-if="buttonsVisible()"></div>
24682479 </div>
24692480 <div v-else>
2470- <span class="red">选择或上传证书后<span v-if="vProtocol == 'https'">HTTPS</span><span v-if="vProtocol == 'tls'">TLS</span>服务才能生效。</span>
2481+ <span class="red" v-if="description.length == 0">选择或上传证书后<span v-if="vProtocol == 'https'">HTTPS</span><span v-if="vProtocol == 'tls'">TLS</span>服务才能生效。</span>
2482+ <span class="grey" v-if="description.length > 0">{{description}}</span>
24712483 <div class="ui divider" v-if="buttonsVisible()"></div>
24722484 </div>
24732485 <div v-if="buttonsVisible()">
@@ -4259,6 +4271,9 @@ Vue.component("origin-list-table", {
42594271 <div v-if="origin.domains != null && origin.domains.length > 0">
42604272 <grey-label v-for="domain in origin.domains">{{domain}}</grey-label>
42614273 </div>
4274+ <div v-if="origin.hasCert">
4275+ <tiny-basic-label>证书</tiny-basic-label>
4276+ </div>
42624277 </td>
42634278 <td :class="{disabled:!origin.isOn}">{{origin.weight}}</td>
42644279 <td>
0 commit comments