launcher/ui/src/pages/Init.vue

32 lines
827 B
Vue

<script setup>
const steps = ref([
{
title: '下载 git、python',
command: ['download_git', 'download_python']
},
{
title: '安装 pip',
command: ['ensurepip']
},
{
title: '下载 mower-ng 代码',
command: ['lfs', 'clone']
}
])
provide('steps', steps)
const current_step = ref(1)
provide('current_step', current_step)
const current_state = ref('wait')
provide('current_state', current_state)
</script>
<template>
<n-flex vertical style="gap: 16px; height: 100%; padding: 16px; box-sizing: border-box">
<n-alert title="以下步骤仅需运行一次" type="warning" />
<n-steps :current="current_step" :status="current_state" size="small">
<n-step v-for="step in steps" :title="step.title" />
</n-steps>
<log-component />
</n-flex>
<float-button />
</template>