From 3c5aaac57622f70b4d083cc983c7387fc06004f5 Mon Sep 17 00:00:00 2001 From: fiftin-quiz <157730881+fiftin-quiz@users.noreply.github.com> Date: Tue, 30 Jan 2024 17:47:03 +0500 Subject: [PATCH] feat: add confirmation state --- lib/Logger.go | 16 +++++++++------- web/src/components/TaskStatus.vue | 2 ++ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/lib/Logger.go b/lib/Logger.go index 73b6cc36..1322c374 100644 --- a/lib/Logger.go +++ b/lib/Logger.go @@ -8,13 +8,15 @@ import ( type TaskStatus string const ( - TaskWaitingStatus TaskStatus = "waiting" - TaskStartingStatus TaskStatus = "starting" - TaskRunningStatus TaskStatus = "running" - TaskStoppingStatus TaskStatus = "stopping" - TaskStoppedStatus TaskStatus = "stopped" - TaskSuccessStatus TaskStatus = "success" - TaskFailStatus TaskStatus = "error" + TaskWaitingStatus TaskStatus = "waiting" + TaskStartingStatus TaskStatus = "starting" + TaskWaitingConfirmation TaskStatus = "waiting_confirmation" + TaskConfirmed TaskStatus = "confirmed" + TaskRunningStatus TaskStatus = "running" + TaskStoppingStatus TaskStatus = "stopping" + TaskStoppedStatus TaskStatus = "stopped" + TaskSuccessStatus TaskStatus = "success" + TaskFailStatus TaskStatus = "error" ) func (s TaskStatus) IsFinished() bool { diff --git a/web/src/components/TaskStatus.vue b/web/src/components/TaskStatus.vue index 78fa69c0..e3062eee 100644 --- a/web/src/components/TaskStatus.vue +++ b/web/src/components/TaskStatus.vue @@ -11,6 +11,8 @@ import IndeterminateProgressCircular from '@/components/IndeterminateProgressCir const TaskStatus = Object.freeze({ WAITING: 'waiting', STARTING: 'starting', + WAITING_CONFIRMATION: 'waiting_confirmation', + CONFIRMED: 'confirmed', RUNNING: 'running', SUCCESS: 'success', ERROR: 'error',