perf: 流水线页面可以查看证书过期时间

This commit is contained in:
xiaojunnuo
2026-01-13 00:50:32 +08:00
parent d338a9639a
commit be03d8e137
6 changed files with 23 additions and 4 deletions
@@ -298,8 +298,8 @@ function openUpgrade() {
}, },
}, },
icon: "stash:thumb-up", icon: "stash:thumb-up",
price: productInfo.plus.price, priceText: productInfo.plus.priceText || `¥${productInfo.plus.price}/${t("vip.years")}`,
price3: `¥${productInfo.plus.price3}/3${t("vip.years")}`, discountText: productInfo.plus.discountText || `¥${productInfo.plus.price3}/3${t("vip.years")}`,
tooltip: productInfo.plus.tooltip, tooltip: productInfo.plus.tooltip,
get() { get() {
return ( return (
@@ -317,8 +317,8 @@ function openUpgrade() {
type: "comm", type: "comm",
icon: "vaadin:handshake", 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")], 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, priceText: productInfo.comm.priceText || `¥${productInfo.comm.price}/${t("vip.years")}`,
price3: `¥${productInfo.comm.price3}/3${t("vip.years")}`, discountText: productInfo.comm.discountText || `¥${productInfo.comm.price3}/3${t("vip.years")}`,
tooltip: productInfo.comm.tooltip, tooltip: productInfo.comm.tooltip,
trial: { trial: {
title: t("vip.click_to_get_7_day_trial"), title: t("vip.click_to_get_7_day_trial"),
@@ -41,12 +41,16 @@ export interface SettingState {
price: number; price: number;
price3: number; price3: number;
tooltip?: string; tooltip?: string;
priceText?: string;
discountText?: string;
}; };
comm: { comm: {
name: string; name: string;
price: number; price: number;
price3: number; price3: number;
tooltip?: string; tooltip?: string;
priceText?: string;
discountText?: string;
}; };
app?: { app?: {
minVersion?: string; minVersion?: string;
@@ -40,6 +40,7 @@ const pipelineOptions: PipelineOptions = {
validTime: detail.pipeline.validTime, validTime: detail.pipeline.validTime,
webhookKey: detail.pipeline.webhookKey, webhookKey: detail.pipeline.webhookKey,
id: detail.pipeline.id, id: detail.pipeline.id,
lastVars: detail.pipeline.lastVars,
} as PipelineDetail; } as PipelineDetail;
}, },
@@ -7,6 +7,16 @@
</div> </div>
<div class="more flex items-center flex-1 justify-end"> <div class="more flex items-center flex-1 justify-end">
<div v-if="isCert" class="flex items-center hidden md:block"> <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)"> <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> <span class="flex"><fs-icon icon="ant-design:eye-outlined"></fs-icon> 查看证书</span>
</a-tag> </a-tag>
@@ -5,6 +5,9 @@ export type PipelineDetail = {
pipeline: Pipeline; pipeline: Pipeline;
validTime?: number; validTime?: number;
webhookKey?: string; webhookKey?: string;
lastVars?: {
[key: string]: string;
};
}; };
export type RunHistory = { export type RunHistory = {
@@ -202,6 +202,7 @@ export class PipelineService extends BaseService<PipelineEntity> {
*/ */
async detail(id) { async detail(id) {
const pipeline = await this.info(id); const pipeline = await this.info(id);
await this.fillLastVars([pipeline]);
return new PipelineDetail(pipeline); return new PipelineDetail(pipeline);
} }