Skip to content

Commit

Permalink
refactor: preferences lab protocol client settings
Browse files Browse the repository at this point in the history
  • Loading branch information
agalwood committed Jun 10, 2019
1 parent fddaa72 commit c0cbfb5
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/renderer/components/Preference/Lab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,18 @@
</div>
</el-form-item>
<el-form-item :label="`${$t('preferences.download-protocol')}: `" :label-width="formLabelWidth">
{{ $t('preferences.protocols-default-client') }}
<el-col class="form-item-sub" :span="24">
<el-switch
v-model="form.enableEggFeatures"
:active-text="$t('preferences.support-more-download-protocols')"
v-model="form.protocols.magnet"
:active-text="$t('preferences.protocols-magnet')"
>
</el-switch>
</el-col>
<el-col class="form-item-sub" :span="24">
<el-switch
v-model="form.protocols.thunder"
:active-text="$t('preferences.protocols-thunder')"
>
</el-switch>
</el-col>
Expand Down Expand Up @@ -58,10 +66,10 @@
const initialForm = (config) => {
const {
enableEggFeatures
protocols
} = config
const result = {
enableEggFeatures
protocols
}
return result
}
Expand Down
3 changes: 3 additions & 0 deletions src/shared/locales/en-US/preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ export default {
'lab-warning': '⚠️ Enabling lab features may result in app crash or data loss, decide at you own risk!',
'download-protocol': 'Protocols',
'support-more-download-protocols': 'Enable support for more download protocols',
'protocols-default-client': 'Set as the default client for the following protocols',
'protocols-magnet': 'Magnet [ magnet:// ]',
'protocols-thunder': 'Thunder [ thunder:// ]',
'browser-extensions': 'Extensions',
'baidu-exporter': 'BaiduExporter',
'browser-extensions-tips': 'Provided by the community, ',
Expand Down
3 changes: 3 additions & 0 deletions src/shared/locales/zh-CN/preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ export default {
'lab-warning': '⚠️启用实验特性可能造成应用崩溃或数据丢失,请自行决定!',
'download-protocol': '下载协议',
'support-more-download-protocols': '支持更多下载协议',
'protocols-default-client': '设置为以下协议的默认客户端',
'protocols-magnet': '磁力链接 [ magnet:// ]',
'protocols-thunder': '迅雷链接 [ thunder:// ]',
'browser-extensions': '浏览器扩展',
'baidu-exporter': '百度网盘助手',
'browser-extensions-tips': '社区提供的浏览器扩展「不保证可用性」,',
Expand Down

0 comments on commit c0cbfb5

Please sign in to comment.