From 7a2d64744c832a8960d18aa4512d4fbe5b3b3b3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=97=E5=AD=90?= Date: Thu, 15 Jan 2026 21:42:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E6=98=BE=E7=A4=BA=E4=B8=8D=E6=AD=A3=E7=A1=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/views/project/ListView.vue | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/web/src/views/project/ListView.vue b/web/src/views/project/ListView.vue index b423ed1d..0057c59b 100644 --- a/web/src/views/project/ListView.vue +++ b/web/src/views/project/ListView.vue @@ -59,8 +59,8 @@ const columns: any = [ render(row: any) { return h( NTag, - { type: row.status === 'running' ? 'success' : 'default' }, - { default: () => (row.status === 'running' ? $gettext('Running') : $gettext('Stopped')) } + { type: row.status === 'active' ? 'success' : 'default' }, + { default: () => (row.status === 'active' ? $gettext('Running') : $gettext('Stopped')) } ) } }, @@ -95,10 +95,10 @@ const columns: any = [ NButton, { size: 'small', - type: row.status === 'running' ? 'warning' : 'success', + type: row.status === 'active' ? 'warning' : 'success', onClick: () => handleToggleStatus(row) }, - { default: () => (row.status === 'running' ? $gettext('Stop') : $gettext('Start')) } + { default: () => (row.status === 'active' ? $gettext('Stop') : $gettext('Start')) } ), h( NButton, @@ -157,14 +157,14 @@ const { loading, data, page, total, pageSize, pageCount, refresh } = usePaginati ) const handleToggleStatus = (row: any) => { - if (row.status === 'running') { + if (row.status === 'active') { useRequest(systemctl.stop(row.name)).onSuccess(() => { - row.status = 'stopped' + row.status = 'inactive' window.$message.success($gettext('Stopped successfully')) }) } else { useRequest(systemctl.start(row.name)).onSuccess(() => { - row.status = 'running' + row.status = 'active' window.$message.success($gettext('Started successfully')) }) }