From 4c275ba52ff9eb0aeee2fb401edeb788be55c4c4 Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Sun, 29 Sep 2024 14:37:45 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E4=BF=AE=E6=94=B9=E8=AE=B8=E5=8F=AF?= =?UTF-8?q?=E8=AF=81=E5=8D=B3=E5=B0=86=E8=BF=87=E6=9C=9F=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=20(#6616)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/interface/setting.ts | 1 + frontend/src/store/interface/index.ts | 1 + frontend/src/store/modules/global.ts | 1 + frontend/src/utils/xpack.ts | 2 ++ frontend/src/views/setting/license/index.vue | 1 + 5 files changed, 6 insertions(+) diff --git a/frontend/src/api/interface/setting.ts b/frontend/src/api/interface/setting.ts index 87cc80a77..49ef3f63a 100644 --- a/frontend/src/api/interface/setting.ts +++ b/frontend/src/api/interface/setting.ts @@ -174,6 +174,7 @@ export namespace Setting { } export interface LicenseStatus { productPro: string; + trial: boolean; status: string; } } diff --git a/frontend/src/store/interface/index.ts b/frontend/src/store/interface/index.ts index f027f44a3..c27ec2337 100644 --- a/frontend/src/store/interface/index.ts +++ b/frontend/src/store/interface/index.ts @@ -34,6 +34,7 @@ export interface GlobalState { defaultNetwork: string; isProductPro: boolean; + isTrial: boolean; productProExpires: number; errStatus: string; diff --git a/frontend/src/store/modules/global.ts b/frontend/src/store/modules/global.ts index cd3d5f661..293e665ee 100644 --- a/frontend/src/store/modules/global.ts +++ b/frontend/src/store/modules/global.ts @@ -38,6 +38,7 @@ const GlobalStore = defineStore({ defaultNetwork: 'all', isProductPro: false, + isTrial: false, productProExpires: 0, errStatus: '', diff --git a/frontend/src/utils/xpack.ts b/frontend/src/utils/xpack.ts index 4205a8c64..5e3e0e732 100644 --- a/frontend/src/utils/xpack.ts +++ b/frontend/src/utils/xpack.ts @@ -61,6 +61,7 @@ export async function loadProductProFromDB() { res.data.status === 'Enable' || res.data.status === 'Lost01' || res.data.status === 'Lost02'; if (globalStore.isProductPro) { globalStore.productProExpires = Number(res.data.productPro); + globalStore.isTrial = res.data.trial; } } switchTheme(); @@ -81,6 +82,7 @@ export async function getXpackSettingForTheme() { res.data.status === 'Enable' || res.data.status === 'Lost01' || res.data.status === 'Lost02'; if (globalStore.isProductPro) { globalStore.productProExpires = Number(res.data.productPro); + globalStore.isTrial = res.data.trial; } if (!globalStore.isProductPro) { globalStore.isProductPro = false; diff --git a/frontend/src/views/setting/license/index.vue b/frontend/src/views/setting/license/index.vue index 31b23eb59..929e57876 100644 --- a/frontend/src/views/setting/license/index.vue +++ b/frontend/src/views/setting/license/index.vue @@ -201,6 +201,7 @@ const search = async () => { hasLicense.value = true; if (globalStore.isProductPro) { globalStore.productProExpires = Number(res.data.productPro); + globalStore.isTrial = res.data.trial; } license.licenseName = res.data.licenseName; license.message = res.data.message;