mirror of
https://github.com/certd/certd.git
synced 2026-04-24 20:57:26 +08:00
chore: 永久专业版特殊颜色
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-if="!settingStore.isComm || userStore.isAdmin" class="layout-vip isPlus" @click="openUpgrade">
|
<div v-if="!settingStore.isComm || userStore.isAdmin" class="layout-vip isPlus" :class="{ isForever: settingStore.isForever }" @click="openUpgrade">
|
||||||
<contextHolder />
|
<contextHolder />
|
||||||
<fs-icon icon="mingcute:vip-1-line" :title="text.title" />
|
<fs-icon icon="mingcute:vip-1-line" :title="text.title" />
|
||||||
|
|
||||||
@@ -106,7 +106,7 @@ const text = computed<Text>(() => {
|
|||||||
|
|
||||||
const expireTime = computed(() => {
|
const expireTime = computed(() => {
|
||||||
if (settingStore.isPlus) {
|
if (settingStore.isPlus) {
|
||||||
return dayjs(settingStore.plusInfo.expireTime).format("YYYY-MM-DD");
|
return settingStore.expiresText;
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
});
|
});
|
||||||
@@ -368,7 +368,7 @@ function openUpgrade() {
|
|||||||
</div>
|
</div>
|
||||||
<div class="mt-10">
|
<div class="mt-10">
|
||||||
<h3 class="block-header">{isPlus ? t("vip.renew") : t("vip.activate_immediately")}</h3>
|
<h3 class="block-header">{isPlus ? t("vip.renew") : t("vip.activate_immediately")}</h3>
|
||||||
<div>{isPlus ? `${t("vip.current")} ${vipLabel} ${t("vip.activated_expire_time")}` + dayjs(settingStore.plusInfo.expireTime).format("YYYY-MM-DD") : ""}</div>
|
<div>{isPlus ? `${t("vip.current")} ${vipLabel} ${t("vip.activated_expire_time")}` + settingStore.expiresText : ""}</div>
|
||||||
<div class="mt-10">
|
<div class="mt-10">
|
||||||
<div class="flex-o w-100">
|
<div class="flex-o w-100">
|
||||||
<span>{t("vip.site_id")}:</span>
|
<span>{t("vip.site_id")}:</span>
|
||||||
@@ -410,6 +410,10 @@ onMounted(() => {
|
|||||||
|
|
||||||
&.isPlus {
|
&.isPlus {
|
||||||
color: #c5913f;
|
color: #c5913f;
|
||||||
|
|
||||||
|
&.isForever {
|
||||||
|
color: #ff2e83;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.text {
|
.text {
|
||||||
|
|||||||
@@ -125,10 +125,10 @@ export const useSettingStore = defineStore({
|
|||||||
return this.installInfo;
|
return this.installInfo;
|
||||||
},
|
},
|
||||||
isPlus(): boolean {
|
isPlus(): boolean {
|
||||||
return this.plusInfo?.isPlus && this.plusInfo?.expireTime > new Date().getTime();
|
return this.plusInfo?.isPlus && (this.plusInfo?.expireTime === -1 || this.plusInfo?.expireTime > new Date().getTime());
|
||||||
},
|
},
|
||||||
isComm(): boolean {
|
isComm(): boolean {
|
||||||
return this.plusInfo?.isComm && this.plusInfo?.expireTime > new Date().getTime();
|
return this.plusInfo?.isComm && (this.plusInfo?.expireTime === -1 || this.plusInfo?.expireTime > new Date().getTime());
|
||||||
},
|
},
|
||||||
isAgent(): boolean {
|
isAgent(): boolean {
|
||||||
return this.siteEnv?.agent?.enabled === true;
|
return this.siteEnv?.agent?.enabled === true;
|
||||||
@@ -136,6 +136,18 @@ export const useSettingStore = defineStore({
|
|||||||
isCommOrAgent() {
|
isCommOrAgent() {
|
||||||
return this.isComm || this.isAgent;
|
return this.isComm || this.isAgent;
|
||||||
},
|
},
|
||||||
|
expiresText() {
|
||||||
|
if (this.plusInfo?.expireTime == null) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
if (this.plusInfo?.expireTime === -1) {
|
||||||
|
return "永久";
|
||||||
|
}
|
||||||
|
return utils.time.formatDate(this.plusInfo?.expireTime, "yyyy-MM-dd");
|
||||||
|
},
|
||||||
|
isForever() {
|
||||||
|
return this.isPlus && this.plusInfo?.expireTime === -1;
|
||||||
|
},
|
||||||
vipLabel(): string {
|
vipLabel(): string {
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const vipLabelMap: any = {
|
const vipLabelMap: any = {
|
||||||
|
|||||||
Reference in New Issue
Block a user