From e2338757de7b91724c72ef154c288e77557cb200 Mon Sep 17 00:00:00 2001 From: thecodrr Date: Sun, 9 Jun 2019 22:07:09 -0700 Subject: [PATCH 1/7] refactor: merge magnet & thunder protocol handling --- src/main/core/ProtocolManager.js | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/src/main/core/ProtocolManager.js b/src/main/core/ProtocolManager.js index 2f7a10210..5cbe0d7db 100644 --- a/src/main/core/ProtocolManager.js +++ b/src/main/core/ProtocolManager.js @@ -41,13 +41,7 @@ export default class ProtocolManager extends EventEmitter { handle (url) { logger.info(`[Motrix] protocol url: ${url}`) - if (url.toLowerCase().startsWith('magnet:')) { - return this.handleMagnetProtocol(url) - } - - if (url.toLowerCase().startsWith('thunder:')) { - return this.handleThunderProtocol(url) - } + this.handleMagnetAndThunderProtocol(url) if ( url.toLowerCase().startsWith('mo:') || @@ -57,20 +51,21 @@ export default class ProtocolManager extends EventEmitter { } } - handleMagnetProtocol (url) { + handleMagnetAndThunderProtocol (url) { if (!url) { return } - logger.error(`[Motrix] handleMagnetProtocol url: ${url}`) - - global.application.sendCommandToAll('application:new-task', 'uri', url) - } + let protocolTag = ""; + + if (url.toLowerCase().startsWith('magnet:')) { + protocolTag = "handleMagnetProtocol"; + } - handleThunderProtocol (url) { - if (!url) { - return + if (url.toLowerCase().startsWith('thunder:')) { + protocolTag = "handleThunderProtocol"; } - logger.error(`[Motrix] handleThunderProtocol url: ${url}`) + + logger.error(`[Motrix] ${protocolTag} url: ${url}`) global.application.sendCommandToAll('application:new-task', 'uri', url) } From fdf0bb83208ca7047bec328667da4b3098ef2b4f Mon Sep 17 00:00:00 2001 From: thecodrr Date: Sun, 9 Jun 2019 22:53:21 -0700 Subject: [PATCH 2/7] refactor: move protocol settings to advanced menu --- src/renderer/components/Preference/Advanced.vue | 17 +++++++++++++++++ src/renderer/components/Preference/Lab.vue | 17 ----------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/renderer/components/Preference/Advanced.vue b/src/renderer/components/Preference/Advanced.vue index a90621e30..8660b46cc 100644 --- a/src/renderer/components/Preference/Advanced.vue +++ b/src/renderer/components/Preference/Advanced.vue @@ -25,6 +25,23 @@ + + {{ $t('preferences.protocols-default-client') }} + + + + + + + + + - - {{ $t('preferences.protocols-default-client') }} - - - - - - - - - From a0e7eb84ca7fc89aac9895a4169200e37bef31c0 Mon Sep 17 00:00:00 2001 From: thecodrr Date: Mon, 10 Jun 2019 00:03:10 -0700 Subject: [PATCH 3/7] feat: send setup-protocols-client command --- src/main/core/ProtocolManager.js | 8 ++++---- src/renderer/components/Preference/Advanced.vue | 17 ++++++++++++++--- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/main/core/ProtocolManager.js b/src/main/core/ProtocolManager.js index 5cbe0d7db..d0a5e2214 100644 --- a/src/main/core/ProtocolManager.js +++ b/src/main/core/ProtocolManager.js @@ -55,14 +55,14 @@ export default class ProtocolManager extends EventEmitter { if (!url) { return } - let protocolTag = ""; - + let protocolTag = '' + if (url.toLowerCase().startsWith('magnet:')) { - protocolTag = "handleMagnetProtocol"; + protocolTag = 'handleMagnetProtocol' } if (url.toLowerCase().startsWith('thunder:')) { - protocolTag = "handleThunderProtocol"; + protocolTag = 'handleThunderProtocol' } logger.error(`[Motrix] ${protocolTag} url: ${url}`) diff --git a/src/renderer/components/Preference/Advanced.vue b/src/renderer/components/Preference/Advanced.vue index 8660b46cc..e59620ed9 100644 --- a/src/renderer/components/Preference/Advanced.vue +++ b/src/renderer/components/Preference/Advanced.vue @@ -30,6 +30,7 @@ @@ -37,6 +38,7 @@ @@ -198,7 +200,8 @@ lastCheckUpdateTime, rpcSecret, useProxy, - userAgent + userAgent, + protocols } = config const result = { allProxy, @@ -209,7 +212,8 @@ lastCheckUpdateTime, rpcSecret, useProxy, - userAgent + userAgent, + protocols } return result } @@ -268,6 +272,12 @@ this.trackerSyncing = false }) }, + onUseMagnetProtocolChange (flag) { + this.form.protocols.magnet = flag + }, + onUseThunderProtocolChange (flag) { + this.form.protocols.thunder = flag + }, onUseProxyChange (flag) { this.form.allProxy = flag ? this.form.allProxyBackup : '' }, @@ -315,7 +325,7 @@ btTracker: convertLineToComma(this.form.btTracker) } console.log('changed====》', data) - + this.$store.dispatch('preference/save', data) .then(() => { this.$store.dispatch('app/fetchEngineOptions') @@ -326,6 +336,7 @@ }) if (this.isRenderer()) { + this.$electron.ipcRenderer.send('command', "application:setup-protocols-client", data.protocols) } }) }, From c8dcb1023fe80b67e8cca1d689362fc5d874d33a Mon Sep 17 00:00:00 2001 From: thecodrr Date: Mon, 10 Jun 2019 00:17:55 -0700 Subject: [PATCH 4/7] feat: handle setup-protocols-client command --- src/main/Application.js | 4 ++++ src/renderer/components/Preference/Advanced.vue | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/Application.js b/src/main/Application.js index 73b45facd..3215c4307 100644 --- a/src/main/Application.js +++ b/src/main/Application.js @@ -380,6 +380,10 @@ export default class Application extends EventEmitter { app.clearRecentDocuments() }) + this.on('application:setup-protocols-client', (protocols) => { + this.protocolManager.setup(protocols) + }) + this.on('help:official-website', () => { const url = 'https://motrix.app/' shell.openExternal(url) diff --git a/src/renderer/components/Preference/Advanced.vue b/src/renderer/components/Preference/Advanced.vue index e59620ed9..69f72aabd 100644 --- a/src/renderer/components/Preference/Advanced.vue +++ b/src/renderer/components/Preference/Advanced.vue @@ -336,7 +336,7 @@ }) if (this.isRenderer()) { - this.$electron.ipcRenderer.send('command', "application:setup-protocols-client", data.protocols) + this.$electron.ipcRenderer.send('command', 'application:setup-protocols-client', data.protocols) } }) }, From 1f805c3440cb0a3cdc94faa85c36b629092343d3 Mon Sep 17 00:00:00 2001 From: thecodrr Date: Mon, 10 Jun 2019 00:22:31 -0700 Subject: [PATCH 5/7] refactor: remove unused localized string --- src/shared/locales/de/preferences.js | 1 - src/shared/locales/en-US/preferences.js | 1 - src/shared/locales/fa/preferences.js | 1 - src/shared/locales/fr/preferences.js | 1 - src/shared/locales/ja/preferences.js | 1 - src/shared/locales/ko/preferences.js | 1 - src/shared/locales/pt-BR/preferences.js | 1 - src/shared/locales/tr/preferences.js | 1 - src/shared/locales/zh-CN/preferences.js | 1 - src/shared/locales/zh-TW/preferences.js | 1 - 10 files changed, 10 deletions(-) diff --git a/src/shared/locales/de/preferences.js b/src/shared/locales/de/preferences.js index bbd902542..6d8d1a894 100644 --- a/src/shared/locales/de/preferences.js +++ b/src/shared/locales/de/preferences.js @@ -48,7 +48,6 @@ export default { 'factory-reset-confirm': 'Sollen die Einstellungen auf die Werkseinstellungen unwiderruflich zurückgesetzt werden?', 'lab-warning': '⚠️ Die Aktivierung von experimentellen Funktionen kann zu App-Abstürzen oder Datenverlust führen!', 'download-protocol': 'Protokoll', - 'support-more-download-protocols': 'Erweiterte Protokollunterstützung aktivieren', 'browser-extensions': 'Erweiterungen', 'baidu-exporter': 'Baidu Exporter', 'browser-extensions-tips': 'Von der Community bereitgestellt, ', diff --git a/src/shared/locales/en-US/preferences.js b/src/shared/locales/en-US/preferences.js index c5d9b1588..421edd4dc 100644 --- a/src/shared/locales/en-US/preferences.js +++ b/src/shared/locales/en-US/preferences.js @@ -48,7 +48,6 @@ export default { 'factory-reset-confirm': 'Are you sure you want to revert to factory settings?', '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:// ]', diff --git a/src/shared/locales/fa/preferences.js b/src/shared/locales/fa/preferences.js index d9ddaf394..6a1cc4fa6 100644 --- a/src/shared/locales/fa/preferences.js +++ b/src/shared/locales/fa/preferences.js @@ -48,7 +48,6 @@ export default { 'factory-reset-confirm': 'آیا شما مطمئن هستید؟', 'lab-warning': '⚠️ فعالسازی امکانات آزمایشگاه ممکن است باعث کرش برنامه یا از دست دادن دیتا بشود، خودتون تصمیم بگیرین!', 'download-protocol': 'پروتکل', - 'support-more-download-protocols': 'فعالسازی حمایت از پروتکل‌های دانلود بیشتر', 'browser-extensions': 'افزونه‌ها', 'baidu-exporter': 'BaiduExporter', 'browser-extensions-tips': 'تهیه شده توسط انجمن، ', diff --git a/src/shared/locales/fr/preferences.js b/src/shared/locales/fr/preferences.js index 3599cb8b5..05c3e9c31 100644 --- a/src/shared/locales/fr/preferences.js +++ b/src/shared/locales/fr/preferences.js @@ -48,7 +48,6 @@ export default { 'factory-reset-confirm': 'Êtes vous sûr de vouloir réinitialiser les paramètres', 'lab-warning': '⚠️ Activer les fonctionalités labo peut causer des crash ou la perte de données !', 'download-protocol': 'Protocole', - 'support-more-download-protocols': 'Activer les protocoles de téléchargement suplémentaires', 'browser-extensions': 'Extensions', 'baidu-exporter': 'BaiduExporter', 'browser-extensions-tips': 'Fourni par la communauté, ', diff --git a/src/shared/locales/ja/preferences.js b/src/shared/locales/ja/preferences.js index 694a8016a..1d348db59 100644 --- a/src/shared/locales/ja/preferences.js +++ b/src/shared/locales/ja/preferences.js @@ -48,7 +48,6 @@ export default { 'factory-reset-confirm': '本当に初期設定に戻しますか?', 'lab-warning': '⚠️ベータ機能をオンにするとアプリケーションの強制終了やデータが損失する可能性があります。自己責任でお願いします。', 'download-protocol': 'プロトコル', - 'support-more-download-protocols': 'より多くのプロトコルを適用', 'browser-extensions': 'ブラウザ拡張機能', 'baidu-exporter': 'バイドゥオンラインストレージ拡張機能', 'browser-extensions-tips': '他のユーザによって作成されたものです。動作は保証できません。', diff --git a/src/shared/locales/ko/preferences.js b/src/shared/locales/ko/preferences.js index 35f9f1d93..25f854a91 100644 --- a/src/shared/locales/ko/preferences.js +++ b/src/shared/locales/ko/preferences.js @@ -48,7 +48,6 @@ export default { 'factory-reset-confirm': '초기 설정으로 되돌리시겠습니까?', 'lab-warning': '⚠️ 실험실 기능을 활성화하면 앱 충돌이나 데이터 손실을 초래할 수 있으므로 직접 결정하십시오!', 'download-protocol': '프로토콜', - 'support-more-download-protocols': '더 많은 다운로드 프로토콜 지원 허용', 'browser-extensions': '확장 프로그램', 'baidu-exporter': 'BaiduExporter', 'browser-extensions-tips': '커뮤니티에서 제공하는, ', diff --git a/src/shared/locales/pt-BR/preferences.js b/src/shared/locales/pt-BR/preferences.js index d693bec2b..b656f737e 100644 --- a/src/shared/locales/pt-BR/preferences.js +++ b/src/shared/locales/pt-BR/preferences.js @@ -48,7 +48,6 @@ export default { 'factory-reset-confirm': 'Você tem certeza de que deseja resetar às configurações de fábrica?', 'lab-warning': '⚠️ Habilitar os recursos de lab pode causar perda de dados e fechar o app inesperadamete. Use por sua conta e risco!', 'download-protocol': 'Protocolo', - 'support-more-download-protocols': 'Habilitar suporte a mais protocolos de download', 'browser-extensions': 'Extensões', 'baidu-exporter': 'BaiduExporter', 'browser-extensions-tips': 'Fornecido pela comunidade, ', diff --git a/src/shared/locales/tr/preferences.js b/src/shared/locales/tr/preferences.js index 040d4ce7b..d93cd762e 100644 --- a/src/shared/locales/tr/preferences.js +++ b/src/shared/locales/tr/preferences.js @@ -48,7 +48,6 @@ export default { 'factory-reset-confirm': 'Fabrika ayarlarına geri dönmek istediğinize emin misiniz?', 'lab-warning': '⚠️ Deneysel özellikleri etkinleştirmek uygulamanın çökmesine veya veri kaybına neden olabilir, kendiniz karar verin!', 'download-protocol': 'Protokol', - 'support-more-download-protocols': 'Daha fazla indirme protokolü desteğini etkinleştir', 'browser-extensions': 'Eklentiler', 'baidu-exporter': 'BaiduExporter', 'browser-extensions-tips': 'Topluluk tarafından sağlanan, ', diff --git a/src/shared/locales/zh-CN/preferences.js b/src/shared/locales/zh-CN/preferences.js index df99d5423..3c7ff2448 100644 --- a/src/shared/locales/zh-CN/preferences.js +++ b/src/shared/locales/zh-CN/preferences.js @@ -48,7 +48,6 @@ export default { 'factory-reset-confirm': '你确定要恢复为初始设置吗?', 'lab-warning': '⚠️启用实验特性可能造成应用崩溃或数据丢失,请自行决定!', 'download-protocol': '下载协议', - 'support-more-download-protocols': '支持更多下载协议', 'protocols-default-client': '设置为以下协议的默认客户端', 'protocols-magnet': '磁力链接 [ magnet:// ]', 'protocols-thunder': '迅雷链接 [ thunder:// ]', diff --git a/src/shared/locales/zh-TW/preferences.js b/src/shared/locales/zh-TW/preferences.js index 1840c1422..e03aa919f 100644 --- a/src/shared/locales/zh-TW/preferences.js +++ b/src/shared/locales/zh-TW/preferences.js @@ -48,7 +48,6 @@ export default { 'factory-reset-confirm': '您確定要還原為出廠預設值嗎?', 'lab-warning': '⚠️開啟實驗性功能可能會造成程式當機或資料遺失,請自己決定!', 'download-protocol': '下載協定', - 'support-more-download-protocols': '支援更多下載協定', 'browser-extensions': '瀏覽器擴充功能', 'baidu-exporter': '百度網盤助手', 'browser-extensions-tips': '社群提供的瀏覽器擴充功能「不保證可用性」,', From 678bed53dc42e38a03f854e813ccfd2db744b168 Mon Sep 17 00:00:00 2001 From: thecodrr Date: Mon, 10 Jun 2019 00:49:33 -0700 Subject: [PATCH 6/7] feat: add localization for protocol settings --- src/shared/locales/de/preferences.js | 3 +++ src/shared/locales/fa/preferences.js | 3 +++ src/shared/locales/fr/preferences.js | 3 +++ src/shared/locales/ja/preferences.js | 3 +++ src/shared/locales/ko/preferences.js | 3 +++ src/shared/locales/pt-BR/preferences.js | 3 +++ src/shared/locales/tr/preferences.js | 3 +++ src/shared/locales/zh-TW/preferences.js | 3 +++ 8 files changed, 24 insertions(+) diff --git a/src/shared/locales/de/preferences.js b/src/shared/locales/de/preferences.js index 6d8d1a894..c2d9beda7 100644 --- a/src/shared/locales/de/preferences.js +++ b/src/shared/locales/de/preferences.js @@ -48,6 +48,9 @@ export default { 'factory-reset-confirm': 'Sollen die Einstellungen auf die Werkseinstellungen unwiderruflich zurückgesetzt werden?', 'lab-warning': '⚠️ Die Aktivierung von experimentellen Funktionen kann zu App-Abstürzen oder Datenverlust führen!', 'download-protocol': 'Protokoll', + 'protocols-default-client': 'Als Standardclient für die folgenden Protokolle festlegen', + 'protocols-magnet': 'Magnet [ magnet:// ]', + 'protocols-thunder': 'Donner [ thunder:// ]', 'browser-extensions': 'Erweiterungen', 'baidu-exporter': 'Baidu Exporter', 'browser-extensions-tips': 'Von der Community bereitgestellt, ', diff --git a/src/shared/locales/fa/preferences.js b/src/shared/locales/fa/preferences.js index 6a1cc4fa6..456f7f724 100644 --- a/src/shared/locales/fa/preferences.js +++ b/src/shared/locales/fa/preferences.js @@ -48,6 +48,9 @@ export default { 'factory-reset-confirm': 'آیا شما مطمئن هستید؟', 'lab-warning': '⚠️ فعالسازی امکانات آزمایشگاه ممکن است باعث کرش برنامه یا از دست دادن دیتا بشود، خودتون تصمیم بگیرین!', 'download-protocol': 'پروتکل', + 'protocols-default-client': 'به عنوان مشتری پیش فرض برای پروتکل های زیر تنظیم شده است', + 'protocols-magnet': 'آهن ربا [ magnet:// ]', + 'protocols-thunder': 'تندر [ thunder:// ]', 'browser-extensions': 'افزونه‌ها', 'baidu-exporter': 'BaiduExporter', 'browser-extensions-tips': 'تهیه شده توسط انجمن، ', diff --git a/src/shared/locales/fr/preferences.js b/src/shared/locales/fr/preferences.js index 05c3e9c31..e9157d2f3 100644 --- a/src/shared/locales/fr/preferences.js +++ b/src/shared/locales/fr/preferences.js @@ -48,6 +48,9 @@ export default { 'factory-reset-confirm': 'Êtes vous sûr de vouloir réinitialiser les paramètres', 'lab-warning': '⚠️ Activer les fonctionalités labo peut causer des crash ou la perte de données !', 'download-protocol': 'Protocole', + 'protocols-default-client': 'Définir comme client par défaut pour les protocoles suivants', + 'protocols-magnet': 'Aimant [ magnet:// ]', + 'protocols-thunder': 'Tonnerre [ thunder:// ]', 'browser-extensions': 'Extensions', 'baidu-exporter': 'BaiduExporter', 'browser-extensions-tips': 'Fourni par la communauté, ', diff --git a/src/shared/locales/ja/preferences.js b/src/shared/locales/ja/preferences.js index 1d348db59..c8ad3022e 100644 --- a/src/shared/locales/ja/preferences.js +++ b/src/shared/locales/ja/preferences.js @@ -48,6 +48,9 @@ export default { 'factory-reset-confirm': '本当に初期設定に戻しますか?', 'lab-warning': '⚠️ベータ機能をオンにするとアプリケーションの強制終了やデータが損失する可能性があります。自己責任でお願いします。', 'download-protocol': 'プロトコル', + 'protocols-default-client': '以下のプロトコルのデフォルトクライアントとして設定', + 'protocols-magnet': '磁石 [ magnet:// ]', + 'protocols-thunder': 'サンダー [ thunder:// ]', 'browser-extensions': 'ブラウザ拡張機能', 'baidu-exporter': 'バイドゥオンラインストレージ拡張機能', 'browser-extensions-tips': '他のユーザによって作成されたものです。動作は保証できません。', diff --git a/src/shared/locales/ko/preferences.js b/src/shared/locales/ko/preferences.js index 25f854a91..71a9c0aed 100644 --- a/src/shared/locales/ko/preferences.js +++ b/src/shared/locales/ko/preferences.js @@ -48,6 +48,9 @@ export default { 'factory-reset-confirm': '초기 설정으로 되돌리시겠습니까?', 'lab-warning': '⚠️ 실험실 기능을 활성화하면 앱 충돌이나 데이터 손실을 초래할 수 있으므로 직접 결정하십시오!', 'download-protocol': '프로토콜', + 'protocols-default-client': '다음 프로토콜의 기본 클라이언트로 설정', + 'protocols-magnet': '자석 [ magnet:// ]', + 'protocols-thunder': '우뢰 [ thunder:// ]', 'browser-extensions': '확장 프로그램', 'baidu-exporter': 'BaiduExporter', 'browser-extensions-tips': '커뮤니티에서 제공하는, ', diff --git a/src/shared/locales/pt-BR/preferences.js b/src/shared/locales/pt-BR/preferences.js index b656f737e..ba2055487 100644 --- a/src/shared/locales/pt-BR/preferences.js +++ b/src/shared/locales/pt-BR/preferences.js @@ -48,6 +48,9 @@ export default { 'factory-reset-confirm': 'Você tem certeza de que deseja resetar às configurações de fábrica?', 'lab-warning': '⚠️ Habilitar os recursos de lab pode causar perda de dados e fechar o app inesperadamete. Use por sua conta e risco!', 'download-protocol': 'Protocolo', + 'protocols-default-client': 'Definir como cliente padrão para os seguintes protocolos', + 'protocols-magnet': 'Magnético [ magnet:// ]', + 'protocols-thunder': 'Trovão [ thunder:// ]', 'browser-extensions': 'Extensões', 'baidu-exporter': 'BaiduExporter', 'browser-extensions-tips': 'Fornecido pela comunidade, ', diff --git a/src/shared/locales/tr/preferences.js b/src/shared/locales/tr/preferences.js index d93cd762e..1dfae9cdc 100644 --- a/src/shared/locales/tr/preferences.js +++ b/src/shared/locales/tr/preferences.js @@ -48,6 +48,9 @@ export default { 'factory-reset-confirm': 'Fabrika ayarlarına geri dönmek istediğinize emin misiniz?', 'lab-warning': '⚠️ Deneysel özellikleri etkinleştirmek uygulamanın çökmesine veya veri kaybına neden olabilir, kendiniz karar verin!', 'download-protocol': 'Protokol', + 'protocols-default-client': 'Aşağıdaki protokoller için varsayılan istemci olarak ayarla', + 'protocols-magnet': 'Mıknatıs [ magnet:// ]', + 'protocols-thunder': 'gök gürültüsü [ thunder:// ]', 'browser-extensions': 'Eklentiler', 'baidu-exporter': 'BaiduExporter', 'browser-extensions-tips': 'Topluluk tarafından sağlanan, ', diff --git a/src/shared/locales/zh-TW/preferences.js b/src/shared/locales/zh-TW/preferences.js index e03aa919f..6e511fc5c 100644 --- a/src/shared/locales/zh-TW/preferences.js +++ b/src/shared/locales/zh-TW/preferences.js @@ -48,6 +48,9 @@ export default { 'factory-reset-confirm': '您確定要還原為出廠預設值嗎?', 'lab-warning': '⚠️開啟實驗性功能可能會造成程式當機或資料遺失,請自己決定!', 'download-protocol': '下載協定', + 'protocols-default-client': '設置為以下協議的默認客戶端', + 'protocols-magnet': '磁鐵 [ magnet:// ]', + 'protocols-thunder': '雷 [ thunder:// ]', 'browser-extensions': '瀏覽器擴充功能', 'baidu-exporter': '百度網盤助手', 'browser-extensions-tips': '社群提供的瀏覽器擴充功能「不保證可用性」,', From cdac88371c26c277e7cf3b6949a7230d798ea988 Mon Sep 17 00:00:00 2001 From: thecodrr Date: Mon, 10 Jun 2019 00:52:30 -0700 Subject: [PATCH 7/7] refactor: remove change handlers --- src/renderer/components/Preference/Advanced.vue | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/renderer/components/Preference/Advanced.vue b/src/renderer/components/Preference/Advanced.vue index 69f72aabd..6a86712e9 100644 --- a/src/renderer/components/Preference/Advanced.vue +++ b/src/renderer/components/Preference/Advanced.vue @@ -30,7 +30,6 @@ @@ -38,7 +37,6 @@ @@ -272,12 +270,6 @@ this.trackerSyncing = false }) }, - onUseMagnetProtocolChange (flag) { - this.form.protocols.magnet = flag - }, - onUseThunderProtocolChange (flag) { - this.form.protocols.thunder = flag - }, onUseProxyChange (flag) { this.form.allProxy = flag ? this.form.allProxyBackup : '' },