参考mower的conf配置
This commit is contained in:
parent
01c4bee95e
commit
3aad1fe8ff
11 changed files with 199 additions and 67 deletions
|
@ -1,23 +1,10 @@
|
|||
<script setup>
|
||||
import { useConfigStore } from '@/stores/config.js'
|
||||
|
||||
const conf = useConfigStore().config
|
||||
const branch = ref(null)
|
||||
const mirror = ref(null)
|
||||
|
||||
onMounted(() => {
|
||||
pywebview.api.get_branch().then((value) => {
|
||||
branch.value = value
|
||||
})
|
||||
pywebview.api.get_mirror().then((value) => {
|
||||
mirror.value = value
|
||||
})
|
||||
})
|
||||
|
||||
watch(branch, () => {
|
||||
pywebview.api.set_branch(branch.value)
|
||||
})
|
||||
watch(mirror, () => {
|
||||
pywebview.api.set_mirror(mirror.value)
|
||||
})
|
||||
|
||||
const steps = computed(() => [
|
||||
{
|
||||
title: '更新源码',
|
||||
|
@ -41,7 +28,7 @@ provide('current_state', current_state)
|
|||
<n-flex vertical style="gap: 16px; height: 100%; padding: 16px; box-sizing: border-box">
|
||||
<n-form label-placement="left" :show-feedback="false" label-width="auto" label-align="left">
|
||||
<n-form-item label="mower-ng 代码分支">
|
||||
<n-radio-group v-model:value="branch">
|
||||
<n-radio-group v-model:value="conf.branch">
|
||||
<n-flex>
|
||||
<n-radio value="fast">测试版</n-radio>
|
||||
<n-radio value="slow">稳定版</n-radio>
|
||||
|
@ -49,7 +36,7 @@ provide('current_state', current_state)
|
|||
</n-radio-group>
|
||||
</n-form-item>
|
||||
<n-form-item label="PyPI 仓库镜像">
|
||||
<n-radio-group v-model:value="mirror">
|
||||
<n-radio-group v-model:value="conf.mirror">
|
||||
<n-flex>
|
||||
<n-radio value="pypi">PyPI</n-radio>
|
||||
<n-radio value="aliyun">阿里云镜像站</n-radio>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue