diff --git a/src/views/settings/components/Inputs.vue b/src/views/settings/components/Inputs.vue index 2f582cd7..0e1bbc77 100644 --- a/src/views/settings/components/Inputs.vue +++ b/src/views/settings/components/Inputs.vue @@ -1,9 +1,9 @@ @@ -138,6 +155,13 @@ export default { editor: AceEditor }, props: { + customLabelWidth: { + type: String, + default: function() { + return this.labelWidth + }, + required: false + }, data: { type: Object || Array, default: function() { @@ -173,6 +197,21 @@ export default { this.processNestedData([value], this.settingGroup.key, this.setting.key, this.data[this.setting.key]) } }, + labelWidth() { + return this.isMobile ? '100px' : '240px' + }, + proxyUrlData() { + if (!this.data[this.setting.key]) { + return null + } else { + return typeof this.data[this.setting.key] === 'string' + ? this.data[this.setting.key] + : `${this.data[this.setting.key][1]}:${this.data[this.setting.key][2]}` + } + }, + proxyUrlTypeSocks5() { + return Array.isArray(this.data[this.setting.key]) && this.data[this.setting.key][0] === 'socks5' + }, prune() { return this.data[this.setting.key] === ':disabled' ? ':disabled' @@ -256,7 +295,8 @@ export default { (type.includes('list') && type.includes('string')) || (type.includes('list') && type.includes('atom')) || (type.includes('list') && type.includes('module')) || - (type.includes('module') && type.includes('atom')) + (type.includes('module') && type.includes('atom')) || + this.setting.key === ':args' ) }, toggleAtomTuple(value, tab, input) { diff --git a/src/views/settings/components/Upload.vue b/src/views/settings/components/Upload.vue index 776c9ed6..ffbbd865 100644 --- a/src/views/settings/components/Upload.vue +++ b/src/views/settings/components/Upload.vue @@ -1,141 +1,26 @@