mirror of
https://github.com/certd/certd.git
synced 2026-04-14 20:40:53 +08:00
perf: 流水线页面可以查看证书过期时间
This commit is contained in:
@@ -298,8 +298,8 @@ function openUpgrade() {
|
||||
},
|
||||
},
|
||||
icon: "stash:thumb-up",
|
||||
price: productInfo.plus.price,
|
||||
price3: `¥${productInfo.plus.price3}/3${t("vip.years")}`,
|
||||
priceText: productInfo.plus.priceText || `¥${productInfo.plus.price}/${t("vip.years")}`,
|
||||
discountText: productInfo.plus.discountText || `¥${productInfo.plus.price3}/3${t("vip.years")}`,
|
||||
tooltip: productInfo.plus.tooltip,
|
||||
get() {
|
||||
return (
|
||||
@@ -317,8 +317,8 @@ function openUpgrade() {
|
||||
type: "comm",
|
||||
icon: "vaadin:handshake",
|
||||
privilege: [t("vip.all_pro_privileges"), t("vip.allow_commercial_use_modify_logo_title"), t("vip.data_statistics"), t("vip.plugin_management"), t("vip.unlimited_multi_users"), t("vip.support_user_payment")],
|
||||
price: productInfo.comm.price,
|
||||
price3: `¥${productInfo.comm.price3}/3${t("vip.years")}`,
|
||||
priceText: productInfo.comm.priceText || `¥${productInfo.comm.price}/${t("vip.years")}`,
|
||||
discountText: productInfo.comm.discountText || `¥${productInfo.comm.price3}/3${t("vip.years")}`,
|
||||
tooltip: productInfo.comm.tooltip,
|
||||
trial: {
|
||||
title: t("vip.click_to_get_7_day_trial"),
|
||||
|
||||
@@ -41,12 +41,16 @@ export interface SettingState {
|
||||
price: number;
|
||||
price3: number;
|
||||
tooltip?: string;
|
||||
priceText?: string;
|
||||
discountText?: string;
|
||||
};
|
||||
comm: {
|
||||
name: string;
|
||||
price: number;
|
||||
price3: number;
|
||||
tooltip?: string;
|
||||
priceText?: string;
|
||||
discountText?: string;
|
||||
};
|
||||
app?: {
|
||||
minVersion?: string;
|
||||
|
||||
@@ -40,6 +40,7 @@ const pipelineOptions: PipelineOptions = {
|
||||
validTime: detail.pipeline.validTime,
|
||||
webhookKey: detail.pipeline.webhookKey,
|
||||
id: detail.pipeline.id,
|
||||
lastVars: detail.pipeline.lastVars,
|
||||
} as PipelineDetail;
|
||||
},
|
||||
|
||||
|
||||
@@ -7,6 +7,16 @@
|
||||
</div>
|
||||
<div class="more flex items-center flex-1 justify-end">
|
||||
<div v-if="isCert" class="flex items-center hidden md:block">
|
||||
<a-tag :color="pipelineDetail.lastVars?.certExpiresTime > Date.now() ? 'green' : 'red'">
|
||||
<span class="flex">
|
||||
<fs-icon icon="ion:time-outline"></fs-icon>
|
||||
<span v-if="pipelineDetail.lastVars?.certExpiresTime > Date.now()">
|
||||
证书过期时间:<FsTimeHumanize :model-value="pipelineDetail.lastVars?.certExpiresTime" :options="{ units: ['d'] }" format="YYYY-MM-DD"></FsTimeHumanize>
|
||||
</span>
|
||||
<span v-else> 证书已过期 <FsTimeHumanize :model-value="pipelineDetail.lastVars?.certExpiresTime" :options="{ units: ['d'] }" format="YYYY-MM-DD"></FsTimeHumanize></span>
|
||||
</span>
|
||||
</a-tag>
|
||||
|
||||
<a-tag class="mr-5 pointer" color="green" type="primary" text="查看证书" @click="viewCert(pipeline.id)">
|
||||
<span class="flex"><fs-icon icon="ant-design:eye-outlined"></fs-icon> 查看证书</span>
|
||||
</a-tag>
|
||||
|
||||
@@ -5,6 +5,9 @@ export type PipelineDetail = {
|
||||
pipeline: Pipeline;
|
||||
validTime?: number;
|
||||
webhookKey?: string;
|
||||
lastVars?: {
|
||||
[key: string]: string;
|
||||
};
|
||||
};
|
||||
|
||||
export type RunHistory = {
|
||||
|
||||
@@ -202,6 +202,7 @@ export class PipelineService extends BaseService<PipelineEntity> {
|
||||
*/
|
||||
async detail(id) {
|
||||
const pipeline = await this.info(id);
|
||||
await this.fillLastVars([pipeline]);
|
||||
return new PipelineDetail(pipeline);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user