mirror of
https://github.com/tnb-labs/panel.git
synced 2026-10-13 08:59:07 +08:00
fix(task): 任务窗口取消成功后提示,无任务时隐藏列表
- 取消任务成功后弹出取消成功提示 - 没有进行中的任务时不显示左侧列表和收起按钮,只留空状态 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -48,7 +48,10 @@ const handleCancel = async (item: QueueTask) => {
|
||||
title: $gettext('Cancel Task'),
|
||||
content: $gettext('Are you sure you want to cancel task %{ name }?', { name: item.name }),
|
||||
})
|
||||
if (ok) useRequest(task.cancel(item.id))
|
||||
if (!ok) return
|
||||
useRequest(task.cancel(item.id)).onSuccess(() => {
|
||||
window.$message.success($gettext('Canceled successfully'))
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -69,6 +72,7 @@ const handleCancel = async (item: QueueTask) => {
|
||||
</template>
|
||||
<n-layout has-sider class="h-full !bg-transparent">
|
||||
<n-layout-sider
|
||||
v-if="tasks.length"
|
||||
v-model:collapsed="collapsed"
|
||||
:width="200"
|
||||
:collapsed-width="16"
|
||||
|
||||
Reference in New Issue
Block a user