From 0c216ba87a8b935a9cd4eabbcc70a18326ac58e4 Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Tue, 8 Oct 2024 21:56:55 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=94=AF=E6=8C=81=E7=A6=BB=E7=BA=BF?= =?UTF-8?q?=E7=89=88=E8=AE=B8=E5=8F=AF=E8=AF=81=20(#6651)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/interface/setting.ts | 1 + frontend/src/views/setting/license/index.vue | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/frontend/src/api/interface/setting.ts b/frontend/src/api/interface/setting.ts index 49ef3f63a..c5d2def9c 100644 --- a/frontend/src/api/interface/setting.ts +++ b/frontend/src/api/interface/setting.ts @@ -169,6 +169,7 @@ export namespace Setting { assigneeName: string; productPro: string; trial: boolean; + offline: boolean; status: string; message: string; } diff --git a/frontend/src/views/setting/license/index.vue b/frontend/src/views/setting/license/index.vue index 929e57876..944ae9c0e 100644 --- a/frontend/src/views/setting/license/index.vue +++ b/frontend/src/views/setting/license/index.vue @@ -18,7 +18,14 @@ > {{ $t('commons.button.sync') }} - + {{ $t('license.unbind') }} @@ -124,6 +131,7 @@ const hasLicense = ref(); const license = reactive({ licenseName: '', trial: true, + offline: true, expiresAt: '', assigneeName: '', productName: '', @@ -207,6 +215,7 @@ const search = async () => { license.message = res.data.message; license.assigneeName = res.data.assigneeName; license.trial = res.data.trial; + license.offline = res.data.offline; if (res.data.productPro) { license.productName = 'product-1panel-pro'; license.expiresAt = @@ -221,7 +230,7 @@ const search = async () => { }; const showSync = () => { - return license.status.indexOf('Lost') !== -1 || license.status === 'Disable'; + return (license.status.indexOf('Lost') !== -1 || license.status === 'Disable') && !license.offline; }; const toUpload = () => {