移除未使用的网络代理设置用户名、密码设置

pull/1072/merge
lyswhut 2024-03-14 18:23:54 +08:00
parent 2c1b4acfcc
commit c8423c0b4f
8 changed files with 6 additions and 38 deletions

View File

@ -20,6 +20,10 @@
- 修复更新超时弹窗在非更新阶段意外弹出的问题(#1797
- 修复网络代理设置没有对自定义源的网络请求生效的问题(#1814
### 移除
- 移除未使用的网络代理设置用户名、密码设置,实际上在 v1.20.0 起这两个设置就没有在被内部使用
### 其他
- 更新 electron 到 v27.3.5

View File

@ -125,8 +125,6 @@ const defaultSetting: LX.AppSetting = {
'network.proxy.enable': false,
'network.proxy.host': '',
'network.proxy.port': '',
'network.proxy.username': '',
'network.proxy.password': '',
'tray.enable': false,
// 'tray.isToTray': false,

View File

@ -579,16 +579,6 @@ declare global {
*/
'network.proxy.port': string
/**
*
*/
'network.proxy.username': string
/**
*
*/
'network.proxy.password': string
/**
*
*/

View File

@ -117,8 +117,6 @@ export default (setting: any): Partial<LX.AppSetting> => {
setting['network.proxy.enable'] = setting.network?.proxy?.enable
setting['network.proxy.host'] = setting.network?.proxy?.host
setting['network.proxy.port'] = setting.network?.proxy?.port
setting['network.proxy.username'] = setting.network?.proxy?.username
setting['network.proxy.password'] = setting.network?.proxy?.password
setting['tray.enable'] = setting.tray?.enable
setting['tray.themeId'] = setting.tray?.themeId

View File

@ -20,8 +20,6 @@ export default () => {
proxy.enable = appSetting['network.proxy.enable']
proxy.host = appSetting['network.proxy.host']
proxy.port = appSetting['network.proxy.port']
proxy.username = appSetting['network.proxy.username']
proxy.password = appSetting['network.proxy.password']
isFullscreen.value = appSetting['common.startInFullscreen']
themeId.value = appSetting['theme.id']

View File

@ -106,12 +106,6 @@ export default () => {
watch(() => appSetting['network.proxy.port'], port => {
proxy.port = port
})
watch(() => appSetting['network.proxy.username'], username => {
proxy.username = username
})
watch(() => appSetting['network.proxy.password'], password => {
proxy.password = password
})
watch(() => appSetting['player.isShowTaskProgess'], val => {
if (val) return

View File

@ -11,8 +11,6 @@ export const proxy: {
enable: boolean
host: string
port: string
username: string
password: string
envProxy?: {
host: string
@ -22,8 +20,6 @@ export const proxy: {
enable: false,
host: '',
port: '',
username: '',
password: '',
}
export const sync: {
enable: boolean

View File

@ -6,11 +6,9 @@ dd
.p
base-checkbox(id="setting_network_proxy_enable" :model-value="appSetting['network.proxy.enable']" :label="$t('setting__is_enable')" @update:model-value="updateSetting({'network.proxy.enable': $event})")
.p
base-input.gap-left(:model-value="appSetting['network.proxy.host']" :placeholder="proxy.envProxy ? proxy.envProxy.host : $t('setting__network_proxy_host')" @update:model-value="setHost")
base-input.gap-left(:model-value="appSetting['network.proxy.port']" :placeholder="proxy.envProxy ? proxy.envProxy.port : $t('setting__network_proxy_port')" @update:model-value="setPort")
base-input(:model-value="appSetting['network.proxy.host']" :placeholder="proxy.envProxy ? proxy.envProxy.host : $t('setting__network_proxy_host')" @update:model-value="setHost")
.p
base-input.gap-left(:model-value="appSetting['network.proxy.username']" :placeholder="$t('setting__network_proxy_username')" @update:model-value="setUserName")
base-input.gap-left(:model-value="appSetting['network.proxy.password']" type="password" :placeholder="$t('setting__network_proxy_password')" @update:model-value="setPassword")
base-input(:model-value="appSetting['network.proxy.port']" :placeholder="proxy.envProxy ? proxy.envProxy.port : $t('setting__network_proxy_port')" @update:model-value="setPort")
</template>
@ -30,12 +28,6 @@ export default {
const setPort = debounce(port => {
updateSetting({ 'network.proxy.port': port.trim() })
}, 500)
const setUserName = debounce(username => {
updateSetting({ 'network.proxy.username': username.trim() })
}, 500)
const setPassword = debounce(password => {
updateSetting({ 'network.proxy.password': password.trim() })
}, 500)
onBeforeUnmount(() => {
if (appSetting['network.proxy.enable'] && !appSetting['network.proxy.host']) proxy.enable = false
@ -46,8 +38,6 @@ export default {
updateSetting,
setHost,
setPort,
setUserName,
setPassword,
proxy,
}
},