From 9a45ce31108fa7528046d4d213a1fdf0d3d06b47 Mon Sep 17 00:00:00 2001 From: zhengkunwang223 <31820853+zhengkunwang223@users.noreply.github.com> Date: Fri, 2 Jun 2023 14:25:19 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=99=90=E5=88=B6=E5=B7=B2=E5=BA=9F?= =?UTF-8?q?=E5=BC=83=E5=BA=94=E7=94=A8=E5=8D=87=E7=BA=A7=E5=92=8C=E5=A4=87?= =?UTF-8?q?=E4=BB=BD=20(#1233)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/service/app.go | 1 + frontend/src/views/app-store/apps/index.vue | 1 + frontend/src/views/app-store/installed/index.vue | 15 ++++++++++++--- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/backend/app/service/app.go b/backend/app/service/app.go index afb9b9a3d..64034b9cb 100644 --- a/backend/app/service/app.go +++ b/backend/app/service/app.go @@ -474,6 +474,7 @@ func (a AppService) SyncAppListFromLocal() { if app.Status == constant.AppTakeDown { installs, _ := appInstallRepo.ListBy(appInstallRepo.WithAppId(app.ID)) if len(installs) > 0 { + updateApps = append(updateApps, app) continue } deleteAppIds = append(deleteAppIds, app.ID) diff --git a/frontend/src/views/app-store/apps/index.vue b/frontend/src/views/app-store/apps/index.vue index f5ebcab22..60b5ebd91 100644 --- a/frontend/src/views/app-store/apps/index.vue +++ b/frontend/src/views/app-store/apps/index.vue @@ -72,6 +72,7 @@ round size="small" @click="getAppDetail(app.key)" + :disabled="app.status === 'TakeDown'" > {{ $t('app.install') }} diff --git a/frontend/src/views/app-store/installed/index.vue b/frontend/src/views/app-store/installed/index.vue index 4ef8c8b91..45d7494d4 100644 --- a/frontend/src/views/app-store/installed/index.vue +++ b/frontend/src/views/app-store/installed/index.vue @@ -133,7 +133,10 @@ plain round size="small" - :disabled="installed.status !== 'Running'" + :disabled=" + installed.status !== 'Running' || + installed.app.status === 'TakeDown' + " @click="openUploads(installed.app.key, installed.name)" v-if="mode === 'installed'" > @@ -145,7 +148,10 @@ plain round size="small" - :disabled="installed.status !== 'Running'" + :disabled=" + installed.status !== 'Running' || + installed.app.status === 'TakeDown' + " @click="openBackups(installed.app.key, installed.name)" v-if="mode === 'installed'" > @@ -157,7 +163,10 @@ plain round size="small" - :disabled="installed.status !== 'Running'" + :disabled=" + installed.status !== 'Running' || + installed.app.status === 'TakeDown' + " @click="openOperate(installed, 'upgrade')" v-if="mode === 'upgrade'" >