Skip to content

Commit

Permalink
style: 修改许可证即将过期样式 (#6616)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssongliu authored and wanghe-fit2cloud committed Sep 29, 2024
1 parent df003c5 commit e6322ad
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions frontend/src/api/interface/setting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ export namespace Setting {
}
export interface LicenseStatus {
productPro: string;
trial: boolean;
status: string;
}
}
1 change: 1 addition & 0 deletions frontend/src/store/interface/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export interface GlobalState {
defaultNetwork: string;

isProductPro: boolean;
isTrial: boolean;
productProExpires: number;

errStatus: string;
Expand Down
1 change: 1 addition & 0 deletions frontend/src/store/modules/global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const GlobalStore = defineStore({
defaultNetwork: 'all',

isProductPro: false,
isTrial: false,
productProExpires: 0,

errStatus: '',
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/utils/xpack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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;
Expand Down
1 change: 1 addition & 0 deletions frontend/src/views/setting/license/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e6322ad

Please sign in to comment.