1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-19 08:19:15 +08:00

style: 修改许可证即将过期样式 (#6616)

This commit is contained in:
ssongliu 2024-09-29 14:37:45 +08:00 committed by GitHub
parent 2ac9a888a8
commit 4c275ba52f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 6 additions and 0 deletions

View File

@ -174,6 +174,7 @@ export namespace Setting {
}
export interface LicenseStatus {
productPro: string;
trial: boolean;
status: string;
}
}

View File

@ -34,6 +34,7 @@ export interface GlobalState {
defaultNetwork: string;
isProductPro: boolean;
isTrial: boolean;
productProExpires: number;
errStatus: string;

View File

@ -38,6 +38,7 @@ const GlobalStore = defineStore({
defaultNetwork: 'all',
isProductPro: false,
isTrial: false,
productProExpires: 0,
errStatus: '',

View File

@ -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;

View File

@ -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;