mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-09-20 13:35:55 +08:00
style: 修改许可证即将过期样式 (#6616)
This commit is contained in:
parent
2ac9a888a8
commit
4c275ba52f
5 changed files with 6 additions and 0 deletions
|
@ -174,6 +174,7 @@ export namespace Setting {
|
|||
}
|
||||
export interface LicenseStatus {
|
||||
productPro: string;
|
||||
trial: boolean;
|
||||
status: string;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,6 +34,7 @@ export interface GlobalState {
|
|||
defaultNetwork: string;
|
||||
|
||||
isProductPro: boolean;
|
||||
isTrial: boolean;
|
||||
productProExpires: number;
|
||||
|
||||
errStatus: string;
|
||||
|
|
|
@ -38,6 +38,7 @@ const GlobalStore = defineStore({
|
|||
defaultNetwork: 'all',
|
||||
|
||||
isProductPro: false,
|
||||
isTrial: false,
|
||||
productProExpires: 0,
|
||||
|
||||
errStatus: '',
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue