mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-05 23:56:42 +08:00
添加Github和PIP加速代理的显示处理逻辑:使用计算属性管理代理设置
This commit is contained in:
@@ -260,6 +260,26 @@ const pipMirrorsItems = [
|
|||||||
'https://mirrors.bfsu.edu.cn/pypi/web/simple', // 北京外国语大学
|
'https://mirrors.bfsu.edu.cn/pypi/web/simple', // 北京外国语大学
|
||||||
]
|
]
|
||||||
|
|
||||||
|
// Github加速代理显示处理
|
||||||
|
const githubProxyDisplay = computed({
|
||||||
|
get: () => {
|
||||||
|
return SystemSettings.value.Advanced.GITHUB_PROXY || null
|
||||||
|
},
|
||||||
|
set: val => {
|
||||||
|
SystemSettings.value.Advanced.GITHUB_PROXY = val === null ? '' : val
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
// PIP加速代理显示处理
|
||||||
|
const pipProxyDisplay = computed({
|
||||||
|
get: () => {
|
||||||
|
return SystemSettings.value.Advanced.PIP_PROXY || null
|
||||||
|
},
|
||||||
|
set: val => {
|
||||||
|
SystemSettings.value.Advanced.PIP_PROXY = val === null ? '' : val
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
// 日志等级
|
// 日志等级
|
||||||
const logLevelItems = [
|
const logLevelItems = [
|
||||||
{ title: 'DEBUG - 调试 ', value: 'DEBUG' },
|
{ title: 'DEBUG - 调试 ', value: 'DEBUG' },
|
||||||
@@ -694,22 +714,24 @@ onDeactivated(() => {
|
|||||||
<VRow>
|
<VRow>
|
||||||
<VCol cols="12" md="6">
|
<VCol cols="12" md="6">
|
||||||
<VCombobox
|
<VCombobox
|
||||||
v-model="SystemSettings.Advanced.GITHUB_PROXY"
|
v-model="githubProxyDisplay"
|
||||||
label="Github加速代理"
|
label="Github加速代理"
|
||||||
placeholder="http(s)://host/"
|
placeholder="留空表示不使用代理"
|
||||||
hint="使用代理加速Github访问速度"
|
hint="使用代理加速Github访问速度"
|
||||||
persistent-hint
|
persistent-hint
|
||||||
:items="githubMirrorsItems"
|
:items="githubMirrorsItems"
|
||||||
|
clearable
|
||||||
/>
|
/>
|
||||||
</VCol>
|
</VCol>
|
||||||
<VCol cols="12" md="6">
|
<VCol cols="12" md="6">
|
||||||
<VCombobox
|
<VCombobox
|
||||||
v-model="SystemSettings.Advanced.PIP_PROXY"
|
v-model="pipProxyDisplay"
|
||||||
label="PIP加速代理"
|
label="PIP加速代理"
|
||||||
placeholder="http(s)://host"
|
placeholder="留空表示不使用代理"
|
||||||
hint="使用代理加速插件等pip库安装速度"
|
hint="使用代理加速插件等pip库安装速度"
|
||||||
persistent-hint
|
persistent-hint
|
||||||
:items="pipMirrorsItems"
|
:items="pipMirrorsItems"
|
||||||
|
clearable
|
||||||
/>
|
/>
|
||||||
</VCol>
|
</VCol>
|
||||||
</VRow>
|
</VRow>
|
||||||
|
|||||||
Reference in New Issue
Block a user