Skip to content

Commit 3bb3c1a

Browse files
committed
Use proper InstallStage constants instead of strings
1 parent 43d21fe commit 3bb3c1a

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

src/components/server/ServerProgress.vue

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@
9595

9696
<script setup lang="ts">
9797
import {
98+
InstallStage,
9899
type InstallStageInfo,
99100
type InstallStageType,
100101
ProgressStatus
@@ -148,7 +149,8 @@ const currentStatusLabel = computed(() => {
148149
})
149150
150151
const isError = computed(
151-
() => props.status === ProgressStatus.ERROR || installStage.value === 'error'
152+
() =>
153+
props.status === ProgressStatus.ERROR || installStage.value === InstallStage.ERROR
152154
)
153155
154156
// Display properties for StartupDisplay component
@@ -159,13 +161,13 @@ const displayTitle = computed(() => {
159161
// Use the stage label as title if we're in an installation stage
160162
if (installStage.value && STAGE_METADATA[installStage.value]) {
161163
// For certain installation stages, use custom titles
162-
const installationStages = [
163-
'install_options_selection',
164-
'creating_directories',
165-
'initializing_config',
166-
'python_environment_setup',
167-
'installing_requirements',
168-
'migrating_custom_nodes'
164+
const installationStages: InstallStageType[] = [
165+
InstallStage.INSTALL_OPTIONS_SELECTION,
166+
InstallStage.CREATING_DIRECTORIES,
167+
InstallStage.INITIALIZING_CONFIG,
168+
InstallStage.PYTHON_ENVIRONMENT_SETUP,
169+
InstallStage.INSTALLING_REQUIREMENTS,
170+
InstallStage.MIGRATING_CUSTOM_NODES
169171
]
170172
if (installationStages.includes(installStage.value)) {
171173
return t('serverStart.installation.title')

0 commit comments

Comments
 (0)