feat: 再次移除UpdateType字段
This commit is contained in:
@@ -2,9 +2,8 @@
|
|||||||
import { QuestionCircleOutlined } from '@ant-design/icons-vue'
|
import { QuestionCircleOutlined } from '@ant-design/icons-vue'
|
||||||
import type { SettingsData } from '@/types/settings'
|
import type { SettingsData } from '@/types/settings'
|
||||||
|
|
||||||
const { settings, updateTypeOptions, updateSourceOptions, handleSettingChange, checkUpdate } = defineProps<{
|
const { settings, updateSourceOptions, handleSettingChange, checkUpdate } = defineProps<{
|
||||||
settings: SettingsData
|
settings: SettingsData
|
||||||
updateTypeOptions: { label: string; value: string }[]
|
|
||||||
updateSourceOptions: { label: string; value: string }[]
|
updateSourceOptions: { label: string; value: string }[]
|
||||||
handleSettingChange: (category: keyof SettingsData, key: string, value: any) => Promise<void>
|
handleSettingChange: (category: keyof SettingsData, key: string, value: any) => Promise<void>
|
||||||
checkUpdate: () => Promise<void>
|
checkUpdate: () => Promise<void>
|
||||||
@@ -25,7 +24,7 @@ const { settings, updateTypeOptions, updateSourceOptions, handleSettingChange, c
|
|||||||
</a-button>
|
</a-button>
|
||||||
</div>
|
</div>
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col :span="8">
|
<a-col :span="12">
|
||||||
<div class="form-item-vertical">
|
<div class="form-item-vertical">
|
||||||
<div class="form-label-wrapper">
|
<div class="form-label-wrapper">
|
||||||
<span class="form-label">自动检查更新</span>
|
<span class="form-label">自动检查更新</span>
|
||||||
@@ -44,24 +43,7 @@ const { settings, updateTypeOptions, updateSourceOptions, handleSettingChange, c
|
|||||||
</a-select>
|
</a-select>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="12">
|
||||||
<div class="form-item-vertical">
|
|
||||||
<div class="form-label-wrapper">
|
|
||||||
<span class="form-label">更新类型</span>
|
|
||||||
<a-tooltip title="选择版本更新类型">
|
|
||||||
<QuestionCircleOutlined class="help-icon" />
|
|
||||||
</a-tooltip>
|
|
||||||
</div>
|
|
||||||
<a-select
|
|
||||||
v-model:value="settings.Update.UpdateType"
|
|
||||||
@change="(value: any) => handleSettingChange('Update', 'UpdateType', value)"
|
|
||||||
:options="updateTypeOptions"
|
|
||||||
size="large"
|
|
||||||
style="width:100%"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="8">
|
|
||||||
<div class="form-item-vertical">
|
<div class="form-item-vertical">
|
||||||
<div class="form-label-wrapper">
|
<div class="form-label-wrapper">
|
||||||
<span class="form-label">更新源</span>
|
<span class="form-label">更新源</span>
|
||||||
|
|||||||
@@ -79,7 +79,6 @@ const settings = reactive<SettingsData>({
|
|||||||
Start: { IfSelfStart: false, IfMinimizeDirectly: false },
|
Start: { IfSelfStart: false, IfMinimizeDirectly: false },
|
||||||
Update: {
|
Update: {
|
||||||
IfAutoUpdate: false,
|
IfAutoUpdate: false,
|
||||||
UpdateType: 'stable',
|
|
||||||
Source: 'GitHub',
|
Source: 'GitHub',
|
||||||
ProxyAddress: '',
|
ProxyAddress: '',
|
||||||
MirrorChyanCDK: '',
|
MirrorChyanCDK: '',
|
||||||
@@ -104,11 +103,6 @@ const sendTaskResultTimeOptions = [
|
|||||||
{ label: '仅失败时', value: '仅失败时' },
|
{ label: '仅失败时', value: '仅失败时' },
|
||||||
]
|
]
|
||||||
|
|
||||||
const updateTypeOptions = [
|
|
||||||
{ label: '稳定版', value: 'stable' },
|
|
||||||
{ label: '测试版', value: 'beta' },
|
|
||||||
]
|
|
||||||
|
|
||||||
const updateSourceOptions = [
|
const updateSourceOptions = [
|
||||||
{ label: 'GitHub', value: 'GitHub' },
|
{ label: 'GitHub', value: 'GitHub' },
|
||||||
{ label: 'Mirror酱', value: 'MirrorChyan' },
|
{ label: 'Mirror酱', value: 'MirrorChyan' },
|
||||||
@@ -302,7 +296,6 @@ onMounted(() => {
|
|||||||
<a-tab-pane key="update" tab="更新设置">
|
<a-tab-pane key="update" tab="更新设置">
|
||||||
<TabUpdate
|
<TabUpdate
|
||||||
:settings="settings"
|
:settings="settings"
|
||||||
:update-type-options="updateTypeOptions"
|
|
||||||
:update-source-options="updateSourceOptions"
|
:update-source-options="updateSourceOptions"
|
||||||
:handle-setting-change="handleSettingChange"
|
:handle-setting-change="handleSettingChange"
|
||||||
:check-update="checkUpdate"
|
:check-update="checkUpdate"
|
||||||
|
|||||||
Reference in New Issue
Block a user