diff --git a/frontend/src/api/interface/setting.ts b/frontend/src/api/interface/setting.ts index 87cc80a776a8..49ef3f63a3d9 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 f027f44a33b7..c27ec2337a29 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 cd3d5f6616ce..293e665ee999 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 4205a8c6459d..5e3e0e732b51 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 31b23eb594b9..929e5787632a 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;