Compare commits
156 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1a2de2ad88 | |||
| e44587035d | |||
| 43f1adcd84 | |||
| 8a900459b5 | |||
| d2f8a4599d | |||
| 9159fb36ab | |||
| 5be05395f5 | |||
| fba76df945 | |||
| 5bb4f259cd | |||
| 4b093a1a4f | |||
| 134d81b205 | |||
| d5fc962bca | |||
| 0d1b76d523 | |||
| 6499ce91b8 | |||
| 2d7907f218 | |||
| 97c1cb0418 | |||
| be585ef102 | |||
| 03002221e7 | |||
| 4b8de781a4 | |||
| 8224423d8c | |||
| 1e05e1e4f3 | |||
| bfd1e1b6fa | |||
| 79495cbde5 | |||
| a93d183988 | |||
| cf082b20d8 | |||
| 8110409402 | |||
| 37b446b6f0 | |||
| 97801fff32 | |||
| 4ca4f5e606 | |||
| e9caf1b0b4 | |||
| d67dca00b5 | |||
| 038536259e | |||
| ec21cc57bc | |||
| 5a42e4014b | |||
| 02d4032283 | |||
| d676dbe213 | |||
| 02d83534d1 | |||
| 8b531c76b8 | |||
| 22f92df299 | |||
| eaf91e15e8 | |||
| 4535cb706a | |||
| a093f3beca | |||
| 287c9038b1 | |||
| 72aac9c0c6 | |||
| cdac88371c | |||
| 678bed53dc | |||
| 1f805c3440 | |||
| c8dcb1023f | |||
| a0e7eb84ca | |||
| fdf0bb8320 | |||
| e2338757de | |||
| c0cbfb5cb2 | |||
| fddaa72ac6 | |||
| 1e531f166b | |||
| 97f54adc49 | |||
| e6548d5548 | |||
| 137fdf2b26 | |||
| 10ef4f7318 | |||
| bdd5e56c2a | |||
| a851ec5830 | |||
| 2ae3642c62 | |||
| 7b41a9e1c6 | |||
| 012e5ece00 | |||
| db8d3d1aec | |||
| 8e35dde082 | |||
| 5c2acf12ee | |||
| e710ccdb34 | |||
| 5ecc08d66d | |||
| e7b1a898fa | |||
| 93acf1ba63 | |||
| 1164df87e3 | |||
| 71232603a5 | |||
| 286013b2f0 | |||
| a5f0236661 | |||
| 87857eba94 | |||
| 3059d1a0b7 | |||
| 5029f98153 | |||
| ce80af7ead | |||
| 6df52988b0 | |||
| 6359c729ad | |||
| 04db94daa6 | |||
| d41d809f00 | |||
| efdfae37b5 | |||
| 1a097c02e3 | |||
| 0217b5573a | |||
| 86611604d5 | |||
| 0bd8ab3d11 | |||
| e9eadb2eba | |||
| 72afd845ba | |||
| 91670fac37 | |||
| bc14e5b287 | |||
| 2d01431e7d | |||
| 81531ef9fc | |||
| 04126363ca | |||
| bcb07656b9 | |||
| b9cd991fd5 | |||
| 1b2b22f039 | |||
| 170a481d48 | |||
| 48bf7c9e2e | |||
| 03cfb013e5 | |||
| b4e23d8805 | |||
| 43965c5740 | |||
| 5c8d2e4ca4 | |||
| b51c144ace | |||
| feb839b7fa | |||
| fa36397afa | |||
| 583fe0ffe2 | |||
| 8b3a5fbaa8 | |||
| 85493c263b | |||
| 78e106abe4 | |||
| bbf90e9344 | |||
| dc30c25a83 | |||
| e1cce4f50c | |||
| 61654ff0ff | |||
| 0142aedfa5 | |||
| 323f85ca40 | |||
| f35e696c6a | |||
| d49cbcdc00 | |||
| c85ac4e895 | |||
| f831cc51ed | |||
| d47eb9ba0f | |||
| 119a374db6 | |||
| d26808e43a | |||
| 8cb3e54be2 | |||
| c55902cda7 | |||
| 426b54201b | |||
| 6c032cde2d | |||
| eb42ac6cfd | |||
| 90f0a7c5f6 | |||
| 9b61dad2c3 | |||
| 671fb82e6a | |||
| b8f444ca4d | |||
| 7509442e4e | |||
| ee2e3de782 | |||
| c6dd1e333e | |||
| fba761a29c | |||
| 4fb94ae8bb | |||
| 79721822c2 | |||
| 556f58f6b3 | |||
| e690f15335 | |||
| 1876587973 | |||
| b89c651132 | |||
| ad9d3ed15a | |||
| 6aa362332a | |||
| 18d107c062 | |||
| ebeba4663c | |||
| 9bff4257a8 | |||
| e07ef7dd11 | |||
| ebb0926d1d | |||
| 5333438825 | |||
| 3664341822 | |||
| d3cbff6dd1 | |||
| 5668b0773d | |||
| b757112c30 | |||
| dc3a01fb3c | |||
| 591de11072 |
@@ -11,6 +11,7 @@ assignees: ''
|
||||
Before you feedback, please search for the issues to see if there are similar problems that can solve your problem.
|
||||
|
||||
**Please delete the above and the contents of this line, then fill in the feedback form in the following format, Thanks.**
|
||||
<!-- Windows and Linux versions hide the application menu by default. Please close the "Hide Menu Bar" in Preferences - Advanced Settings - Appearance. After saving and applying, the menu bar will appear. -->
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
@@ -6,12 +6,14 @@ labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
**反馈之前**
|
||||
|
||||
<!--
|
||||
反馈之前请搜索一下已有 issues 和 帮助文档,看是否有类似问题可以解决你的问题
|
||||
https://github.com/agalwood/Motrix/issues
|
||||
http://motrix.app/support
|
||||
|
||||
**请删除上面和本行的内容,然后按以下格式填写反馈信息,谢谢**
|
||||
按以下格式填写反馈信息,谢谢
|
||||
-->
|
||||
|
||||
**错误描述**
|
||||
清楚简洁地描述错误,方便我们复现之后处理。
|
||||
@@ -24,11 +26,12 @@ http://motrix.app/support
|
||||
4. 发现报错
|
||||
|
||||
**预期的行为**
|
||||
清楚简洁地描述您期望发生的事情。
|
||||
清楚简洁地描述你期望发生的事情。
|
||||
|
||||
**截图**
|
||||
请添加屏幕截图以帮助解释您的问题:
|
||||
请添加屏幕截图以帮助解释你的问题:
|
||||
打开应用菜单中的「帮助」——「开发者工具」—— 切换到 console,然后**完整**截图。
|
||||
<!-- Windows 和 Linux 版本默认隐藏了应用菜单,请到偏好设置-进阶设置-外观里关闭“隐藏菜单栏”,保存并应用之后菜单栏就出现了 -->
|
||||
|
||||
**运行环境**
|
||||
- 操作系统类型: [如 macOS, Windows, Linux]
|
||||
@@ -37,4 +40,4 @@ http://motrix.app/support
|
||||
- 安装包类型:[如 dmg, AppImage]
|
||||
|
||||
**更多信息**
|
||||
添加有关此问题的任何其他上下文信息。
|
||||
补充有关该问题的其他信息。
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
---
|
||||
name: 新功能请求
|
||||
about: 你期望 Motrix 未来添加的新功能
|
||||
title: ''
|
||||
labels: enhancement ✨
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
<!--
|
||||
反馈之前请搜索一下已有 issues 和 帮助文档,看是否已经有人提交了类似的新功能请求
|
||||
https://github.com/agalwood/Motrix/issues
|
||||
http://motrix.app/support
|
||||
|
||||
按以下格式填写反馈信息,谢谢
|
||||
-->
|
||||
|
||||
**请描述一下你的新功能请求是否与已知问题有关?**
|
||||
简明扼要地描述了问题所在。
|
||||
|
||||
**描述你想要的解决方案**
|
||||
简明扼要地描述你想要的解决方案。
|
||||
|
||||
**描述你考虑过的替代方案**
|
||||
简明扼要地描述你考虑过的任何替代解决方案或功能。
|
||||
|
||||
**更多信息**
|
||||
补充有关该新功能的其他信息。
|
||||
@@ -0,0 +1,76 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as
|
||||
contributors and maintainers pledge to making participation in our project and
|
||||
our community a harassment-free experience for everyone, regardless of age, body
|
||||
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
||||
level of experience, education, socio-economic status, nationality, personal
|
||||
appearance, race, religion, or sexual identity and orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment
|
||||
include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or
|
||||
advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic
|
||||
address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable
|
||||
behavior and are expected to take appropriate and fair corrective action in
|
||||
response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or
|
||||
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||
permanently any contributor for other behaviors that they deem inappropriate,
|
||||
threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces
|
||||
when an individual is representing the project or its community. Examples of
|
||||
representing a project or community include using an official project e-mail
|
||||
address, posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event. Representation of a project may be
|
||||
further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported by contacting the project team at agalwood.net@gmail.com. All
|
||||
complaints will be reviewed and investigated and will result in a response that
|
||||
is deemed necessary and appropriate to the circumstances. The project team is
|
||||
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||
Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||
faith may face temporary or permanent repercussions as determined by other
|
||||
members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
||||
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
|
||||
For answers to common questions about this code of conduct, see
|
||||
https://www.contributor-covenant.org/faq
|
||||
@@ -20,9 +20,20 @@ Motrix 是一款全能的下载工具,支持下载 HTTP、FTP、BT、磁力链
|
||||
|
||||
[GitHub](https://github.com/agalwood/Motrix/releases) 和 [官网](https://motrix.app/zh-CN) 提供了已经编译好的稳定版安装包,当然你也可以自己克隆代码编译打包。
|
||||
|
||||
### Windows
|
||||
|
||||
建议使用安装包(Motrix-Setup-x.y.z.exe)安装 Motrix 以确保完整的体验,例如关联 torrent 文件,捕获磁力链等。
|
||||
|
||||
如果你更喜欢便携版,你可以使用 [scoop](https://github.com/lukesampson/scoop)(需要 Windows 7+,天朝用户可能需要设置 Git 代理)安装最新便携版本的 Motrix。
|
||||
|
||||
```bash
|
||||
scoop bucket add extras
|
||||
scoop install motrix
|
||||
```
|
||||
|
||||
### macOS
|
||||
|
||||
更新:macOS 用户支持 `brew cask` 安装,感谢 [Mitscherlich](https://github.com/Mitscherlich) 的 [PR](https://github.com/Homebrew/homebrew-cask/pull/59494)。
|
||||
macOS 用户可以使用 `brew cask` 安装 Motrix,感谢 [Mitscherlich](https://github.com/Mitscherlich) 的 [PR](https://github.com/Homebrew/homebrew-cask/pull/59494)。
|
||||
|
||||
```bash
|
||||
brew update && brew cask install motrix
|
||||
@@ -30,7 +41,7 @@ brew update && brew cask install motrix
|
||||
|
||||
### Linux
|
||||
|
||||
您可以下载 AppImage(适用于所有Linux发行版)软件包或 snap 或从源代码构建。
|
||||
你可以下载 AppImage(适用于所有 Linux 发行版)软件包或 snap 或从源代码构建安装 Motrix。
|
||||
|
||||
构建请阅读 **编译打包** 部分。
|
||||
|
||||
@@ -51,7 +62,7 @@ yay motrix
|
||||
- 🚀 单任务最高支持 64 线程下载
|
||||
- 🕶 模拟用户代理UA
|
||||
- 🔔 下载完成后通知
|
||||
- 💻 支持触控栏快捷健 (Mac 专享)
|
||||
- 💻 支持触控栏快捷键 (Mac 专享)
|
||||
- 🤖 常驻系统托盘,操作更加便捷
|
||||
- 🌑 深色模式
|
||||
- 🗑 移除任务时可同时删除相关文件
|
||||
@@ -123,8 +134,10 @@ npm run build
|
||||
|-------|:--------------------|:-------------|
|
||||
| de | German | ✔️ [@Schloemicher](https://github.com/Schloemicher) |
|
||||
| en-US | English | ✔️ |
|
||||
| fa | فارسی | ✔️ [@Nima-Ra](https://github.com/Nima-Ra) |
|
||||
| fr | Français | ✔️ [@gpatarin](https://github.com/gpatarin) |
|
||||
| ja | 日本語 | ✔️ [@hbkrkzk](https://github.com/hbkrkzk) |
|
||||
| ko | 한국어 | ✔️ [@KOZ39](https://github.com/KOZ39) |
|
||||
| pt-BR | Portuguese (Brazil) | ✔️ [@andrenoberto](https://github.com/andrenoberto) |
|
||||
| tr | Türkçe | ✔️ [@abdullah](https://github.com/abdullah) |
|
||||
| zh-CN | 简体中文 | ✔️ |
|
||||
|
||||
@@ -20,9 +20,20 @@ Motrix has a clean and easy to use interface. I hope you will like it 👻.
|
||||
|
||||
Download from [GitHub Releases](https://github.com/agalwood/Motrix/releases) and install it.
|
||||
|
||||
### Windows
|
||||
|
||||
It is recommended to install Motrix using the installation package (Motrix-Setup-x.y.z.exe) to ensure a complete experience, such as associating torrent files, capturing magnet links, etc.
|
||||
|
||||
If you prefer the portable version, you can use [scoop](https://github.com/lukesampson/scoop) (need Windows 7+) to install Motrix.
|
||||
|
||||
```bash
|
||||
scoop bucket add extras
|
||||
scoop install motrix
|
||||
```
|
||||
|
||||
### macOS
|
||||
|
||||
Update: macOS user support `brew cask` installation, thanks to [PR](https://github.com/Homebrew/homebrew-cask/pull/59494) of [Mitscherlich](https://github.com/Mitscherlich).
|
||||
The macOS users can install Motrix using `brew cask`, thanks to [PR](https://github.com/Homebrew/homebrew-cask/pull/59494) of [Mitscherlich](https://github.com/Mitscherlich).
|
||||
|
||||
```bash
|
||||
brew update && brew cask install motrix
|
||||
@@ -30,7 +41,7 @@ brew update && brew cask install motrix
|
||||
|
||||
### Linux
|
||||
|
||||
You can download the AppImage(for all Linux distributions) package or snap or just build from source code.
|
||||
You can download the AppImage (for all Linux distributions) package or snap or just build from source code to install Motrix.
|
||||
|
||||
Please read the **Build** section.
|
||||
|
||||
@@ -115,8 +126,10 @@ Translations into versions for other languages are welcome 🧐! Please read the
|
||||
|-------|:--------------------|:-------------|
|
||||
| de | German | ✔️ [@Schloemicher](https://github.com/Schloemicher) |
|
||||
| en-US | English | ✔️ |
|
||||
| fa | فارسی | ✔️ [@Nima-Ra](https://github.com/Nima-Ra) |
|
||||
| fr | Français | ✔️ [@gpatarin](https://github.com/gpatarin) |
|
||||
| ja | 日本語 | ✔️ [@hbkrkzk](https://github.com/hbkrkzk) |
|
||||
| ko | 한국어 | ✔️ [@KOZ39](https://github.com/KOZ39) |
|
||||
| pt-BR | Portuguese (Brazil) | ✔️ [@andrenoberto](https://github.com/andrenoberto) |
|
||||
| tr | Türkçe | ✔️ [@abdullah](https://github.com/abdullah) |
|
||||
| zh-CN | 简体中文 | ✔️ |
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
provider: generic
|
||||
url: 'https://motrix.app/release/'
|
||||
url: 'https://dl.motrix.app/release/'
|
||||
|
||||
@@ -106,3 +106,17 @@ seed-ratio=1.0
|
||||
bt-seed-unverified=true
|
||||
# 保存磁力链接元数据为种子文件(.torrent文件), 默认:false
|
||||
bt-save-metadata=false
|
||||
# Removes the unselected files when download is completed in BitTorrent.
|
||||
# To select files, use --select-file option. If it is not used,
|
||||
# all files are assumed to be selected. Please use this option with care
|
||||
# because it will actually remove files from your disk. Default: false
|
||||
bt-remove-unselected-file=true
|
||||
# Verify the peer using certificates specified
|
||||
# in --ca-certificate option. Default: true
|
||||
check-certificate=false
|
||||
# Exclude seed only downloads when counting concurrent active downloads (See -j option).
|
||||
# This means that if -j3 is given and this option is turned on and 3 downloads are active and one of those enters seed mode,
|
||||
# then it is excluded from active download count (thus it becomes 2),
|
||||
# and the next download waiting in queue gets started.
|
||||
# But be aware that seeding item is still recognized as active download in RPC method. Default: false
|
||||
bt-detach-seed-only=true
|
||||
|
||||
@@ -106,3 +106,17 @@ seed-ratio=1.0
|
||||
bt-seed-unverified=true
|
||||
# 保存磁力链接元数据为种子文件(.torrent文件), 默认:false
|
||||
bt-save-metadata=false
|
||||
# Removes the unselected files when download is completed in BitTorrent.
|
||||
# To select files, use --select-file option. If it is not used,
|
||||
# all files are assumed to be selected. Please use this option with care
|
||||
# because it will actually remove files from your disk. Default: false
|
||||
bt-remove-unselected-file=true
|
||||
# Verify the peer using certificates specified
|
||||
# in --ca-certificate option. Default: true
|
||||
check-certificate=false
|
||||
# Exclude seed only downloads when counting concurrent active downloads (See -j option).
|
||||
# This means that if -j3 is given and this option is turned on and 3 downloads are active and one of those enters seed mode,
|
||||
# then it is excluded from active download count (thus it becomes 2),
|
||||
# and the next download waiting in queue gets started.
|
||||
# But be aware that seeding item is still recognized as active download in RPC method. Default: false
|
||||
bt-detach-seed-only=true
|
||||
|
||||
@@ -106,3 +106,17 @@ seed-ratio=1.0
|
||||
bt-seed-unverified=true
|
||||
# 保存磁力链接元数据为种子文件(.torrent文件), 默认:false
|
||||
bt-save-metadata=false
|
||||
# Removes the unselected files when download is completed in BitTorrent.
|
||||
# To select files, use --select-file option. If it is not used,
|
||||
# all files are assumed to be selected. Please use this option with care
|
||||
# because it will actually remove files from your disk. Default: false
|
||||
bt-remove-unselected-file=true
|
||||
# Verify the peer using certificates specified
|
||||
# in --ca-certificate option. Default: true
|
||||
check-certificate=false
|
||||
# Exclude seed only downloads when counting concurrent active downloads (See -j option).
|
||||
# This means that if -j3 is given and this option is turned on and 3 downloads are active and one of those enters seed mode,
|
||||
# then it is excluded from active download count (thus it becomes 2),
|
||||
# and the next download waiting in queue gets started.
|
||||
# But be aware that seeding item is still recognized as active download in RPC method. Default: false
|
||||
bt-detach-seed-only=true
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Motrix",
|
||||
"version": "1.3.6",
|
||||
"version": "1.4.1",
|
||||
"description": "A full-featured download manager",
|
||||
"homepage": "https://motrix.app",
|
||||
"author": {
|
||||
@@ -27,7 +27,7 @@
|
||||
"pack": "npm run pack:main && npm run pack:renderer",
|
||||
"pack:main": "cross-env NODE_ENV=production webpack --mode production --progress --colors --config .electron-vue/webpack.main.config.js",
|
||||
"pack:renderer": "cross-env NODE_ENV=production webpack --mode production --progress --colors --config .electron-vue/webpack.renderer.config.js",
|
||||
"postinstall": "npm run lint:fix"
|
||||
"postinstall": "electron-builder install-app-deps && npm run lint:fix"
|
||||
},
|
||||
"build": {
|
||||
"productName": "Motrix",
|
||||
@@ -60,6 +60,12 @@
|
||||
"schemes": [
|
||||
"magnet"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Thunder Protocol",
|
||||
"schemes": [
|
||||
"thunder"
|
||||
]
|
||||
}
|
||||
],
|
||||
"dmg": {
|
||||
@@ -154,7 +160,7 @@
|
||||
"publish": [
|
||||
{
|
||||
"provider": "generic",
|
||||
"url": "https://motrix.app/release/"
|
||||
"url": "https://dl.motrix.app/release/"
|
||||
},
|
||||
{
|
||||
"provider": "github"
|
||||
@@ -162,26 +168,27 @@
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"@panter/vue-i18next": "^0.15.0",
|
||||
"@panter/vue-i18next": "^0.15.1",
|
||||
"aria2": "^4.0.3",
|
||||
"axios": "^0.18.0",
|
||||
"axios": "^0.19.0",
|
||||
"blob-util": "^2.0.2",
|
||||
"clipboard-polyfill": "^2.8.0",
|
||||
"electron-debug": "^2.2.0",
|
||||
"clipboard-polyfill": "^2.8.1",
|
||||
"electron-debug": "^3.0.0",
|
||||
"electron-is": "^3.0.0",
|
||||
"electron-log": "^3.0.5",
|
||||
"electron-updater": "^4.0.9",
|
||||
"element-ui": "^2.7.2",
|
||||
"electron-log": "^3.0.6",
|
||||
"electron-updater": "^4.0.12",
|
||||
"element-ui": "^2.9.1",
|
||||
"forever-monitor": "^1.7.1",
|
||||
"i18next": "^15.0.9",
|
||||
"i18next": "^17.0.3",
|
||||
"lodash": "^4.17.11",
|
||||
"normalize.css": "^8.0.1",
|
||||
"parse-torrent": "^6.1.2",
|
||||
"randomatic": "^3.1.1",
|
||||
"svg-innerhtml": "^1.1.0",
|
||||
"vue": "^2.6.10",
|
||||
"vue-electron": "^1.0.6",
|
||||
"vue-router": "^3.0.6",
|
||||
"vuex": "^3.1.0",
|
||||
"vuex": "^3.1.1",
|
||||
"vuex-router-sync": "^5.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -191,7 +198,7 @@
|
||||
"@vue/eslint-config-standard": "^4.0.0",
|
||||
"ajv": "^6.10.0",
|
||||
"babel-core": "^6.26.3",
|
||||
"babel-eslint": "^10.0.1",
|
||||
"babel-eslint": "^10.0.2",
|
||||
"babel-loader": "^7.1.5",
|
||||
"babel-plugin-component": "^1.1.1",
|
||||
"babel-plugin-transform-runtime": "^6.23.0",
|
||||
@@ -199,17 +206,17 @@
|
||||
"babel-preset-stage-0": "^6.24.1",
|
||||
"babel-register": "^6.26.0",
|
||||
"babili-webpack-plugin": "^0.1.2",
|
||||
"cfonts": "^2.4.2",
|
||||
"cfonts": "^2.4.3",
|
||||
"chalk": "^2.4.2",
|
||||
"copy-webpack-plugin": "^5.0.3",
|
||||
"cross-env": "^5.1.6",
|
||||
"css-loader": "^2.1.1",
|
||||
"del": "^4.1.0",
|
||||
"del": "^4.1.1",
|
||||
"devtron": "^1.4.0",
|
||||
"electron": "^4.1.5",
|
||||
"electron-builder": "^20.39.0",
|
||||
"electron": "^4.2.4",
|
||||
"electron-builder": "^20.43.0",
|
||||
"electron-devtools-installer": "^2.2.4",
|
||||
"electron-notarize": "^0.0.5",
|
||||
"electron-notarize": "^0.1.1",
|
||||
"electron-osx-sign": "^0.4.11",
|
||||
"electron-store": "^2.0.0",
|
||||
"eslint": "^5.16.0",
|
||||
@@ -217,17 +224,17 @@
|
||||
"eslint-friendly-formatter": "^4.0.1",
|
||||
"eslint-loader": "^2.1.2",
|
||||
"eslint-plugin-html": "^4.0.6",
|
||||
"eslint-plugin-import": "^2.17.2",
|
||||
"eslint-plugin-import": "^2.17.3",
|
||||
"eslint-plugin-node": "^8.0.1",
|
||||
"eslint-plugin-promise": "^4.1.1",
|
||||
"eslint-plugin-standard": "^4.0.0",
|
||||
"eslint-plugin-vue": "^5.2.2",
|
||||
"file-loader": "^3.0.1",
|
||||
"html-webpack-plugin": "^3.2.0",
|
||||
"mini-css-extract-plugin": "0.6.0",
|
||||
"mini-css-extract-plugin": "0.7.0",
|
||||
"multispinner": "^0.2.1",
|
||||
"node-loader": "^0.6.0",
|
||||
"node-sass": "^4.10.0",
|
||||
"node-sass": "^4.12.0",
|
||||
"optimize-css-assets-webpack-plugin": "^5.0.1",
|
||||
"sass-loader": "^7.1.0",
|
||||
"style-loader": "^0.23.1",
|
||||
@@ -236,10 +243,10 @@
|
||||
"vue-loader": "^15.7.0",
|
||||
"vue-style-loader": "^4.1.2",
|
||||
"vue-template-compiler": "^2.6.10",
|
||||
"webpack": "^4.30.0",
|
||||
"webpack-cli": "^3.3.1",
|
||||
"webpack-dev-server": "^3.3.1",
|
||||
"webpack-hot-middleware": "^2.24.3",
|
||||
"webpack": "^4.33.0",
|
||||
"webpack-cli": "^3.3.4",
|
||||
"webpack-dev-server": "^3.7.1",
|
||||
"webpack-hot-middleware": "^2.25.0",
|
||||
"webpack-merge": "^4.2.1"
|
||||
}
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
@@ -8,6 +8,7 @@ import logger from './core/Logger'
|
||||
import ConfigManager from './core/ConfigManager'
|
||||
import { setupLocaleManager } from '@/ui/Locale'
|
||||
import Engine from './core/Engine'
|
||||
import AutoLaunchManager from './core/AutoLaunchManager'
|
||||
import UpdateManager from './core/UpdateManager'
|
||||
import EnergyManager from './core/EnergyManager'
|
||||
import ProtocolManager from './core/ProtocolManager'
|
||||
@@ -16,6 +17,7 @@ import MenuManager from './ui/MenuManager'
|
||||
import TouchBarManager from './ui/TouchBarManager'
|
||||
import TrayManager from './ui/TrayManager'
|
||||
import ThemeManager from './ui/ThemeManager'
|
||||
import { AUTO_CHECK_UPDATE_INTERVAL } from '@shared/constants'
|
||||
|
||||
export default class Application extends EventEmitter {
|
||||
constructor () {
|
||||
@@ -36,9 +38,7 @@ export default class Application extends EventEmitter {
|
||||
|
||||
this.initTouchBarManager()
|
||||
|
||||
this.windowManager = new WindowManager({
|
||||
userConfig: this.configManager.getUserConfig()
|
||||
})
|
||||
this.initWindowManager()
|
||||
|
||||
this.engine = new Engine({
|
||||
systemConfig: this.configManager.getSystemConfig(),
|
||||
@@ -48,6 +48,8 @@ export default class Application extends EventEmitter {
|
||||
|
||||
this.trayManager = new TrayManager()
|
||||
|
||||
this.autoLaunchManager = new AutoLaunchManager()
|
||||
|
||||
this.initThemeManager()
|
||||
|
||||
this.energyManager = new EnergyManager()
|
||||
@@ -57,6 +59,7 @@ export default class Application extends EventEmitter {
|
||||
this.initProtocolManager()
|
||||
|
||||
this.handleCommands()
|
||||
|
||||
this.handleIpcMessages()
|
||||
}
|
||||
|
||||
@@ -77,12 +80,46 @@ export default class Application extends EventEmitter {
|
||||
}
|
||||
}
|
||||
|
||||
start (page) {
|
||||
this.showPage(page)
|
||||
initWindowManager () {
|
||||
this.windowManager = new WindowManager({
|
||||
userConfig: this.configManager.getUserConfig()
|
||||
})
|
||||
|
||||
this.windowManager.on('window-resized', (data) => {
|
||||
this.storeWindowState(data)
|
||||
})
|
||||
this.windowManager.on('window-moved', (data) => {
|
||||
this.storeWindowState(data)
|
||||
})
|
||||
this.windowManager.on('window-closed', (data) => {
|
||||
this.storeWindowState(data)
|
||||
})
|
||||
}
|
||||
|
||||
showPage (page) {
|
||||
const win = this.windowManager.openWindow(page)
|
||||
storeWindowState (data = {}) {
|
||||
const enabled = this.configManager.getUserConfig('keep-window-state')
|
||||
if (!enabled) {
|
||||
return
|
||||
}
|
||||
|
||||
const state = this.configManager.getUserConfig('window-state', {})
|
||||
const { page, bounds } = data
|
||||
const newState = {
|
||||
...state,
|
||||
[page]: bounds
|
||||
}
|
||||
this.configManager.setUserConfig('window-state', newState)
|
||||
}
|
||||
|
||||
start (page, options = {}) {
|
||||
this.showPage(page, options)
|
||||
}
|
||||
|
||||
showPage (page, options = {}) {
|
||||
const { openedAtLogin } = options
|
||||
const win = this.windowManager.openWindow(page, {
|
||||
hidden: openedAtLogin
|
||||
})
|
||||
win.once('ready-to-show', () => {
|
||||
this.isReady = true
|
||||
this.emit('ready')
|
||||
@@ -160,7 +197,10 @@ export default class Application extends EventEmitter {
|
||||
if (is.dev() || is.mas()) {
|
||||
return
|
||||
}
|
||||
this.protocolManager = new ProtocolManager()
|
||||
const protocols = this.configManager.getUserConfig('protocols', {})
|
||||
this.protocolManager = new ProtocolManager({
|
||||
protocols
|
||||
})
|
||||
}
|
||||
|
||||
handleProtocol (url) {
|
||||
@@ -201,17 +241,26 @@ export default class Application extends EventEmitter {
|
||||
return
|
||||
}
|
||||
this.updateManager = new UpdateManager({
|
||||
autoCheck: this.configManager.getUserConfig('auto-check-update')
|
||||
? (new Date().getTime() - this.configManager.getUserConfig('last-check-update-time') > 7 * 24 * 60 * 60 * 1000)
|
||||
: false,
|
||||
autoCheck: this.isNeedAutoCheck(),
|
||||
setCheckTime: this.configManager
|
||||
})
|
||||
this.handleUpdaterEvents()
|
||||
}
|
||||
|
||||
isNeedAutoCheck () {
|
||||
const enable = this.configManager.getUserConfig('auto-check-update')
|
||||
if (!enable) {
|
||||
return false
|
||||
}
|
||||
|
||||
const lastCheck = this.configManager.getUserConfig('last-check-update-time')
|
||||
return (Date.now() - lastCheck > AUTO_CHECK_UPDATE_INTERVAL)
|
||||
}
|
||||
|
||||
handleUpdaterEvents () {
|
||||
this.updateManager.on('checking', (event) => {
|
||||
this.menuManager.updateMenuItemEnabledState('app.check-for-updates', false)
|
||||
this.trayManager.updateMenuItemEnabledState('app.check-for-updates', false)
|
||||
})
|
||||
|
||||
this.updateManager.on('download-progress', (event) => {
|
||||
@@ -221,10 +270,12 @@ export default class Application extends EventEmitter {
|
||||
|
||||
this.updateManager.on('update-not-available', (event) => {
|
||||
this.menuManager.updateMenuItemEnabledState('app.check-for-updates', true)
|
||||
this.trayManager.updateMenuItemEnabledState('app.check-for-updates', true)
|
||||
})
|
||||
|
||||
this.updateManager.on('update-downloaded', (event) => {
|
||||
this.menuManager.updateMenuItemEnabledState('app.check-for-updates', true)
|
||||
this.trayManager.updateMenuItemEnabledState('app.check-for-updates', true)
|
||||
const win = this.windowManager.getWindow('index')
|
||||
win.setProgressBar(0)
|
||||
})
|
||||
@@ -235,6 +286,7 @@ export default class Application extends EventEmitter {
|
||||
|
||||
this.updateManager.on('update-error', (event) => {
|
||||
this.menuManager.updateMenuItemEnabledState('app.check-for-updates', true)
|
||||
this.trayManager.updateMenuItemEnabledState('app.check-for-updates', true)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -257,10 +309,23 @@ export default class Application extends EventEmitter {
|
||||
})
|
||||
|
||||
this.on('application:exit', () => {
|
||||
this.engine.stop()
|
||||
this.stop()
|
||||
app.exit()
|
||||
})
|
||||
|
||||
this.on('application:open-at-login', (openAtLogin) => {
|
||||
console.log('application:open-at-login===>', openAtLogin)
|
||||
if (is.linux()) {
|
||||
return
|
||||
}
|
||||
|
||||
if (openAtLogin) {
|
||||
this.autoLaunchManager.enable()
|
||||
} else {
|
||||
this.autoLaunchManager.disable()
|
||||
}
|
||||
})
|
||||
|
||||
this.on('application:show', (page) => {
|
||||
this.show(page)
|
||||
})
|
||||
@@ -315,6 +380,14 @@ export default class Application extends EventEmitter {
|
||||
app.clearRecentDocuments()
|
||||
})
|
||||
|
||||
this.on('application:setup-protocols-client', (protocols) => {
|
||||
if (is.dev() || is.mas()) {
|
||||
return
|
||||
}
|
||||
console.log('this.protocolManager', protocols)
|
||||
this.protocolManager.setup(protocols)
|
||||
})
|
||||
|
||||
this.on('help:official-website', () => {
|
||||
const url = 'https://motrix.app/'
|
||||
shell.openExternal(url)
|
||||
@@ -343,7 +416,8 @@ export default class Application extends EventEmitter {
|
||||
})
|
||||
|
||||
ipcMain.on('update-menu-states', (event, visibleStates, enabledStates, checkedStates) => {
|
||||
this.menuManager.updateStates(visibleStates, enabledStates, checkedStates)
|
||||
this.menuManager.updateMenuStates(visibleStates, enabledStates, checkedStates)
|
||||
this.trayManager.updateMenuStates(visibleStates, enabledStates, checkedStates)
|
||||
})
|
||||
|
||||
ipcMain.on('download-status-change', (event, status) => {
|
||||
|
||||
@@ -5,7 +5,11 @@ import is from 'electron-is'
|
||||
import ExceptionHandler from './core/ExceptionHandler'
|
||||
import logger from './core/Logger'
|
||||
import Application from './Application'
|
||||
import { parseArgvAsUrl, parseArgvAsFile } from './utils'
|
||||
import {
|
||||
splitArgv,
|
||||
parseArgvAsUrl,
|
||||
parseArgvAsFile
|
||||
} from './utils'
|
||||
|
||||
const EMPTY_STRING = ''
|
||||
|
||||
@@ -33,9 +37,9 @@ export default class Launcher extends EventEmitter {
|
||||
app.quit()
|
||||
} else {
|
||||
app.on('second-instance', (event, argv, workingDirectory) => {
|
||||
logger.warn('second-instance====>', event, argv, workingDirectory)
|
||||
logger.warn('second-instance====>', argv, workingDirectory)
|
||||
global.application.showPage('index')
|
||||
if (!is.macOS() && argv.length > 1) { // Windows, Linux
|
||||
if (!is.macOS() && argv.length > 1) {
|
||||
this.handleAppLaunchArgv(argv)
|
||||
}
|
||||
})
|
||||
@@ -47,6 +51,16 @@ export default class Launcher extends EventEmitter {
|
||||
init () {
|
||||
this.exceptionHandler = new ExceptionHandler()
|
||||
|
||||
this.openedAtLogin = is.macOS()
|
||||
? app.getLoginItemSettings().wasOpenedAtLogin
|
||||
: false
|
||||
|
||||
if (process.argv.length > 1) {
|
||||
this.handleAppLaunchArgv(process.argv)
|
||||
}
|
||||
|
||||
logger.warn('openedAtLogin===>', this.openedAtLogin)
|
||||
|
||||
this.handleAppEvents()
|
||||
}
|
||||
|
||||
@@ -60,11 +74,12 @@ export default class Launcher extends EventEmitter {
|
||||
|
||||
/**
|
||||
* handleOpenUrl
|
||||
* Event 'open-url' macOS only
|
||||
* "name": "Motrix Protocol",
|
||||
* "schemes": ["mo", "motrix"]
|
||||
*/
|
||||
handleOpenUrl () {
|
||||
if (is.mas()) {
|
||||
if (is.mas() || !is.macOS()) {
|
||||
return
|
||||
}
|
||||
app.on('open-url', (event, url) => {
|
||||
@@ -77,30 +92,44 @@ export default class Launcher extends EventEmitter {
|
||||
|
||||
/**
|
||||
* handleOpenFile
|
||||
* Event 'open-file' macOS only
|
||||
* handle open torrent file
|
||||
*/
|
||||
handleOpenFile () {
|
||||
// macOS
|
||||
if (is.macOS()) {
|
||||
app.on('open-file', (event, path) => {
|
||||
logger.info(`[Motrix] open-file: ${path}`)
|
||||
event.preventDefault()
|
||||
this.file = path
|
||||
this.sendFileToApplication()
|
||||
})
|
||||
} else if (process.argv.length > 1) { // Windows, Linux
|
||||
this.handleAppLaunchArgv(process.argv)
|
||||
if (!is.macOS()) {
|
||||
return
|
||||
}
|
||||
app.on('open-file', (event, path) => {
|
||||
logger.info(`[Motrix] open-file: ${path}`)
|
||||
event.preventDefault()
|
||||
this.file = path
|
||||
this.sendFileToApplication()
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* handleAppLaunchArgv
|
||||
* For Windows, Linux
|
||||
* @param {array} argv
|
||||
*/
|
||||
handleAppLaunchArgv (argv) {
|
||||
const file = parseArgvAsFile(argv)
|
||||
logger.info('handleAppLaunchArgv===>', argv)
|
||||
|
||||
// args: array, extra: map
|
||||
const { args, extra } = splitArgv(argv)
|
||||
logger.info('splitArgv.args===>', args)
|
||||
logger.info('splitArgv.extra===>', extra)
|
||||
if (extra['--opened-at-login'] === '1') {
|
||||
this.openedAtLogin = true
|
||||
}
|
||||
|
||||
const file = parseArgvAsFile(args)
|
||||
if (file) {
|
||||
this.file = file
|
||||
this.sendFileToApplication()
|
||||
}
|
||||
|
||||
const url = parseArgvAsUrl(argv)
|
||||
const url = parseArgvAsUrl(args)
|
||||
if (url) {
|
||||
this.url = url
|
||||
this.sendUrlToApplication()
|
||||
@@ -125,7 +154,10 @@ export default class Launcher extends EventEmitter {
|
||||
app.on('ready', () => {
|
||||
global.application = new Application()
|
||||
|
||||
global.application.start('index')
|
||||
const { openedAtLogin } = this
|
||||
global.application.start('index', {
|
||||
openedAtLogin
|
||||
})
|
||||
|
||||
global.application.on('ready', () => {
|
||||
this.sendUrlToApplication()
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
export default [
|
||||
'udp://62.138.0.158:6969/announce',
|
||||
'udp://93.158.213.92:1337/announce',
|
||||
'udp://185.225.17.100:1337/announce',
|
||||
'udp://151.80.120.112:2710/announce',
|
||||
'udp://151.80.120.114:2710/announce',
|
||||
'udp://185.19.107.254:80/announce',
|
||||
'udp://208.83.20.20:6969/announce',
|
||||
'udp://5.206.27.172:6969/announce',
|
||||
'udp://176.31.241.153:80/announce',
|
||||
'udp://37.235.174.46:2710/announce',
|
||||
'udp://95.211.168.204:2710/announce',
|
||||
'udp://159.100.245.181:6969/announce',
|
||||
'http://51.68.122.172:80/announce',
|
||||
'udp://89.234.156.205:451/announce',
|
||||
'udp://184.105.151.164:6969/announce',
|
||||
'udp://51.15.40.114:80/announce',
|
||||
'http://82.209.230.66:80/announce',
|
||||
'udp://185.83.215.123:6969/announce',
|
||||
'udp://195.154.52.99:80/announce',
|
||||
'http://51.38.230.101:80/announce',
|
||||
'udp://tracker.coppersurfer.tk:6969/announce',
|
||||
'udp://tracker.opentrackr.org:1337/announce',
|
||||
'udp://tracker.internetwarriors.net:1337/announce',
|
||||
'udp://9.rarbg.to:2710/announce',
|
||||
'udp://9.rarbg.me:2710/announce',
|
||||
'udp://tracker.openbittorrent.com:80/announce',
|
||||
'udp://exodus.desync.com:6969/announce',
|
||||
'udp://tracker.tiny-vps.com:6969/announce',
|
||||
'udp://thetracker.org:80/announce',
|
||||
'udp://retracker.lanta-net.ru:2710/announce',
|
||||
'udp://bt.xxx-tracker.com:2710/announce',
|
||||
'udp://tracker.cyberia.is:6969/announce',
|
||||
'http://open.acgnxtracker.com:80/announce',
|
||||
'udp://tracker.torrent.eu.org:451/announce',
|
||||
'udp://explodie.org:6969/announce',
|
||||
'udp://ipv4.tracker.harry.lu:80/announce',
|
||||
'http://retracker.mgts.by:80/announce',
|
||||
'udp://tracker.uw0.xyz:6969/announce',
|
||||
'udp://open.stealth.si:80/announce',
|
||||
'http://t.nyaatracker.com:80/announce'
|
||||
]
|
||||
@@ -0,0 +1,35 @@
|
||||
import { app } from 'electron'
|
||||
|
||||
export default class AutoLaunchManager {
|
||||
enable () {
|
||||
return new Promise((resolve, reject) => {
|
||||
const enabled = app.getLoginItemSettings().openAtLogin
|
||||
if (enabled) {
|
||||
resolve()
|
||||
}
|
||||
|
||||
app.setLoginItemSettings({
|
||||
openAtLogin: true,
|
||||
// For Windows
|
||||
args: [
|
||||
'--opened-at-login=1'
|
||||
]
|
||||
})
|
||||
resolve()
|
||||
})
|
||||
}
|
||||
|
||||
disable () {
|
||||
return new Promise((resolve, reject) => {
|
||||
app.setLoginItemSettings({ openAtLogin: false })
|
||||
resolve()
|
||||
})
|
||||
}
|
||||
|
||||
isEnabled () {
|
||||
return new Promise((resolve, reject) => {
|
||||
const enabled = app.getLoginItemSettings().openAtLogin
|
||||
resolve(enabled)
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
import { app } from 'electron'
|
||||
import is from 'electron-is'
|
||||
import Store from 'electron-store'
|
||||
import tracker from '../configs/tracker'
|
||||
import {
|
||||
getDhtPath,
|
||||
getLogPath,
|
||||
@@ -35,48 +36,7 @@ export default class ConfigManager {
|
||||
'all-proxy': '',
|
||||
'allow-overwrite': true,
|
||||
'auto-file-renaming': true,
|
||||
'bt-tracker': [
|
||||
'udp://62.138.0.158:6969/announce',
|
||||
'udp://188.241.58.209:6969/announce',
|
||||
'udp://188.241.58.209:6969/announce',
|
||||
'udp://208.83.20.20:6969/announce',
|
||||
'udp://151.80.120.115:2710/announce',
|
||||
'udp://185.225.17.100:1337/announce',
|
||||
'udp://151.80.120.113:2710/announce',
|
||||
'udp://62.210.88.151:1337/announce',
|
||||
'http://176.113.71.19:6961/announce',
|
||||
'http://104.27.134.253:8080/announce',
|
||||
'udp://5.2.79.219:1337/announce',
|
||||
'udp://91.216.110.52:451/announce',
|
||||
'udp://5.206.58.23:6969/announce',
|
||||
'udp://159.100.245.181:6969/announce',
|
||||
'udp://5.2.79.22:6969/announce',
|
||||
'udp://176.31.241.153:80/announce',
|
||||
'udp://95.211.168.204:2710/announce',
|
||||
'udp://188.246.227.212:80/announce',
|
||||
'udp://51.38.184.185:6969/announce',
|
||||
'udp://51.15.40.114:80/announce',
|
||||
'udp://tracker.coppersurfer.tk:6969/announce',
|
||||
'udp://tracker.open-internet.nl:6969/announce',
|
||||
'udp://tracker.leechers-paradise.org:6969/announce',
|
||||
'udp://exodus.desync.com:6969/announce',
|
||||
'udp://tracker.internetwarriors.net:1337/announce',
|
||||
'udp://9.rarbg.to:2710/announce',
|
||||
'udp://9.rarbg.me:2710/announce',
|
||||
'udp://tracker.opentrackr.org:1337/announce',
|
||||
'http://tracker3.itzmx.com:6961/announce',
|
||||
'http://tracker1.itzmx.com:8080/announce',
|
||||
'udp://open.demonii.si:1337/announce',
|
||||
'udp://tracker.torrent.eu.org:451/announce',
|
||||
'udp://tracker.tiny-vps.com:6969/announce',
|
||||
'udp://tracker.cyberia.is:6969/announce',
|
||||
'udp://denis.stalker.upeer.me:6969/announce',
|
||||
'udp://thetracker.org:80/announce',
|
||||
'udp://bt.xxx-tracker.com:2710/announce',
|
||||
'udp://open.stealth.si:80/announce',
|
||||
'udp://tracker.port443.xyz:6969/announce',
|
||||
'udp://ipv4.tracker.harry.lu:80/announce'
|
||||
].join(','),
|
||||
'bt-tracker': tracker.join(','),
|
||||
'continue': true,
|
||||
'dht-file-path': getDhtPath(4),
|
||||
'dht-file-path6': getDhtPath(6),
|
||||
@@ -90,6 +50,7 @@ export default class ConfigManager {
|
||||
'pause': true,
|
||||
'rpc-listen-port': 16800,
|
||||
'rpc-secret': '',
|
||||
'seed-time': 60,
|
||||
'split': 16,
|
||||
'user-agent': 'Transmission/2.94'
|
||||
}
|
||||
@@ -109,20 +70,34 @@ export default class ConfigManager {
|
||||
// },
|
||||
defaults: {
|
||||
'all-proxy-backup': '',
|
||||
'auto-check-update': false,
|
||||
'auto-check-update': is.macOS(),
|
||||
'hide-app-menu': is.windows() || is.linux(),
|
||||
'last-check-update-time': 0,
|
||||
'locale': app.getLocale(),
|
||||
'log-path': getLogPath(),
|
||||
'new-task-show-downloading': true,
|
||||
'open-at-login': false,
|
||||
'protocols': { 'magnet': true, 'thunder': false },
|
||||
'resume-all-when-app-launched': false,
|
||||
'keep-window-state': false,
|
||||
'session-path': getSessionPath(),
|
||||
'task-notification': true,
|
||||
'theme': 'auto',
|
||||
'update-channel': 'latest',
|
||||
'use-proxy': false
|
||||
'use-proxy': false,
|
||||
'window-state': {}
|
||||
}
|
||||
})
|
||||
this.fixUserConfig()
|
||||
}
|
||||
|
||||
fixUserConfig () {
|
||||
// Fix the value of open-at-login when the user delete
|
||||
// the Motrix self-starting item through startup management.
|
||||
const openAtLogin = app.getLoginItemSettings().openAtLogin
|
||||
if (this.getUserConfig('open-at-login') !== openAtLogin) {
|
||||
this.setUserConfig('open-at-login', openAtLogin)
|
||||
}
|
||||
}
|
||||
|
||||
getSystemConfig (key, defaultValue) {
|
||||
|
||||
@@ -64,7 +64,7 @@ export default class Engine {
|
||||
const sh = this.getStartSh()
|
||||
logger.info('[Motrix] Engine start sh===>', sh)
|
||||
this.instance = forever.start(sh, {
|
||||
max: 10,
|
||||
max: 100,
|
||||
parser: function (command, args) {
|
||||
return {
|
||||
command: command,
|
||||
|
||||
@@ -9,28 +9,39 @@ export default class ProtocolManager extends EventEmitter {
|
||||
super()
|
||||
this.options = options
|
||||
|
||||
// package.json:build.protocols[].schemes[]
|
||||
// options.protocols: { 'magnet': true, 'thunder': false }
|
||||
this.protocols = {
|
||||
mo: true,
|
||||
motrix: true,
|
||||
...options.protocols
|
||||
}
|
||||
|
||||
this.init()
|
||||
}
|
||||
|
||||
init () {
|
||||
// package.json:build.protocols[].schemes[]
|
||||
if (!app.isDefaultProtocolClient('mo')) {
|
||||
app.setAsDefaultProtocolClient('mo')
|
||||
}
|
||||
if (!app.isDefaultProtocolClient('motrix')) {
|
||||
app.setAsDefaultProtocolClient('motrix')
|
||||
}
|
||||
if (!app.isDefaultProtocolClient('magnet')) {
|
||||
app.setAsDefaultProtocolClient('magnet')
|
||||
}
|
||||
const { protocols } = this
|
||||
this.setup(protocols)
|
||||
}
|
||||
|
||||
setup (protocols) {
|
||||
Object.keys(protocols).forEach((protocol) => {
|
||||
const enabled = protocols[protocol]
|
||||
if (enabled) {
|
||||
if (!app.isDefaultProtocolClient(protocol)) {
|
||||
app.setAsDefaultProtocolClient(protocol)
|
||||
}
|
||||
} else {
|
||||
app.removeAsDefaultProtocolClient(protocol)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
handle (url) {
|
||||
logger.info(`[Motrix] protocol url: ${url}`)
|
||||
|
||||
if (url.toLowerCase().startsWith('magnet:')) {
|
||||
return this.handleMagnetProtocol(url)
|
||||
}
|
||||
this.handleMagnetAndThunderProtocol(url)
|
||||
|
||||
if (
|
||||
url.toLowerCase().startsWith('mo:') ||
|
||||
@@ -40,11 +51,21 @@ export default class ProtocolManager extends EventEmitter {
|
||||
}
|
||||
}
|
||||
|
||||
handleMagnetProtocol (url) {
|
||||
handleMagnetAndThunderProtocol (url) {
|
||||
if (!url) {
|
||||
return
|
||||
}
|
||||
logger.error(`[Motrix] handleMagnetProtocol url: ${url}`)
|
||||
let protocolTag = ''
|
||||
|
||||
if (url.toLowerCase().startsWith('magnet:')) {
|
||||
protocolTag = 'handleMagnetProtocol'
|
||||
}
|
||||
|
||||
if (url.toLowerCase().startsWith('thunder:')) {
|
||||
protocolTag = 'handleThunderProtocol'
|
||||
}
|
||||
|
||||
logger.error(`[Motrix] ${protocolTag} url: ${url}`)
|
||||
|
||||
global.application.sendCommandToAll('application:new-task', 'uri', url)
|
||||
}
|
||||
|
||||
@@ -43,13 +43,13 @@ export default class UpdateManager extends EventEmitter {
|
||||
|
||||
if (this.autoCheckData.checkEnable) {
|
||||
this.autoCheckData.userCheck = false
|
||||
this.options.setCheckTime.setUserConfig('last-check-update-time', new Date().getTime())
|
||||
this.options.setCheckTime.setUserConfig('last-check-update-time', Date.now())
|
||||
this.updater.checkForUpdates()
|
||||
}
|
||||
}
|
||||
|
||||
check () {
|
||||
this.options.setCheckTime.setUserConfig('last-check-update-time', new Date().getTime())
|
||||
this.options.setCheckTime.setUserConfig('last-check-update-time', Date.now())
|
||||
this.autoCheckData.userCheck = true
|
||||
this.updater.checkForUpdates()
|
||||
}
|
||||
@@ -112,7 +112,10 @@ export default class UpdateManager extends EventEmitter {
|
||||
|
||||
updateError (event, error) {
|
||||
this.emit('update-error', error)
|
||||
const msg = error == null ? this.i18n.t('update-error-message') : (error.stack || error).toString()
|
||||
const msg = (error == null)
|
||||
? this.i18n.t('update-error-message')
|
||||
: (error.stack || error).toString()
|
||||
|
||||
this.updater.logger.warn(`[Motrix] update-error: ${msg}`)
|
||||
dialog.showErrorBox(msg)
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
{ "type": "separator" },
|
||||
{ "id": "app.show", "command": "application:show", "command-arg": "index" },
|
||||
{ "id": "help.manual", "command": "help:manual" },
|
||||
{ "id": "app.check-for-updates", "command": "application:check-for-updates" },
|
||||
{ "type": "separator" },
|
||||
{ "id": "app.preferences", "command": "application:preferences", "command-before": "application:show,index" },
|
||||
{ "id": "app.quit", "role": "quit" }
|
||||
|
||||
@@ -50,7 +50,7 @@ export default class MenuManager extends EventEmitter {
|
||||
this.setup()
|
||||
}
|
||||
|
||||
updateStates (visibleStates, enabledStates, checkedStates) {
|
||||
updateMenuStates (visibleStates, enabledStates, checkedStates) {
|
||||
updateStates(this.items, visibleStates, enabledStates, checkedStates)
|
||||
}
|
||||
|
||||
@@ -58,13 +58,13 @@ export default class MenuManager extends EventEmitter {
|
||||
const visibleStates = {
|
||||
[id]: flag
|
||||
}
|
||||
this.updateStates(visibleStates, null, null)
|
||||
this.updateMenuStates(visibleStates, null, null)
|
||||
}
|
||||
|
||||
updateMenuItemEnabledState (id, flag) {
|
||||
const enabledStates = {
|
||||
[id]: flag
|
||||
}
|
||||
this.updateStates(null, enabledStates, null)
|
||||
this.updateMenuStates(null, enabledStates, null)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,11 @@ import { EventEmitter } from 'events'
|
||||
import { join } from 'path'
|
||||
import { Tray, Menu, systemPreferences } from 'electron'
|
||||
import is from 'electron-is'
|
||||
import { translateTemplate } from '../utils/menu'
|
||||
import {
|
||||
translateTemplate,
|
||||
flattenMenuItems,
|
||||
updateStates
|
||||
} from '../utils/menu'
|
||||
import { getI18n } from '@/ui/Locale'
|
||||
import { LIGHT_THEME, DARK_THEME } from '@shared/constants'
|
||||
|
||||
@@ -45,6 +49,7 @@ export default class TrayManager extends EventEmitter {
|
||||
const template = JSON.parse(JSON.stringify(this.template))
|
||||
const tpl = translateTemplate(template, keystrokesByCommand, this.i18n)
|
||||
this.menu = Menu.buildFromTemplate(tpl)
|
||||
this.items = flattenMenuItems(this.menu)
|
||||
}
|
||||
|
||||
setup () {
|
||||
@@ -113,6 +118,24 @@ export default class TrayManager extends EventEmitter {
|
||||
this.updateIcon()
|
||||
}
|
||||
|
||||
updateMenuStates (visibleStates, enabledStates, checkedStates) {
|
||||
updateStates(this.items, visibleStates, enabledStates, checkedStates)
|
||||
}
|
||||
|
||||
updateMenuItemVisibleState (id, flag) {
|
||||
const visibleStates = {
|
||||
[id]: flag
|
||||
}
|
||||
this.updateMenuStates(visibleStates, null, null)
|
||||
}
|
||||
|
||||
updateMenuItemEnabledState (id, flag) {
|
||||
const enabledStates = {
|
||||
[id]: flag
|
||||
}
|
||||
this.updateMenuStates(null, enabledStates, null)
|
||||
}
|
||||
|
||||
destroy () {
|
||||
tray.destroy()
|
||||
}
|
||||
|
||||
@@ -4,10 +4,10 @@ import { app, shell, screen, BrowserWindow } from 'electron'
|
||||
import is from 'electron-is'
|
||||
import pageConfig from '../configs/page'
|
||||
import logger from '../core/Logger'
|
||||
import { debounce } from 'lodash'
|
||||
|
||||
const defaultBrowserOptions = {
|
||||
titleBarStyle: 'hiddenInset',
|
||||
useContentSize: true,
|
||||
show: false,
|
||||
width: 1024,
|
||||
height: 768,
|
||||
@@ -57,37 +57,57 @@ export default class WindowManager extends EventEmitter {
|
||||
return result
|
||||
}
|
||||
|
||||
openWindow (page) {
|
||||
const options = this.getPageOptions(page)
|
||||
getPageBounds (page) {
|
||||
const enabled = this.userConfig['keep-window-state']
|
||||
const windowStateMap = this.userConfig['window-state'] || {}
|
||||
let result = null
|
||||
if (enabled) {
|
||||
result = windowStateMap[page]
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
openWindow (page, options = {}) {
|
||||
const pageOptions = this.getPageOptions(page)
|
||||
const { hidden } = options
|
||||
|
||||
let window = this.windows[page] || null
|
||||
if (window) {
|
||||
window.restore()
|
||||
window.show()
|
||||
window.focus()
|
||||
return window
|
||||
}
|
||||
|
||||
window = new BrowserWindow({
|
||||
...defaultBrowserOptions,
|
||||
...options.attrs
|
||||
...pageOptions.attrs
|
||||
})
|
||||
|
||||
const bounds = this.getPageBounds(page)
|
||||
console.log('bounds ====>', bounds)
|
||||
if (bounds) {
|
||||
window.setBounds(bounds)
|
||||
}
|
||||
|
||||
window.webContents.on('new-window', (e, url) => {
|
||||
e.preventDefault()
|
||||
shell.openExternal(url)
|
||||
})
|
||||
|
||||
if (options.url) {
|
||||
window.loadURL(options.url)
|
||||
if (pageOptions.url) {
|
||||
window.loadURL(pageOptions.url)
|
||||
}
|
||||
|
||||
window.once('ready-to-show', () => {
|
||||
window.show()
|
||||
if (!hidden) {
|
||||
window.show()
|
||||
}
|
||||
})
|
||||
|
||||
if (options.bindCloseToHide) {
|
||||
this.bindCloseToHide(page, window)
|
||||
}
|
||||
this.handleWindowState(page, window)
|
||||
|
||||
this.handleWindowClose(pageOptions, page, window)
|
||||
|
||||
this.bindAfterClosed(page, window)
|
||||
|
||||
@@ -114,6 +134,9 @@ export default class WindowManager extends EventEmitter {
|
||||
destroyWindow (page) {
|
||||
const win = this.getWindow(page)
|
||||
this.removeWindow(page)
|
||||
win.removeListener('closed')
|
||||
win.removeListener('move')
|
||||
win.removeListener('resize')
|
||||
win.destroy()
|
||||
}
|
||||
|
||||
@@ -127,12 +150,26 @@ export default class WindowManager extends EventEmitter {
|
||||
})
|
||||
}
|
||||
|
||||
bindCloseToHide (page, window) {
|
||||
handleWindowState (page, window) {
|
||||
window.on('resize', debounce(() => {
|
||||
const bounds = window.getBounds()
|
||||
this.emit('window-resized', { page, bounds })
|
||||
}, 500))
|
||||
|
||||
window.on('move', debounce(() => {
|
||||
const bounds = window.getBounds()
|
||||
this.emit('window-moved', { page, bounds })
|
||||
}, 500))
|
||||
}
|
||||
|
||||
handleWindowClose (pageOptions, page, window) {
|
||||
window.on('close', (event) => {
|
||||
if (!this.willQuit) {
|
||||
if (pageOptions.bindCloseToHide && !this.willQuit) {
|
||||
event.preventDefault()
|
||||
window.hide()
|
||||
}
|
||||
const bounds = window.getBounds()
|
||||
this.emit('window-closed', { page, bounds })
|
||||
})
|
||||
}
|
||||
|
||||
@@ -190,7 +227,7 @@ export default class WindowManager extends EventEmitter {
|
||||
if (!window) {
|
||||
return
|
||||
}
|
||||
logger.info('[Motrix] sendCommandTo===>', window, command, ...args)
|
||||
logger.info('[Motrix] sendCommandTo===>', command, ...args)
|
||||
window.webContents.send('command', command, ...args)
|
||||
}
|
||||
|
||||
|
||||
@@ -65,25 +65,50 @@ export function moveAppToApplicationsFolder (errorMsg = '') {
|
||||
})
|
||||
}
|
||||
|
||||
export function splitArgv (argv) {
|
||||
const args = []
|
||||
const extra = {}
|
||||
for (const arg of argv) {
|
||||
if (arg.startsWith('--')) {
|
||||
const kv = arg.split('=')
|
||||
const key = kv[0]
|
||||
const value = kv[1] || '1'
|
||||
extra[key] = value
|
||||
continue
|
||||
}
|
||||
args.push(arg)
|
||||
}
|
||||
return { args, extra }
|
||||
}
|
||||
|
||||
export function parseArgvAsUrl (argv) {
|
||||
let arg = argv[1]
|
||||
if (!arg) {
|
||||
return
|
||||
}
|
||||
|
||||
if (
|
||||
arg.toLowerCase().startsWith('mo:') ||
|
||||
arg.toLowerCase().startsWith('motrix:') ||
|
||||
arg.toLowerCase().startsWith('http:') ||
|
||||
arg.toLowerCase().startsWith('https:') ||
|
||||
arg.toLowerCase().startsWith('ftp:') ||
|
||||
arg.toLowerCase().startsWith('magnet:') ||
|
||||
arg.toLowerCase().startsWith('thunder:')
|
||||
) {
|
||||
if (checkIsSupportedSchema(arg)) {
|
||||
return arg
|
||||
}
|
||||
}
|
||||
|
||||
export function checkIsSupportedSchema (url = '') {
|
||||
const str = url.toLowerCase()
|
||||
if (
|
||||
str.startsWith('mo:') ||
|
||||
str.startsWith('motrix:') ||
|
||||
str.startsWith('http:') ||
|
||||
str.startsWith('https:') ||
|
||||
str.startsWith('ftp:') ||
|
||||
str.startsWith('magnet:') ||
|
||||
str.startsWith('thunder:')
|
||||
) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
export function isDirectory (path) {
|
||||
return existsSync(path) && lstatSync(path).isDirectory()
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import Aria2 from 'aria2'
|
||||
import {
|
||||
separateConfig,
|
||||
compactUndefined,
|
||||
formatOptionsForEngine,
|
||||
mergeTaskResult,
|
||||
changeKeysToCamelCase,
|
||||
changeKeysToKebabCase
|
||||
@@ -57,7 +58,9 @@ export default class Api {
|
||||
rpcListenPort: port,
|
||||
rpcSecret: secret
|
||||
} = this.config
|
||||
const host = '127.0.0.1'
|
||||
this.client = new Aria2({
|
||||
host,
|
||||
port,
|
||||
secret
|
||||
})
|
||||
@@ -84,9 +87,9 @@ export default class Api {
|
||||
savePreference (params = {}) {
|
||||
const kebabParams = changeKeysToKebabCase(params)
|
||||
if (is.renderer()) {
|
||||
this.savePreferenceToNativeStore(kebabParams)
|
||||
return this.savePreferenceToNativeStore(kebabParams)
|
||||
} else {
|
||||
this.savePreferenceToLocalStorage(kebabParams)
|
||||
return this.savePreferenceToLocalStorage(kebabParams)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,6 +102,7 @@ export default class Api {
|
||||
if (!isEmpty(system)) {
|
||||
console.info('[Motrix] save system config: ', system)
|
||||
application.configManager.setSystemConfig(system)
|
||||
this.changeGlobalOption(system)
|
||||
}
|
||||
|
||||
if (!isEmpty(user)) {
|
||||
@@ -115,6 +119,12 @@ export default class Api {
|
||||
return this.client.call('getVersion')
|
||||
}
|
||||
|
||||
changeGlobalOption (options) {
|
||||
const args = formatOptionsForEngine(options)
|
||||
|
||||
return this.client.call('changeGlobalOption', args)
|
||||
}
|
||||
|
||||
getGlobalOption () {
|
||||
return new Promise((resolve) => {
|
||||
this.client.call('getGlobalOption')
|
||||
@@ -124,6 +134,28 @@ export default class Api {
|
||||
})
|
||||
}
|
||||
|
||||
getOption (params = {}) {
|
||||
const { gid } = params
|
||||
const args = compactUndefined([gid])
|
||||
|
||||
return new Promise((resolve) => {
|
||||
this.client.call('getOption', ...args)
|
||||
.then((data) => {
|
||||
resolve(changeKeysToCamelCase(data))
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
changeOption (params = {}) {
|
||||
let { gid, options = {} } = params
|
||||
options = formatOptionsForEngine(options)
|
||||
|
||||
const kebabOptions = changeKeysToKebabCase(options)
|
||||
const args = compactUndefined([gid, kebabOptions])
|
||||
|
||||
return this.client.call('changeOption', ...args)
|
||||
}
|
||||
|
||||
getGlobalStat () {
|
||||
return this.client.call('getGlobalStat')
|
||||
}
|
||||
@@ -133,8 +165,9 @@ export default class Api {
|
||||
uris,
|
||||
options
|
||||
} = params
|
||||
const kebabOptions = changeKeysToKebabCase(options)
|
||||
const tasks = uris.map((uri) => {
|
||||
const args = compactUndefined([[uri], options])
|
||||
const args = compactUndefined([[uri], kebabOptions])
|
||||
return [ 'aria2.addUri', ...args ]
|
||||
})
|
||||
return this.client.multicall(tasks)
|
||||
@@ -145,7 +178,8 @@ export default class Api {
|
||||
torrent,
|
||||
options
|
||||
} = params
|
||||
const args = compactUndefined([torrent, [], options])
|
||||
const kebabOptions = changeKeysToKebabCase(options)
|
||||
const args = compactUndefined([torrent, [], kebabOptions])
|
||||
return this.client.call('addTorrent', ...args)
|
||||
}
|
||||
|
||||
@@ -154,7 +188,8 @@ export default class Api {
|
||||
metalink,
|
||||
options
|
||||
} = params
|
||||
const args = compactUndefined([metalink, options])
|
||||
const kebabOptions = changeKeysToKebabCase(options)
|
||||
const args = compactUndefined([metalink, kebabOptions])
|
||||
return this.client.call('addMetalink', ...args)
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
|
||||
<g stroke-linecap="round" stroke-linejoin="round" stroke-width="2" stroke="currentColor">
|
||||
<rect x="4" y="3" width="16" height="18" fill="none" stroke="currentColor" stroke-miterlimit="10"/>
|
||||
<line data-color="color-2" x1="1" y1="6" x2="1" y2="18" fill="none" stroke-miterlimit="10"/>
|
||||
<line data-color="color-2" x1="23" y1="6" x2="23" y2="18" fill="none" stroke-miterlimit="10"/>
|
||||
<polyline data-cap="butt" points="10 15 10 8 16 8 16 14" fill="none" stroke="currentColor" stroke-miterlimit="10"/>
|
||||
<circle data-stroke="none" cx="9" cy="15" r="2" stroke="none"/>
|
||||
<circle data-stroke="none" cx="15" cy="14" r="2" stroke="none"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 747 B |
@@ -0,0 +1,11 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
|
||||
<g stroke-linecap="round" stroke-linejoin="round" stroke-width="2" stroke="currentColor">
|
||||
<polyline data-cap="butt" fill="none" stroke="currentColor" stroke-miterlimit="10" points="17,23 17,7 1,7 "/>
|
||||
<line data-cap="butt" fill="none" stroke="currentColor" stroke-miterlimit="10" x1="17" y1="7" x2="23" y2="1"/>
|
||||
<polygon fill="none" stroke="currentColor" stroke-miterlimit="10" points="17,23 23,17 23,1 7,1 1,7 1,23 "/>
|
||||
<circle data-color="color-2" data-stroke="none" cx="12" cy="12" r="1" stroke-linejoin="miter" stroke-linecap="square" stroke="none"/>
|
||||
<circle data-color="color-2" data-stroke="none" cx="6" cy="12" r="1" stroke-linejoin="miter" stroke-linecap="square" stroke="none"/>
|
||||
<circle data-color="color-2" data-stroke="none" cx="12" cy="18" r="1" stroke-linejoin="miter" stroke-linecap="square" stroke="none"/>
|
||||
<circle data-color="color-2" data-stroke="none" cx="6" cy="18" r="1" stroke-linejoin="miter" stroke-linecap="square" stroke="none"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,7 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
|
||||
<g stroke-linecap="round" stroke-linejoin="round" stroke-width="2" stroke="currentColor">
|
||||
<polyline data-cap="butt" data-color="color-2" points="1 20 6 14 10 18 17 10 23 17" fill="none" stroke-miterlimit="10"/>
|
||||
<rect x="1" y="3" width="22" height="18" fill="none" stroke="currentColor" stroke-miterlimit="10"/>
|
||||
<circle data-color="color-2" cx="9" cy="8" r="2" fill="none" stroke-miterlimit="10"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 509 B |
@@ -0,0 +1,10 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
|
||||
<g class="nc-icon-wrapper" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" stroke="currentColor">
|
||||
<path fill="none" stroke="currentColor" stroke-miterlimit="10" d="M3,14V4 c0-0.552,0.448-1,1-1h16c0.552,0,1,0.448,1,1v6"/>
|
||||
<path fill="none" stroke="currentColor" stroke-miterlimit="10" d="M10,18H1v0 c0,1.657,1.343,3,3,3h6"/>
|
||||
<path data-cap="butt" data-color="color-2" fill="none" stroke-miterlimit="10" d="M14.126,17 c0.444-1.725,2.01-3,3.874-3c1.48,0,2.772,0.804,3.464,1.999"/>
|
||||
<polygon data-color="color-2" data-stroke="none" points="23.22,13.649 22.792,18 18.522,17.061 " stroke-linejoin="miter" stroke-linecap="square" stroke="none"/>
|
||||
<path data-cap="butt" data-color="color-2" fill="none" stroke-miterlimit="10" d="M21.874,20 c-0.444,1.725-2.01,3-3.874,3c-1.48,0-2.772-0.804-3.464-1.999"/>
|
||||
<polygon data-color="color-2" data-stroke="none" points="12.78,23.351 13.208,19 17.478,19.939 " stroke-linejoin="miter" stroke-linecap="square" stroke="none"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,5 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
|
||||
<g>
|
||||
<path d="M12,0C5.383,0,0,5.383,0,12s5.383,12,12,12s12-5.383,12-12S18.617,0,12,0z M19,13h-8V5h2v6h6V13z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 214 B |
@@ -0,0 +1,7 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
|
||||
<g stroke-linecap="round" stroke-linejoin="round" stroke-width="2" stroke="currentColor">
|
||||
<path data-cap="butt" fill="none" stroke="currentColor" stroke-miterlimit="10" d="M6.121,20.121 C7.727,21.22,9.907,22,12,22c5.523,0,10-4.477,10-10c0-5.523-4.477-10-10-10C8.101,2,4.728,4.233,3.078,7.488"/>
|
||||
<polyline fill="none" stroke="currentColor" stroke-miterlimit="10" points="2.278,1.588 3.078,7.488 9.078,6.688 "/>
|
||||
<circle data-color="color-2" fill="none" stroke-miterlimit="10" cx="4" cy="18" r="3"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 609 B |
@@ -0,0 +1,12 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
|
||||
<g stroke-linecap="round" stroke-linejoin="round" stroke-width="2" stroke="currentColor">
|
||||
<line data-cap="butt" data-color="color-2" x1="2" y1="6" x2="22" y2="6" fill="none" stroke-miterlimit="10"/>
|
||||
<line data-cap="butt" data-color="color-2" x1="12" y1="2" x2="12" y2="22" fill="none" stroke-miterlimit="10"/>
|
||||
<line data-cap="butt" data-color="color-2" x1="7" y1="2" x2="7" y2="6" fill="none" stroke-miterlimit="10"/>
|
||||
<line data-cap="butt" data-color="color-2" x1="17" y1="2" x2="17" y2="6" fill="none" stroke-miterlimit="10"/>
|
||||
<line data-cap="butt" data-color="color-2" x1="2" y1="18" x2="22" y2="18" fill="none" stroke-miterlimit="10"/>
|
||||
<line data-cap="butt" data-color="color-2" x1="7" y1="22" x2="7" y2="18" fill="none" stroke-miterlimit="10"/>
|
||||
<line data-cap="butt" data-color="color-2" x1="17" y1="22" x2="17" y2="18" fill="none" stroke-miterlimit="10"/>
|
||||
<rect x="2" y="2" width="20" height="20" fill="none" stroke="currentColor" stroke-miterlimit="10"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -6,6 +6,9 @@
|
||||
</a>
|
||||
</el-col>
|
||||
<el-col :span="18" class="copyright-right">
|
||||
<a target="_blank" href="https://motrix.app/license" rel="noopener noreferrer">
|
||||
{{ $t('about.license') }}
|
||||
</a>
|
||||
<a target="_blank" href="https://motrix.app/about" rel="noopener noreferrer">
|
||||
{{ $t('about.about') }}
|
||||
</a>
|
||||
|
||||
@@ -3,18 +3,18 @@
|
||||
<div class="aside-inner">
|
||||
<mo-logo-mini />
|
||||
<ul class="menu top-menu">
|
||||
<li @click="nav('/task')">
|
||||
<li @click="nav('/task')" class="non-draggable">
|
||||
<mo-icon name="menu-task" width="20" height="20" />
|
||||
</li>
|
||||
<li @click="showAddTask()">
|
||||
<li @click="showAddTask()" class="non-draggable">
|
||||
<mo-icon name="menu-add" width="20" height="20" />
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="menu bottom-menu">
|
||||
<li @click="nav('/preference')">
|
||||
<li @click="nav('/preference')" class="non-draggable">
|
||||
<mo-icon name="menu-preference" width="20" height="20" />
|
||||
</li>
|
||||
<li @click="showAboutPanel">
|
||||
<li @click="showAboutPanel" class="non-draggable">
|
||||
<mo-icon name="menu-about" width="20" height="20" />
|
||||
</li>
|
||||
</ul>
|
||||
@@ -45,9 +45,6 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open (link) {
|
||||
this.$electron.shell.openExternal(link)
|
||||
},
|
||||
showAddTask (taskType = 'uri') {
|
||||
this.$store.dispatch('app/showAddTaskDialog', taskType)
|
||||
},
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
import Icon from '@/components/Icons/Icon'
|
||||
|
||||
Icon.register({
|
||||
'audio': {
|
||||
'width': 24,
|
||||
'height': 24,
|
||||
'raw': `<rect x="4" y="3" width="16" height="18" fill="none" stroke="currentColor" stroke-miterlimit="10"/>
|
||||
<line data-color="color-2" x1="1" y1="6" x2="1" y2="18" fill="none" stroke-miterlimit="10"/>
|
||||
<line data-color="color-2" x1="23" y1="6" x2="23" y2="18" fill="none" stroke-miterlimit="10"/>
|
||||
<polyline data-cap="butt" points="10 15 10 8 16 8 16 14" fill="none" stroke="currentColor" stroke-miterlimit="10"/>
|
||||
<circle data-stroke="none" cx="9" cy="15" r="2" stroke="none"/>
|
||||
<circle data-stroke="none" cx="15" cy="14" r="2" stroke="none"/>`,
|
||||
'g': {
|
||||
'stroke': 'currentColor',
|
||||
'stroke-linecap': 'round',
|
||||
'stroke-linejoin': 'round',
|
||||
'stroke-width': '2'
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,21 @@
|
||||
import Icon from '@/components/Icons/Icon'
|
||||
|
||||
Icon.register({
|
||||
'dice': {
|
||||
'width': 24,
|
||||
'height': 24,
|
||||
'raw': `<polyline data-cap="butt" fill="none" stroke="currentColor" stroke-miterlimit="10" points="17,23 17,7 1,7 "/>
|
||||
<line data-cap="butt" fill="none" stroke="currentColor" stroke-miterlimit="10" x1="17" y1="7" x2="23" y2="1"/>
|
||||
<polygon fill="none" stroke="currentColor" stroke-miterlimit="10" points="17,23 23,17 23,1 7,1 1,7 1,23 "/>
|
||||
<circle data-color="color-2" data-stroke="none" cx="12" cy="12" r="1" stroke-linejoin="miter" stroke-linecap="square" stroke="none"/>
|
||||
<circle data-color="color-2" data-stroke="none" cx="6" cy="12" r="1" stroke-linejoin="miter" stroke-linecap="square" stroke="none"/>
|
||||
<circle data-color="color-2" data-stroke="none" cx="12" cy="18" r="1" stroke-linejoin="miter" stroke-linecap="square" stroke="none"/>
|
||||
<circle data-color="color-2" data-stroke="none" cx="6" cy="18" r="1" stroke-linejoin="miter" stroke-linecap="square" stroke="none"/>`,
|
||||
'g': {
|
||||
'stroke': 'currentColor',
|
||||
'stroke-linecap': 'round',
|
||||
'stroke-linejoin': 'round',
|
||||
'stroke-width': '2'
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,17 @@
|
||||
import Icon from '@/components/Icons/Icon'
|
||||
|
||||
Icon.register({
|
||||
'image': {
|
||||
'width': 24,
|
||||
'height': 24,
|
||||
'raw': `<polyline data-cap="butt" data-color="color-2" points="1 20 6 14 10 18 17 10 23 17" fill="none" stroke-miterlimit="10"/>
|
||||
<rect x="1" y="3" width="22" height="18" fill="none" stroke="currentColor" stroke-miterlimit="10"/>
|
||||
<circle data-color="color-2" cx="9" cy="8" r="2" fill="none" stroke-miterlimit="10"/>`,
|
||||
'g': {
|
||||
'stroke': 'currentColor',
|
||||
'stroke-linecap': 'round',
|
||||
'stroke-linejoin': 'round',
|
||||
'stroke-width': '2'
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -6,7 +6,7 @@ Icon.register({
|
||||
'height': 24,
|
||||
'raw': `<g stroke-linecap="round" stroke-linejoin="round" stroke-width="2">
|
||||
<path fill="none" stroke-miterlimit="10" d="M3,14V4 c0-0.552,0.448-1,1-1h16c0.552,0,1,0.448,1,1v6"></path>
|
||||
<path fill="none" stroke="#111111" stroke-miterlimit="10" d="M10,18H1v0 c0,1.657,1.343,3,3,3h6"></path>
|
||||
<path fill="none" stroke-miterlimit="10" d="M10,18H1v0 c0,1.657,1.343,3,3,3h6"></path>
|
||||
<path data-cap="butt" data-color="color-2" fill="none" stroke-miterlimit="10" d="M14.126,17 c0.444-1.725,2.01-3,3.874-3c1.48,0,2.772,0.804,3.464,1.999"></path>
|
||||
<polygon data-color="color-2" data-stroke="none" points="23.22,13.649 22.792,18 18.522,17.061 " stroke-linejoin="miter" stroke-linecap="square" stroke="none"></polygon>
|
||||
<path data-cap="butt" data-color="color-2" fill="none" stroke-miterlimit="10" d="M21.874,20 c-0.444,1.725-2.01,3-3.874,3c-1.48,0-2.772-0.804-3.464-1.999"></path>
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
import Icon from '@/components/Icons/Icon'
|
||||
|
||||
Icon.register({
|
||||
'task-history': {
|
||||
'width': 24,
|
||||
'height': 24,
|
||||
'paths': [{
|
||||
'd': 'M12,0C5.383,0,0,5.383,0,12s5.383,12,12,12s12-5.383,12-12S18.617,0,12,0z M19,13h-8V5h2v6h6V13z'
|
||||
}]
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,17 @@
|
||||
import Icon from '@/components/Icons/Icon'
|
||||
|
||||
Icon.register({
|
||||
'task-restart': {
|
||||
'width': 24,
|
||||
'height': 24,
|
||||
'raw': `<path data-cap="butt" fill="none" stroke="currentColor" stroke-miterlimit="10" d="M6.121,20.121 C7.727,21.22,9.907,22,12,22c5.523,0,10-4.477,10-10c0-5.523-4.477-10-10-10C8.101,2,4.728,4.233,3.078,7.488"/>
|
||||
<polyline fill="none" stroke="currentColor" stroke-miterlimit="10" points="2.278,1.588 3.078,7.488 9.078,6.688 "/>
|
||||
<circle data-color="color-2" fill="none" stroke-miterlimit="10" cx="4" cy="18" r="3"/>`,
|
||||
'g': {
|
||||
'stroke': 'currentColor',
|
||||
'stroke-linecap': 'round',
|
||||
'stroke-linejoin': 'round',
|
||||
'stroke-width': '2'
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,22 @@
|
||||
import Icon from '@/components/Icons/Icon'
|
||||
|
||||
Icon.register({
|
||||
'video': {
|
||||
'width': 24,
|
||||
'height': 24,
|
||||
'raw': `<line data-cap="butt" data-color="color-2" x1="2" y1="6" x2="22" y2="6" fill="none" stroke-miterlimit="10"/>
|
||||
<line data-cap="butt" data-color="color-2" x1="12" y1="2" x2="12" y2="22" fill="none" stroke-miterlimit="10"/>
|
||||
<line data-cap="butt" data-color="color-2" x1="7" y1="2" x2="7" y2="6" fill="none" stroke-miterlimit="10"/>
|
||||
<line data-cap="butt" data-color="color-2" x1="17" y1="2" x2="17" y2="6" fill="none" stroke-miterlimit="10"/>
|
||||
<line data-cap="butt" data-color="color-2" x1="2" y1="18" x2="22" y2="18" fill="none" stroke-miterlimit="10"/>
|
||||
<line data-cap="butt" data-color="color-2" x1="7" y1="22" x2="7" y2="18" fill="none" stroke-miterlimit="10"/>
|
||||
<line data-cap="butt" data-color="color-2" x1="17" y1="22" x2="17" y2="18" fill="none" stroke-miterlimit="10"/>
|
||||
<rect x="2" y="2" width="20" height="20" fill="none" stroke="currentColor" stroke-miterlimit="10"/>`,
|
||||
'g': {
|
||||
'stroke': 'currentColor',
|
||||
'stroke-linecap': 'round',
|
||||
'stroke-linejoin': 'round',
|
||||
'stroke-width': '2'
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -14,7 +14,6 @@
|
||||
import { mapState } from 'vuex'
|
||||
import AboutPanel from '@/components/About/AboutPanel'
|
||||
import Aside from '@/components/Aside/Index'
|
||||
import Subnav from '@/components/Subnav/Index'
|
||||
import Speedometer from '@/components/Speedometer/Speedometer'
|
||||
import AddTask from '@/components/Task/AddTask'
|
||||
import TaskItemInfo from '@/components/Task/TaskItemInfo'
|
||||
@@ -25,7 +24,6 @@
|
||||
components: {
|
||||
[AboutPanel.name]: AboutPanel,
|
||||
[Aside.name]: Aside,
|
||||
[Subnav.name]: Subnav,
|
||||
[Speedometer.name]: Speedometer,
|
||||
[AddTask.name]: AddTask,
|
||||
[TaskItemInfo.name]: TaskItemInfo,
|
||||
@@ -52,5 +50,6 @@
|
||||
position: fixed;
|
||||
right: 36px;
|
||||
bottom: 24px;
|
||||
z-index: 20;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -40,13 +40,13 @@
|
||||
})
|
||||
},
|
||||
watch: {
|
||||
downloadSpeed: function (val, oldVal) {
|
||||
downloadSpeed (val, oldVal) {
|
||||
showDownloadSpeedInDock(val)
|
||||
},
|
||||
numActive: function (val, oldVal) {
|
||||
numActive (val, oldVal) {
|
||||
this.downloading = val > 0
|
||||
},
|
||||
downloading: function (val, oldVal) {
|
||||
downloading (val, oldVal) {
|
||||
if (val !== oldVal && this.isRenderer) {
|
||||
this.$electron.ipcRenderer.send('download-status-change', val)
|
||||
}
|
||||
@@ -59,7 +59,7 @@
|
||||
console.warn(`fetchTaskItem fail: ${e.message}`)
|
||||
})
|
||||
},
|
||||
onDownloadStart: function (event) {
|
||||
onDownloadStart (event) {
|
||||
this.$store.dispatch('task/fetchList')
|
||||
this.$store.dispatch('app/resetInterval')
|
||||
console.log('aria2 onDownloadStart', event)
|
||||
@@ -71,7 +71,7 @@
|
||||
this.$msg.info(message)
|
||||
})
|
||||
},
|
||||
onDownloadPause: function (event) {
|
||||
onDownloadPause (event) {
|
||||
console.log('aria2 onDownloadPause')
|
||||
const [{ gid }] = event
|
||||
this.fetchTaskItem({ gid })
|
||||
@@ -81,7 +81,7 @@
|
||||
this.$msg.info(message)
|
||||
})
|
||||
},
|
||||
onDownloadStop: function (event) {
|
||||
onDownloadStop (event) {
|
||||
console.log('aria2 onDownloadStop')
|
||||
const [{ gid }] = event
|
||||
this.fetchTaskItem({ gid })
|
||||
@@ -91,17 +91,25 @@
|
||||
this.$msg.info(message)
|
||||
})
|
||||
},
|
||||
onDownloadError: function (event) {
|
||||
console.log('aria2 onDownloadError', event)
|
||||
onDownloadError (event) {
|
||||
const [{ gid }] = event
|
||||
this.fetchTaskItem({ gid })
|
||||
.then((task) => {
|
||||
const taskName = getTaskName(task)
|
||||
const { errorCode, errorMessage } = task
|
||||
console.error(`[Motrix] download error===> Gid: ${gid}, #${errorCode}, ${errorMessage}`)
|
||||
const message = this.$t('task.download-error-message', { taskName })
|
||||
this.$msg.error(message)
|
||||
const link = `<a target="_blank" href="https://github.com/agalwood/Motrix/wiki/Error#${errorCode}" rel="noopener noreferrer">#${errorCode}</a>`
|
||||
this.$msg({
|
||||
type: 'error',
|
||||
showClose: true,
|
||||
duration: 5000,
|
||||
dangerouslyUseHTMLString: true,
|
||||
message: `${message} ${link}`
|
||||
})
|
||||
})
|
||||
},
|
||||
onDownloadComplete: function (event) {
|
||||
onDownloadComplete (event) {
|
||||
console.log('aria2 onDownloadComplete')
|
||||
this.$store.dispatch('task/fetchList')
|
||||
const [{ gid }] = event
|
||||
@@ -110,7 +118,7 @@
|
||||
this.handleDownloadComplete(task, false)
|
||||
})
|
||||
},
|
||||
onBtDownloadComplete: function (event) {
|
||||
onBtDownloadComplete (event) {
|
||||
console.log('aria2 onBtDownloadComplete')
|
||||
this.$store.dispatch('task/fetchList')
|
||||
const [{ gid }] = event
|
||||
@@ -119,7 +127,7 @@
|
||||
this.handleDownloadComplete(task, true)
|
||||
})
|
||||
},
|
||||
handleDownloadComplete: function (task, isBT) {
|
||||
handleDownloadComplete (task, isBT) {
|
||||
const path = getTaskFullPath(task)
|
||||
|
||||
addToRecentTask(task)
|
||||
@@ -127,7 +135,7 @@
|
||||
|
||||
this.showTaskCompleteNotify(task, isBT, path)
|
||||
},
|
||||
showTaskCompleteNotify: function (task, isBT, path) {
|
||||
showTaskCompleteNotify (task, isBT, path) {
|
||||
const taskName = getTaskName(task)
|
||||
const message = isBT
|
||||
? this.$t('task.bt-download-complete-message', { taskName })
|
||||
@@ -156,7 +164,7 @@
|
||||
})
|
||||
}
|
||||
},
|
||||
showTaskErrorNotify: function (task) {
|
||||
showTaskErrorNotify (task) {
|
||||
const taskName = getTaskName(task)
|
||||
|
||||
const message = this.$t('task.download-fail-message', { taskName })
|
||||
@@ -171,7 +179,7 @@
|
||||
body: taskName
|
||||
})
|
||||
},
|
||||
bindEngineEvents: function () {
|
||||
bindEngineEvents () {
|
||||
api.client.on('onDownloadStart', this.onDownloadStart)
|
||||
// api.client.on('onDownloadPause', this.onDownloadPause)
|
||||
api.client.on('onDownloadStop', this.onDownloadStop)
|
||||
@@ -179,7 +187,7 @@
|
||||
api.client.on('onDownloadError', this.onDownloadError)
|
||||
api.client.on('onBtDownloadComplete', this.onBtDownloadComplete)
|
||||
},
|
||||
unbindEngineEvents: function () {
|
||||
unbindEngineEvents () {
|
||||
api.client.removeListener('onDownloadStart', this.onDownloadStart)
|
||||
// api.client.removeListener('onDownloadPause', this.onDownloadPause)
|
||||
api.client.removeListener('onDownloadStop', this.onDownloadStop)
|
||||
@@ -187,33 +195,37 @@
|
||||
api.client.removeListener('onDownloadError', this.onDownloadError)
|
||||
api.client.removeListener('onBtDownloadComplete', this.onBtDownloadComplete)
|
||||
},
|
||||
startPolling: function () {
|
||||
startPolling () {
|
||||
this.timer = setTimeout(() => {
|
||||
this.polling()
|
||||
this.startPolling()
|
||||
}, this.interval)
|
||||
},
|
||||
polling: function () {
|
||||
polling () {
|
||||
this.$store.dispatch('app/fetchGlobalStat')
|
||||
this.$store.dispatch('task/fetchList')
|
||||
|
||||
if (this.taskItemInfoVisible && this.currentTaskItem) {
|
||||
this.$store.dispatch('task/fetchItem', this.currentTaskItem.gid)
|
||||
}
|
||||
},
|
||||
stopPolling: function () {
|
||||
stopPolling () {
|
||||
clearTimeout(this.timer)
|
||||
this.timer = null
|
||||
}
|
||||
},
|
||||
created: function () {
|
||||
this.$store.dispatch('app/fetchEngineInfo')
|
||||
this.$store.dispatch('app/fetchEngineOptions')
|
||||
|
||||
this.startPolling()
|
||||
|
||||
created () {
|
||||
this.bindEngineEvents()
|
||||
},
|
||||
destroyed: function () {
|
||||
mounted () {
|
||||
setTimeout(() => {
|
||||
this.$store.dispatch('app/fetchEngineInfo')
|
||||
this.$store.dispatch('app/fetchEngineOptions')
|
||||
|
||||
this.startPolling()
|
||||
}, 100)
|
||||
},
|
||||
destroyed () {
|
||||
this.$store.dispatch('task/saveSession')
|
||||
|
||||
this.unbindEngineEvents()
|
||||
|
||||
@@ -62,9 +62,13 @@ export function moveTaskFilesToTrash (task, messages = {}) {
|
||||
return false
|
||||
}
|
||||
|
||||
const deleteResult1 = remote.shell.moveItemToTrash(path)
|
||||
if (!deleteResult1 && delFailMsg) {
|
||||
Message.error(delFailMsg)
|
||||
let deleteResult1 = true
|
||||
const isFileExist = existsSync(path)
|
||||
if (isFileExist) {
|
||||
deleteResult1 = remote.shell.moveItemToTrash(path)
|
||||
if (!deleteResult1 && delFailMsg) {
|
||||
Message.error(delFailMsg)
|
||||
}
|
||||
}
|
||||
|
||||
let deleteResult2 = true
|
||||
|
||||
@@ -11,32 +11,18 @@
|
||||
size="mini"
|
||||
:model="form"
|
||||
:rules="rules">
|
||||
<el-form-item :label="`${$t('preferences.appearance')}: `" :label-width="formLabelWidth">
|
||||
<el-form-item :label="`${$t('preferences.auto-update')}: `" :label-width="formLabelWidth">
|
||||
<el-col class="form-item-sub" :span="24">
|
||||
<mo-theme-switcher
|
||||
v-model="form.theme"
|
||||
@change="handleThemeChange"
|
||||
/>
|
||||
</el-col>
|
||||
<el-col v-if="showHideAppMenuOption" class="form-item-sub" :span="16">
|
||||
<el-checkbox v-model="form.hideAppMenu">
|
||||
{{ $t('preferences.hide-app-menu') }}
|
||||
<el-checkbox v-model="form.autoCheckUpdate">
|
||||
{{ $t('preferences.auto-check-update') }}
|
||||
</el-checkbox>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<el-form-item :label="`${$t('preferences.language')}: `" :label-width="formLabelWidth">
|
||||
<el-col class="form-item-sub" :span="16">
|
||||
<el-select
|
||||
v-model="form.locale"
|
||||
@change="handleLocaleChange"
|
||||
:placeholder="$t('preferences.change-language')">
|
||||
<el-option
|
||||
v-for="item in locales"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<div class="el-form-item__info" style="margin-top: 8px;" v-if="form.lastCheckUpdateTime !== 0">
|
||||
{{ $t('preferences.last-check-update-time') + ': ' + (form.lastCheckUpdateTime !== 0 ? new
|
||||
Date(form.lastCheckUpdateTime).toLocaleString() : new Date().toLocaleString()) }}
|
||||
<span class="action-link" @click.prevent="onCheckUpdateClick">
|
||||
{{ $t('app.check-updates-now') }}
|
||||
</span>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<el-form-item :label="`${$t('preferences.proxy')}: `" :label-width="formLabelWidth">
|
||||
@@ -47,7 +33,7 @@
|
||||
>
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item label="" :label-width="formLabelWidth" v-if="form.useProxy">
|
||||
<el-form-item :label-width="formLabelWidth" v-if="form.useProxy">
|
||||
<el-col class="form-item-sub" :span="16">
|
||||
<el-input
|
||||
placeholder="[http://][USER:PASSWORD@]HOST[:PORT]"
|
||||
@@ -80,7 +66,7 @@
|
||||
width="12"
|
||||
height="12"
|
||||
:spin="true"
|
||||
v-if="isSyncTracker"
|
||||
v-if="trackerSyncing"
|
||||
/>
|
||||
<mo-icon name="sync" width="12" height="12" v-else />
|
||||
</el-button>
|
||||
@@ -95,7 +81,26 @@
|
||||
</a>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item :label="`${$t('preferences.developer')}: `" :label-width="formLabelWidth">
|
||||
<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.protocols.magnet"
|
||||
:active-text="$t('preferences.protocols-magnet')"
|
||||
@change="(val) => onProtocolsChange('magnet', val)"
|
||||
>
|
||||
</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')"
|
||||
@change="(val) => onProtocolsChange('thunder', val)"
|
||||
>
|
||||
</el-switch>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<el-form-item :label="`${$t('preferences.security')}: `" :label-width="formLabelWidth">
|
||||
<el-col class="form-item-sub" :span="24">
|
||||
{{ $t('preferences.mock-user-agent') }}
|
||||
<el-input
|
||||
@@ -111,6 +116,27 @@
|
||||
<el-button @click="() => changeUA('du')">du</el-button>
|
||||
</el-button-group>
|
||||
</el-col>
|
||||
<el-col class="form-item-sub" :span="18">
|
||||
{{ $t('preferences.rpc-secret') }}
|
||||
<el-input
|
||||
:show-password="hideRpcSecret"
|
||||
placeholder="RPC Secret"
|
||||
:maxlength="24"
|
||||
v-model="form.rpcSecret"
|
||||
>
|
||||
<i slot="append" @click.prevent="onDiceClick">
|
||||
<mo-icon name="dice" width="12" height="12" />
|
||||
</i>
|
||||
</el-input>
|
||||
<div class="el-form-item__info" style="margin-top: 8px;">
|
||||
<a target="_blank" href="https://github.com/agalwood/Motrix/wiki/RPC" rel="noopener noreferrer">
|
||||
{{ $t('preferences.rpc-secret-tips') }}
|
||||
<mo-icon name="link" width="12" height="12" />
|
||||
</a>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<el-form-item :label="`${$t('preferences.developer')}: `" :label-width="formLabelWidth">
|
||||
<el-col class="form-item-sub" :span="24">
|
||||
{{ $t('preferences.app-log-path') }}
|
||||
<el-input placeholder="" disabled v-model="logPath">
|
||||
@@ -149,14 +175,19 @@
|
||||
<script>
|
||||
import is from 'electron-is'
|
||||
import { mapState } from 'vuex'
|
||||
import ThemeSwitcher from '@/components/Preference/ThemeSwitcher'
|
||||
import { cloneDeep } from 'lodash'
|
||||
import randomize from 'randomatic'
|
||||
import * as clipboard from 'clipboard-polyfill'
|
||||
import ShowInFolder from '@/components/Native/ShowInFolder'
|
||||
import userAgentMap from '@shared/ua'
|
||||
import { availableLanguages, getLanguage } from '@shared/locales'
|
||||
import { getLocaleManager } from '@/components/Locale'
|
||||
import {
|
||||
convertToTextRows
|
||||
buildRpcUrl,
|
||||
calcFormLabelWidth,
|
||||
convertCommaToLine,
|
||||
convertLineToComma,
|
||||
diffConfig
|
||||
} from '@shared/utils'
|
||||
import '@/components/Icons/dice'
|
||||
import '@/components/Icons/sync'
|
||||
import '@/components/Icons/refresh'
|
||||
|
||||
@@ -164,20 +195,28 @@
|
||||
const {
|
||||
allProxy,
|
||||
allProxyBackup,
|
||||
autoCheckUpdate,
|
||||
btTracker,
|
||||
hideAppMenu,
|
||||
locale,
|
||||
theme,
|
||||
lastCheckUpdateTime,
|
||||
protocols,
|
||||
rpcListenPort,
|
||||
rpcSecret,
|
||||
useProxy,
|
||||
userAgent
|
||||
} = config
|
||||
const result = {
|
||||
allProxy,
|
||||
allProxyBackup,
|
||||
btTracker: convertToTextRows(btTracker),
|
||||
autoCheckUpdate,
|
||||
btTracker: convertCommaToLine(btTracker),
|
||||
hideAppMenu,
|
||||
locale,
|
||||
theme,
|
||||
lastCheckUpdateTime,
|
||||
protocols: {
|
||||
...protocols
|
||||
},
|
||||
rpcListenPort,
|
||||
rpcSecret,
|
||||
useProxy,
|
||||
userAgent
|
||||
}
|
||||
@@ -187,17 +226,18 @@
|
||||
export default {
|
||||
name: 'mo-preference-advanced',
|
||||
components: {
|
||||
[ThemeSwitcher.name]: ThemeSwitcher,
|
||||
[ShowInFolder.name]: ShowInFolder
|
||||
},
|
||||
data: function () {
|
||||
const { locale } = this.$store.state.preference.config
|
||||
const form = initialForm(this.$store.state.preference.config)
|
||||
return {
|
||||
formLabelWidth: '23%',
|
||||
form: initialForm(this.$store.state.preference.config),
|
||||
isSyncTracker: false,
|
||||
form,
|
||||
formLabelWidth: calcFormLabelWidth(locale),
|
||||
formOriginal: cloneDeep(form),
|
||||
hideRpcSecret: true,
|
||||
rules: {},
|
||||
color: '#c00',
|
||||
locales: availableLanguages
|
||||
trackerSyncing: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -214,29 +254,43 @@
|
||||
})
|
||||
},
|
||||
watch: {
|
||||
'form.rpcSecret': function (val) {
|
||||
const url = buildRpcUrl({
|
||||
port: this.form.rpcListenPort,
|
||||
secret: val
|
||||
})
|
||||
clipboard.writeText(url)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
isRenderer: is.renderer,
|
||||
handleLocaleChange (locale) {
|
||||
const lng = getLanguage(locale)
|
||||
getLocaleManager().changeLanguage(lng)
|
||||
this.$electron.ipcRenderer.send('command', 'application:change-locale', lng)
|
||||
},
|
||||
handleThemeChange (theme) {
|
||||
this.form.theme = theme
|
||||
this.$electron.ipcRenderer.send('command', 'application:change-theme', theme)
|
||||
onCheckUpdateClick () {
|
||||
this.$electron.ipcRenderer.send('command', 'application:check-for-updates')
|
||||
this.$msg.info(this.$t('app.checking-for-updates'))
|
||||
this.$store.dispatch('preference/fetchPreference')
|
||||
.then((config) => {
|
||||
const { lastCheckUpdateTime } = config
|
||||
this.form.lastCheckUpdateTime = lastCheckUpdateTime
|
||||
})
|
||||
},
|
||||
syncTrackerFromGitHub () {
|
||||
this.isSyncTracker = true
|
||||
this.trackerSyncing = true
|
||||
this.$store.dispatch('preference/fetchBtTracker')
|
||||
.then((data) => {
|
||||
console.log('syncTrackerFromGitHub data====>', data)
|
||||
this.form.btTracker = data
|
||||
})
|
||||
.finally(() => {
|
||||
this.isSyncTracker = false
|
||||
this.trackerSyncing = false
|
||||
})
|
||||
},
|
||||
onProtocolsChange (protocol, enabled) {
|
||||
const { protocols } = this.form
|
||||
this.form.protocols = {
|
||||
...protocols,
|
||||
[protocol]: enabled
|
||||
}
|
||||
},
|
||||
onUseProxyChange (flag) {
|
||||
this.form.allProxy = flag ? this.form.allProxyBackup : ''
|
||||
},
|
||||
@@ -250,6 +304,15 @@
|
||||
}
|
||||
this.form.userAgent = ua
|
||||
},
|
||||
onDiceClick () {
|
||||
this.hideRpcSecret = false
|
||||
const rpcSecret = randomize('Aa0', 12)
|
||||
this.form.rpcSecret = rpcSecret
|
||||
|
||||
setTimeout(() => {
|
||||
this.hideRpcSecret = true
|
||||
}, 2000)
|
||||
},
|
||||
onFactoryResetClick () {
|
||||
this.$electron.remote.dialog.showMessageBox({
|
||||
type: 'warning',
|
||||
@@ -269,11 +332,27 @@
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
const changed = diffConfig(this.formOriginal, this.form)
|
||||
const data = {
|
||||
...changed,
|
||||
btTracker: convertLineToComma(this.form.btTracker),
|
||||
protocols: {
|
||||
...this.form.protocols
|
||||
}
|
||||
}
|
||||
console.log('changed====》', data)
|
||||
|
||||
this.$store.dispatch('preference/save', data)
|
||||
.then(() => {
|
||||
this.$store.dispatch('app/fetchEngineOptions')
|
||||
this.$msg.success(this.$t('preferences.save-success-message'))
|
||||
})
|
||||
.catch(() => {
|
||||
this.$msg.success(this.$t('preferences.save-fail-message'))
|
||||
})
|
||||
|
||||
console.log('this.form===>', this.form)
|
||||
this.$store.dispatch('preference/save', this.form)
|
||||
if (this.isRenderer()) {
|
||||
this.$electron.ipcRenderer.send('command', 'application:relaunch')
|
||||
this.$electron.ipcRenderer.send('command', 'application:setup-protocols-client', data.protocols)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -11,21 +11,54 @@
|
||||
size="mini"
|
||||
:model="form"
|
||||
:rules="rules">
|
||||
<el-form-item :label="`${$t('preferences.appearance')}: `" :label-width="formLabelWidth">
|
||||
<el-col class="form-item-sub" :span="24">
|
||||
<mo-theme-switcher
|
||||
v-model="form.theme"
|
||||
@change="handleThemeChange"
|
||||
/>
|
||||
</el-col>
|
||||
<el-col v-if="showHideAppMenuOption" class="form-item-sub" :span="16">
|
||||
<el-checkbox v-model="form.hideAppMenu">
|
||||
{{ $t('preferences.hide-app-menu') }}
|
||||
</el-checkbox>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<el-form-item :label="`${$t('preferences.language')}: `" :label-width="formLabelWidth">
|
||||
<el-col class="form-item-sub" :span="16">
|
||||
<el-select
|
||||
v-model="form.locale"
|
||||
@change="handleLocaleChange"
|
||||
:placeholder="$t('preferences.change-language')">
|
||||
<el-option
|
||||
v-for="item in locales"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<el-form-item :label="`${$t('preferences.startup')}: `" :label-width="formLabelWidth">
|
||||
<el-col
|
||||
class="form-item-sub"
|
||||
:span="24"
|
||||
v-if="!isLinux()"
|
||||
>
|
||||
<el-checkbox v-model="form.openAtLogin">
|
||||
{{ $t('preferences.open-at-login') }}
|
||||
</el-checkbox>
|
||||
</el-col>
|
||||
<el-col class="form-item-sub" :span="24">
|
||||
<el-checkbox v-model="form.keepWindowState">
|
||||
{{ $t('preferences.keep-window-state') }}
|
||||
</el-checkbox>
|
||||
</el-col>
|
||||
<el-col class="form-item-sub" :span="24">
|
||||
<el-checkbox v-model="form.resumeAllWhenAppLaunched">
|
||||
{{ $t('preferences.auto-resume-all') }}
|
||||
</el-checkbox>
|
||||
</el-col>
|
||||
<el-col class="form-item-sub" :span="24">
|
||||
<el-checkbox v-model="form.autoCheckUpdate">
|
||||
{{ $t('preferences.auto-check-update') }}
|
||||
</el-checkbox>
|
||||
<div class="el-form-item__info" style="margin-top: 8px;" v-if="form.lastCheckUpdateTime !== 0">
|
||||
{{ $t('preferences.last-check-update-time') + ': ' + (form.lastCheckUpdateTime !== 0 ? new
|
||||
Date(form.lastCheckUpdateTime).toLocaleString() : new Date().toLocaleString()) }}
|
||||
</div>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<el-form-item :label="`${$t('preferences.default-dir')}: `" :label-width="formLabelWidth">
|
||||
<el-input placeholder="" v-model="downloadDir" :readonly="isMas()">
|
||||
@@ -39,6 +72,30 @@
|
||||
{{ $t('preferences.mas-default-dir-tips') }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item :label="`${$t('preferences.transfer-settings')}: `" :label-width="formLabelWidth">
|
||||
<el-col class="form-item-sub" :span="24">
|
||||
{{ $t('preferences.transfer-speed-upload') }}
|
||||
<el-select v-model="form.maxOverallUploadLimit">
|
||||
<el-option
|
||||
v-for="item in speedOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col class="form-item-sub" :span="24">
|
||||
{{ $t('preferences.transfer-speed-download') }}
|
||||
<el-select v-model="form.maxOverallDownloadLimit">
|
||||
<el-option
|
||||
v-for="item in speedOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<el-form-item :label="`${$t('preferences.task-manage')}: `" :label-width="formLabelWidth">
|
||||
<el-col class="form-item-sub" :span="24">
|
||||
{{ $t('preferences.max-concurrent-downloads') }}
|
||||
@@ -88,32 +145,47 @@
|
||||
<script>
|
||||
import is from 'electron-is'
|
||||
import { mapState } from 'vuex'
|
||||
import { cloneDeep } from 'lodash'
|
||||
import SelectDirectory from '@/components/Native/SelectDirectory'
|
||||
import ThemeSwitcher from '@/components/Preference/ThemeSwitcher'
|
||||
import { availableLanguages, getLanguage } from '@shared/locales'
|
||||
import { getLocaleManager } from '@/components/Locale'
|
||||
import { prettifyDir } from '@/components/Native/utils'
|
||||
import { calcFormLabelWidth, diffConfig } from '@shared/utils'
|
||||
|
||||
const initialForm = (config) => {
|
||||
const {
|
||||
dir,
|
||||
split,
|
||||
resumeAllWhenAppLaunched,
|
||||
hideAppMenu,
|
||||
keepWindowState,
|
||||
locale,
|
||||
maxConcurrentDownloads,
|
||||
maxConnectionPerServer,
|
||||
taskNotification,
|
||||
autoCheckUpdate,
|
||||
maxOverallUploadLimit,
|
||||
maxOverallDownloadLimit,
|
||||
newTaskShowDownloading,
|
||||
lastCheckUpdateTime
|
||||
openAtLogin,
|
||||
resumeAllWhenAppLaunched,
|
||||
split,
|
||||
taskNotification,
|
||||
theme
|
||||
} = config
|
||||
const result = {
|
||||
dir,
|
||||
split,
|
||||
continue: config.continue,
|
||||
resumeAllWhenAppLaunched,
|
||||
dir,
|
||||
hideAppMenu,
|
||||
keepWindowState,
|
||||
locale,
|
||||
maxConcurrentDownloads,
|
||||
maxConnectionPerServer,
|
||||
taskNotification,
|
||||
autoCheckUpdate,
|
||||
maxOverallUploadLimit,
|
||||
maxOverallDownloadLimit,
|
||||
newTaskShowDownloading,
|
||||
lastCheckUpdateTime
|
||||
openAtLogin,
|
||||
resumeAllWhenAppLaunched,
|
||||
split,
|
||||
taskNotification,
|
||||
theme
|
||||
}
|
||||
return result
|
||||
}
|
||||
@@ -121,19 +193,28 @@
|
||||
export default {
|
||||
name: 'mo-preference-basic',
|
||||
components: {
|
||||
[SelectDirectory.name]: SelectDirectory
|
||||
[SelectDirectory.name]: SelectDirectory,
|
||||
[ThemeSwitcher.name]: ThemeSwitcher
|
||||
},
|
||||
data: function () {
|
||||
const { locale } = this.$store.state.preference.config
|
||||
const form = initialForm(this.$store.state.preference.config)
|
||||
return {
|
||||
formLabelWidth: '23%',
|
||||
form: initialForm(this.$store.state.preference.config),
|
||||
rules: {}
|
||||
form,
|
||||
formLabelWidth: calcFormLabelWidth(locale),
|
||||
formOriginal: cloneDeep(form),
|
||||
locales: availableLanguages,
|
||||
rules: {},
|
||||
speedOptions: this.buildSpeedOptions()
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
title: function () {
|
||||
return this.$t('preferences.basic')
|
||||
},
|
||||
showHideAppMenuOption: function () {
|
||||
return is.windows() || is.linux()
|
||||
},
|
||||
downloadDir: function () {
|
||||
return prettifyDir(this.form.dir)
|
||||
},
|
||||
@@ -144,6 +225,45 @@
|
||||
methods: {
|
||||
isRenderer: is.renderer,
|
||||
isMas: is.mas,
|
||||
isLinux: is.linux,
|
||||
handleLocaleChange (locale) {
|
||||
const lng = getLanguage(locale)
|
||||
getLocaleManager().changeLanguage(lng)
|
||||
this.speedOptions = this.buildSpeedOptions()
|
||||
this.$electron.ipcRenderer.send('command', 'application:change-locale', lng)
|
||||
},
|
||||
handleThemeChange (theme) {
|
||||
this.form.theme = theme
|
||||
this.$electron.ipcRenderer.send('command', 'application:change-theme', theme)
|
||||
},
|
||||
buildSpeedOptions () {
|
||||
return [
|
||||
{
|
||||
label: this.$t('preferences.transfer-speed-unlimited'),
|
||||
value: 0
|
||||
},
|
||||
{
|
||||
label: '128 KB/s',
|
||||
value: '128K'
|
||||
},
|
||||
{
|
||||
label: '512 KB/s',
|
||||
value: '512K'
|
||||
},
|
||||
{
|
||||
label: '1 MB/s',
|
||||
value: '1M'
|
||||
},
|
||||
{
|
||||
label: '5 MB/s',
|
||||
value: '5M'
|
||||
},
|
||||
{
|
||||
label: '10 MB/s',
|
||||
value: '10M'
|
||||
}
|
||||
]
|
||||
},
|
||||
onDirectorySelected (dir) {
|
||||
this.form.dir = dir
|
||||
},
|
||||
@@ -154,9 +274,24 @@
|
||||
return false
|
||||
}
|
||||
|
||||
this.$store.dispatch('preference/save', this.form)
|
||||
const { openAtLogin } = this.form
|
||||
const changed = diffConfig(this.formOriginal, this.form)
|
||||
const data = {
|
||||
...changed
|
||||
}
|
||||
console.log('changed====》', data)
|
||||
|
||||
this.$store.dispatch('preference/save', data)
|
||||
.then(() => {
|
||||
this.$store.dispatch('app/fetchEngineOptions')
|
||||
this.$msg.success(this.$t('preferences.save-success-message'))
|
||||
})
|
||||
.catch(() => {
|
||||
this.$msg.success(this.$t('preferences.save-fail-message'))
|
||||
})
|
||||
|
||||
if (this.isRenderer()) {
|
||||
this.$electron.ipcRenderer.send('command', 'application:relaunch')
|
||||
this.$electron.ipcRenderer.send('command', 'application:open-at-login', openAtLogin)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
<script>
|
||||
export default {
|
||||
name: 'mo-content-preference',
|
||||
props: {
|
||||
},
|
||||
computed: {
|
||||
},
|
||||
components: {
|
||||
@@ -25,7 +23,13 @@
|
||||
.form-preference {
|
||||
padding-right: 7%;
|
||||
.el-switch__label {
|
||||
font-weight: $--font-weight-secondary;
|
||||
font-weight: normal;
|
||||
color: $--color-text-regular;
|
||||
&.is-active {
|
||||
color: $--color-text-regular;
|
||||
}
|
||||
}
|
||||
.el-checkbox__input.is-checked + .el-checkbox__label {
|
||||
color: $--color-text-regular;
|
||||
}
|
||||
.el-form-item {
|
||||
@@ -42,13 +46,13 @@
|
||||
}
|
||||
}
|
||||
.el-form-item.el-form-item--mini {
|
||||
margin-bottom: 24px;
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
.el-form-item__content {
|
||||
color: $--color-text-regular;
|
||||
}
|
||||
.form-item-sub {
|
||||
margin-bottom: 12px;
|
||||
margin-bottom: 8px;
|
||||
&:last-of-type {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
@@ -59,7 +63,19 @@
|
||||
bottom: 0;
|
||||
left: auto;
|
||||
z-index: 10;
|
||||
width: -webkit-fill-available;
|
||||
box-sizing: border-box;
|
||||
padding: 24px 36px 24px 0;
|
||||
padding: 24px 36px;
|
||||
margin-left: -36px;
|
||||
// aside.width + subnav.width + padding-left + scrollbar.width
|
||||
margin-right: 322px;
|
||||
}
|
||||
.action-link {
|
||||
cursor: pointer;
|
||||
color: $--link-color;
|
||||
&:hover {
|
||||
color: $--link-hover-color;
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -16,15 +16,6 @@
|
||||
{{ $t('preferences.lab-warning') }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item :label="`${$t('preferences.download-protocol')}: `" :label-width="formLabelWidth">
|
||||
<el-col class="form-item-sub" :span="24">
|
||||
<el-switch
|
||||
v-model="form.enableEggFeatures"
|
||||
:active-text="$t('preferences.support-more-download-protocols')"
|
||||
>
|
||||
</el-switch>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<el-form-item :label="`${$t('preferences.browser-extensions')}: `" :label-width="formLabelWidth">
|
||||
<el-col class="form-item-sub" :span="24">
|
||||
<a target="_blank" href="https://motrix.app/release/BaiduExporter.zip" rel="noopener noreferrer">
|
||||
@@ -52,13 +43,14 @@
|
||||
import is from 'electron-is'
|
||||
import { mapState } from 'vuex'
|
||||
import '@/components/Icons/info-square'
|
||||
import {
|
||||
calcFormLabelWidth
|
||||
} from '@shared/utils'
|
||||
|
||||
const initialForm = (config) => {
|
||||
const {
|
||||
enableEggFeatures
|
||||
} = config
|
||||
// const {
|
||||
// } = config
|
||||
const result = {
|
||||
enableEggFeatures
|
||||
}
|
||||
return result
|
||||
}
|
||||
@@ -68,9 +60,11 @@
|
||||
components: {
|
||||
},
|
||||
data: function () {
|
||||
const { locale } = this.$store.state.preference.config
|
||||
const form = initialForm(this.$store.state.preference.config)
|
||||
return {
|
||||
formLabelWidth: '23%',
|
||||
form: initialForm(this.$store.state.preference.config),
|
||||
form,
|
||||
formLabelWidth: calcFormLabelWidth(locale),
|
||||
rules: {}
|
||||
}
|
||||
},
|
||||
@@ -97,7 +91,6 @@
|
||||
console.log('this.form===>', this.form)
|
||||
this.$store.dispatch('preference/save', this.form)
|
||||
if (this.isRenderer()) {
|
||||
this.$electron.ipcRenderer.send('command', 'application:relaunch')
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
<template>
|
||||
<el-aside width="200px" class="subnav">
|
||||
<router-view name="subnav" />
|
||||
</el-aside>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'mo-subnav',
|
||||
components: {
|
||||
},
|
||||
computed: {
|
||||
},
|
||||
methods: {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
</style>
|
||||
@@ -5,6 +5,7 @@
|
||||
:visible.sync="visible"
|
||||
:before-close="handleClose"
|
||||
@open="handleOpen"
|
||||
@opened="handleOpened"
|
||||
@closed="handleClosed">
|
||||
<el-form
|
||||
ref="taskForm"
|
||||
@@ -21,6 +22,7 @@
|
||||
auto-complete="off"
|
||||
:placeholder="$t('task.uri-task-tips')"
|
||||
@change="handleUriChange"
|
||||
@paste.native="handleUriPaste"
|
||||
v-model="form.uris">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
@@ -28,7 +30,6 @@
|
||||
<el-tab-pane
|
||||
:label="$t('task.torrent-task')"
|
||||
name="torrent"
|
||||
v-if="iLoveEggFeatures"
|
||||
>
|
||||
<el-form-item>
|
||||
<mo-select-torrent
|
||||
@@ -115,26 +116,31 @@
|
||||
import SelectDirectory from '@/components/Native/SelectDirectory'
|
||||
import SelectTorrent from '@/components/Task/SelectTorrent'
|
||||
import { prettifyDir } from '@/components/Native/utils'
|
||||
import '@/components/Icons/inbox'
|
||||
import {
|
||||
NONE_SELECTED_FILES,
|
||||
SELECTED_ALL_FILES
|
||||
} from '@shared/constants'
|
||||
import {
|
||||
detectResource,
|
||||
splitTaskLinks,
|
||||
needCheckCopyright
|
||||
splitTaskLinks
|
||||
} from '@shared/utils'
|
||||
import '@/components/Icons/inbox'
|
||||
|
||||
const initialForm = (state) => {
|
||||
const { addTaskUrl } = state.app
|
||||
const { addTaskUrl, addTaskOptions } = state.app
|
||||
const { dir, split, newTaskShowDownloading } = state.preference.config
|
||||
const result = {
|
||||
uris: addTaskUrl,
|
||||
torrent: '',
|
||||
selectFile: NONE_SELECTED_FILES,
|
||||
out: '',
|
||||
userAgent: '',
|
||||
referer: '',
|
||||
cookie: '',
|
||||
dir,
|
||||
split,
|
||||
newTaskShowDownloading
|
||||
newTaskShowDownloading,
|
||||
...addTaskOptions
|
||||
}
|
||||
return result
|
||||
}
|
||||
@@ -159,7 +165,6 @@
|
||||
return {
|
||||
formLabelWidth: '100px',
|
||||
showAdvanced: false,
|
||||
torrentName: '',
|
||||
form: {},
|
||||
rules: {}
|
||||
}
|
||||
@@ -176,10 +181,7 @@
|
||||
}),
|
||||
...mapState('preference', {
|
||||
config: state => state.config
|
||||
}),
|
||||
iLoveEggFeatures: function () {
|
||||
return !this.isMas() || (this.isMas() && this.config.enableEggFeatures)
|
||||
}
|
||||
})
|
||||
},
|
||||
watch: {
|
||||
taskType: function (current, previous) {
|
||||
@@ -216,8 +218,12 @@
|
||||
this.form.uris = content
|
||||
}
|
||||
},
|
||||
handleOpened () {
|
||||
this.detectThunderResource(this.form.uris)
|
||||
},
|
||||
handleClose (done) {
|
||||
this.$store.dispatch('app/hideAddTaskDialog')
|
||||
this.$store.dispatch('app/updateAddTaskOptions', {})
|
||||
},
|
||||
handleClosed () {
|
||||
this.reset()
|
||||
@@ -225,10 +231,13 @@
|
||||
handleTabClick (tab, event) {
|
||||
this.$store.dispatch('app/changeAddTaskType', tab.name)
|
||||
},
|
||||
handleUriChange () {
|
||||
// el-input does not support @paste event ?
|
||||
// https://github.com/ElemeFE/element/blob/master/packages/input/src/input.vue
|
||||
const { uris } = this.form
|
||||
handleUriPaste () {
|
||||
setImmediate(() => {
|
||||
const uris = this.$refs.uri.value
|
||||
this.detectThunderResource(uris)
|
||||
})
|
||||
},
|
||||
detectThunderResource (uris = '') {
|
||||
if (uris.includes('thunder://')) {
|
||||
this.$msg({
|
||||
type: 'warning',
|
||||
@@ -237,10 +246,12 @@
|
||||
})
|
||||
}
|
||||
},
|
||||
handleTorrentChange (torrent, file, fileList) {
|
||||
// TODO 种子选择部分文件下载
|
||||
// console.log('handleTorrentChange===>', torrent, file, fileList)
|
||||
handleUriChange () {
|
||||
console.log('handleUriChange===>', this.form.uris)
|
||||
},
|
||||
handleTorrentChange (torrent, selectedFileIndex) {
|
||||
this.form.torrent = torrent
|
||||
this.form.selectFile = selectedFileIndex
|
||||
},
|
||||
handleSplitChange (value) {
|
||||
console.log('handleSplitChange===>', value)
|
||||
@@ -249,6 +260,7 @@
|
||||
this.form.dir = dir
|
||||
},
|
||||
reset () {
|
||||
this.showAdvanced = false
|
||||
this.form = initialForm(this.$store.state)
|
||||
},
|
||||
handleCancel (formName) {
|
||||
@@ -271,9 +283,12 @@
|
||||
}
|
||||
return result
|
||||
},
|
||||
buildOption (form) {
|
||||
buildOption (type, form) {
|
||||
const {
|
||||
dir, out, split
|
||||
dir,
|
||||
out,
|
||||
selectFile,
|
||||
split
|
||||
} = form
|
||||
const result = {}
|
||||
|
||||
@@ -285,6 +300,15 @@
|
||||
result.out = out
|
||||
}
|
||||
|
||||
if (type === 'torrent') {
|
||||
if (
|
||||
selectFile !== SELECTED_ALL_FILES &&
|
||||
selectFile !== NONE_SELECTED_FILES
|
||||
) {
|
||||
result.selectFile = selectFile
|
||||
}
|
||||
}
|
||||
|
||||
if (split > 0) {
|
||||
result.split = split
|
||||
}
|
||||
@@ -297,8 +321,11 @@
|
||||
},
|
||||
buildUriPayload (form) {
|
||||
let { uris } = form
|
||||
if (isEmpty(uris)) {
|
||||
throw new Error(this.$t('task.new-task-uris-required'))
|
||||
}
|
||||
uris = splitTaskLinks(uris)
|
||||
const options = this.buildOption(form)
|
||||
const options = this.buildOption('uri', form)
|
||||
const result = {
|
||||
uris,
|
||||
options
|
||||
@@ -307,12 +334,14 @@
|
||||
},
|
||||
buildTorrentPayload (form) {
|
||||
const { torrent } = form
|
||||
const options = this.buildOption(form)
|
||||
if (isEmpty(torrent)) {
|
||||
throw new Error(this.$t('task.new-task-torrent-required'))
|
||||
}
|
||||
const options = this.buildOption('torrent', form)
|
||||
const result = {
|
||||
torrent,
|
||||
options
|
||||
}
|
||||
console.log('buildTorrentPayload===>', result)
|
||||
return result
|
||||
},
|
||||
addTask (type, form) {
|
||||
@@ -335,58 +364,24 @@
|
||||
console.error('addTask fail', form)
|
||||
}
|
||||
},
|
||||
checkCopyright (type, form) {
|
||||
const { uris } = form
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
if (type !== 'uri') {
|
||||
resolve()
|
||||
}
|
||||
|
||||
if (!needCheckCopyright(uris)) {
|
||||
resolve()
|
||||
return
|
||||
}
|
||||
|
||||
if (this.iLoveEggFeatures) {
|
||||
resolve()
|
||||
return
|
||||
}
|
||||
|
||||
this.$electron.remote.dialog.showMessageBox({
|
||||
type: 'warning',
|
||||
title: this.$t('task.copyright-warning'),
|
||||
message: this.$t('task.copyright-warning-message'),
|
||||
buttons: [this.$t('task.copyright-yes'), this.$t('task.copyright-no')],
|
||||
cancelId: 1
|
||||
}, (buttonIndex, checkboxChecked) => {
|
||||
if (buttonIndex === 0) {
|
||||
resolve()
|
||||
} else {
|
||||
reject(new Error(this.$t('task.copyright-error-message')))
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
submitForm (formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (!valid) {
|
||||
return false
|
||||
}
|
||||
|
||||
this.checkCopyright(this.type, this.form)
|
||||
.then(() => {
|
||||
this.addTask(this.type, this.form)
|
||||
this.$store.dispatch('app/hideAddTaskDialog')
|
||||
if (this.form.newTaskShowDownloading) {
|
||||
this.$router.push({
|
||||
path: '/task/active'
|
||||
})
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
this.$msg.error(err.message)
|
||||
})
|
||||
try {
|
||||
this.addTask(this.type, this.form)
|
||||
|
||||
this.$store.dispatch('app/hideAddTaskDialog')
|
||||
if (this.form.newTaskShowDownloading) {
|
||||
this.$router.push({
|
||||
path: '/task/active'
|
||||
})
|
||||
}
|
||||
} catch (err) {
|
||||
this.$msg.error(err.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,9 +47,6 @@
|
||||
'status': 'onStatusChange'
|
||||
},
|
||||
methods: {
|
||||
open (link) {
|
||||
this.$electron.shell.openExternal(link)
|
||||
},
|
||||
onStatusChange () {
|
||||
this.changeCurrentList()
|
||||
},
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
class="upload-torrent"
|
||||
drag
|
||||
action="/"
|
||||
v-if="isTorrentsEmpty"
|
||||
:limit="1"
|
||||
:multiple="false"
|
||||
accept=".torrent"
|
||||
@@ -16,23 +17,115 @@
|
||||
<div class="torrent-name" v-if="name">{{ name }}</div>
|
||||
</div>
|
||||
</el-upload>
|
||||
<div
|
||||
class="selective-torrent"
|
||||
v-else
|
||||
>
|
||||
<el-row class="torrent-info" :gutter="12">
|
||||
<el-col class="torrent-name" :span="20">
|
||||
<el-tooltip class="item" effect="dark" :content="name" placement="top">
|
||||
<span>{{ name }}</span>
|
||||
</el-tooltip>
|
||||
</el-col>
|
||||
<el-col class="torrent-actions" :span="4">
|
||||
<span
|
||||
@click="handleTrashClick"
|
||||
>
|
||||
<mo-icon name="trash" width="14" height="14" />
|
||||
</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="torrent-file-list">
|
||||
<el-table
|
||||
stripe
|
||||
ref="torrentTable"
|
||||
height="200"
|
||||
:data="files"
|
||||
tooltip-effect="dark"
|
||||
style="width: 100%"
|
||||
@row-dblclick="handleRowDbClick"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="35">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
:label="$t('task.file-name')"
|
||||
show-overflow-tooltip>
|
||||
<template slot-scope="scope">{{ scope.row.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
:label="$t('task.file-extension')"
|
||||
width="80">
|
||||
<template slot-scope="scope">{{ scope.row.extension | removeExtensionDot }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
:label="$t('task.file-size')"
|
||||
width="90">
|
||||
<template slot-scope="scope">{{ scope.row.length | bytesToSize }}</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<el-row :gutter="12">
|
||||
<el-col class="file-filters" :span="8">
|
||||
<el-button-group>
|
||||
<el-button @click="toggleVideoSelection()">
|
||||
<mo-icon name="video" width="12" height="12" />
|
||||
</el-button>
|
||||
<el-button @click="toggleAudioSelection()">
|
||||
<mo-icon name="audio" width="12" height="12" />
|
||||
</el-button>
|
||||
<el-button @click="toggleImageSelection()">
|
||||
<mo-icon name="image" width="12" height="12" />
|
||||
</el-button>
|
||||
</el-button-group>
|
||||
</el-col>
|
||||
<el-col :span="16" style="text-align: right">
|
||||
{{ $t('task.selected-files-sum', { selectedFilesCount, selectedFilesTotalSize }) }}
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
import { isEmpty } from 'lodash'
|
||||
import parseTorrent from 'parse-torrent'
|
||||
import '@/components/Icons/inbox'
|
||||
import { getAsBase64, buildFileList } from '@shared/utils'
|
||||
import '@/components/Icons/video'
|
||||
import '@/components/Icons/audio'
|
||||
import '@/components/Icons/image'
|
||||
import {
|
||||
NONE_SELECTED_FILES,
|
||||
SELECTED_ALL_FILES
|
||||
} from '@shared/constants'
|
||||
import {
|
||||
buildFileList,
|
||||
listTorrentFiles,
|
||||
bytesToSize,
|
||||
filterVideoFiles,
|
||||
filterAudioFiles,
|
||||
filterImageFiles,
|
||||
getAsBase64,
|
||||
removeExtensionDot
|
||||
} from '@shared/utils'
|
||||
|
||||
export default {
|
||||
name: 'mo-select-torrent',
|
||||
components: {
|
||||
},
|
||||
filters: {
|
||||
bytesToSize,
|
||||
removeExtensionDot
|
||||
},
|
||||
props: {
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
name: ''
|
||||
name: '',
|
||||
currentTorrent: '',
|
||||
files: [],
|
||||
selectedFiles: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -41,15 +134,40 @@
|
||||
}),
|
||||
...mapState('app', {
|
||||
torrents: state => state.addTaskTorrents
|
||||
})
|
||||
}),
|
||||
isTorrentsEmpty: function () {
|
||||
return this.torrents.length === 0
|
||||
},
|
||||
selectedFilesCount: function () {
|
||||
return this.selectedFiles.length
|
||||
},
|
||||
selectedFilesTotalSize: function () {
|
||||
const result = this.selectedFiles.reduce((acc, cur) => {
|
||||
return acc + cur.length
|
||||
}, 0)
|
||||
return bytesToSize(result)
|
||||
},
|
||||
selectedFileIndex: function () {
|
||||
const { files, selectedFiles } = this
|
||||
if (files.length === 0 || selectedFiles.length === 0) {
|
||||
return NONE_SELECTED_FILES
|
||||
}
|
||||
if (files.length === selectedFiles.length) {
|
||||
return SELECTED_ALL_FILES
|
||||
}
|
||||
const indexArr = this.selectedFiles.map((item) => item.idx)
|
||||
const result = indexArr.join(',')
|
||||
return result
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
torrents (fileList) {
|
||||
const file = fileList[0]
|
||||
if (fileList.length === 0) {
|
||||
this.name = ''
|
||||
this.reset()
|
||||
return
|
||||
}
|
||||
|
||||
const file = fileList[0]
|
||||
if (!file.raw) {
|
||||
return
|
||||
}
|
||||
@@ -57,21 +175,68 @@
|
||||
parseTorrent.remote(file.raw, (err, parsedTorrent) => {
|
||||
if (err) throw err
|
||||
console.log(parsedTorrent)
|
||||
})
|
||||
this.files = listTorrentFiles(parsedTorrent.files)
|
||||
this.$refs.torrentTable.toggleAllSelection()
|
||||
|
||||
getAsBase64(file.raw, (torrent) => {
|
||||
this.name = file.name
|
||||
this.$emit('change', torrent, file, fileList)
|
||||
getAsBase64(file.raw, (torrent) => {
|
||||
this.name = file.name
|
||||
this.currentTorrent = torrent
|
||||
this.$emit('change', torrent, SELECTED_ALL_FILES)
|
||||
})
|
||||
})
|
||||
},
|
||||
selectedFileIndex () {
|
||||
const { currentTorrent, selectedFileIndex } = this
|
||||
this.$emit('change', currentTorrent, selectedFileIndex)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
reset () {
|
||||
this.name = ''
|
||||
this.currentTorrent = ''
|
||||
this.files = []
|
||||
if (this.$refs.torrentTable) {
|
||||
this.$refs.torrentTable.clearSelection()
|
||||
}
|
||||
this.$emit('change', '', NONE_SELECTED_FILES)
|
||||
},
|
||||
handleChange (file, fileList) {
|
||||
this.$store.dispatch('app/addTaskAddTorrents', { fileList })
|
||||
},
|
||||
handleExceed (files) {
|
||||
const fileList = buildFileList(files[0])
|
||||
this.$store.dispatch('app/addTaskAddTorrents', { fileList })
|
||||
},
|
||||
handleTrashClick () {
|
||||
this.$store.dispatch('app/addTaskAddTorrents', { fileList: [] })
|
||||
},
|
||||
toggleSelection (rows) {
|
||||
if (isEmpty(rows)) {
|
||||
this.$refs.torrentTable.clearSelection()
|
||||
} else {
|
||||
this.$refs.torrentTable.clearSelection()
|
||||
rows.forEach(row => {
|
||||
this.$refs.torrentTable.toggleRowSelection(row)
|
||||
})
|
||||
}
|
||||
},
|
||||
toggleVideoSelection () {
|
||||
const filtered = filterVideoFiles(this.files)
|
||||
this.toggleSelection(filtered)
|
||||
},
|
||||
toggleAudioSelection () {
|
||||
const filtered = filterAudioFiles(this.files)
|
||||
this.toggleSelection(filtered)
|
||||
},
|
||||
toggleImageSelection () {
|
||||
const filtered = filterImageFiles(this.files)
|
||||
this.toggleSelection(filtered)
|
||||
},
|
||||
handleRowDbClick (row, column, event) {
|
||||
this.$refs.torrentTable.toggleRowSelection(row)
|
||||
},
|
||||
handleSelectionChange (val) {
|
||||
this.selectedFiles = val
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -99,4 +264,42 @@
|
||||
line-height: 16px;
|
||||
}
|
||||
}
|
||||
.selective-torrent {
|
||||
.torrent-name {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.torrent-info {
|
||||
margin-bottom: 15px;
|
||||
font-size: 12px;
|
||||
line-height: 16px;
|
||||
}
|
||||
.torrent-actions {
|
||||
text-align: right;
|
||||
line-height: 16px;
|
||||
&> span {
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
height: 14px;
|
||||
padding: 1px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.file-filters {
|
||||
button {
|
||||
font-size: 0;
|
||||
}
|
||||
}
|
||||
.torrent-file-list {
|
||||
border: 1px solid #ebeef5;
|
||||
border-bottom: none;
|
||||
overflow-x: hidden;
|
||||
overflow-y: scroll;
|
||||
margin-bottom: 8px;
|
||||
.el-table th {
|
||||
padding: 2px 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,36 +1,38 @@
|
||||
<template>
|
||||
<div class="task-item-actions" v-on:dblclick.stop="() => null">
|
||||
<!-- <i @click.stop="onMoreClick">
|
||||
<mo-icon name="more" width="14" height="14" />
|
||||
</i> -->
|
||||
<i @click.stop="onInfoClick" v-if="mode === 'LIST'">
|
||||
<mo-icon name="info-circle" width="14" height="14" />
|
||||
</i>
|
||||
<i @click.stop="onLinkClick">
|
||||
<mo-icon name="link" width="14" height="14" />
|
||||
</i>
|
||||
<i v-if="isRenderer()" @click.stop="onFolderClick">
|
||||
<mo-icon name="folder" width="14" height="14" />
|
||||
</i>
|
||||
<i v-if="task.status ==='complete' ||
|
||||
task.status ==='removed' ||
|
||||
task.status ==='error'"
|
||||
@click.stop="onTrashClick">
|
||||
<mo-icon name="trash" width="14" height="14" />
|
||||
</i>
|
||||
<i v-if="task.status ==='active' ||
|
||||
task.status ==='waiting' ||
|
||||
task.status ==='paused'"
|
||||
@click.stop="onDeleteClick">
|
||||
<mo-icon name="delete" width="14" height="14" />
|
||||
</i>
|
||||
<i v-if="task.status ==='active'" @click.stop="onPauseClick">
|
||||
<mo-icon name="task-pause-line" width="14" height="14" />
|
||||
</i>
|
||||
<i v-if="task.status ==='waiting' || task.status ==='paused'" @click.stop="onResumeClick">
|
||||
<mo-icon name="task-start-line" width="14" height="14" />
|
||||
</i>
|
||||
</div>
|
||||
<ul :key="task.gid" class="task-item-actions" v-on:dblclick.stop="() => null">
|
||||
<li v-for="action in taskActions" :key="action" class="task-item-action">
|
||||
<i v-if="action ==='PAUSE'" @click.stop="onPauseClick">
|
||||
<mo-icon name="task-pause-line" width="14" height="14" />
|
||||
</i>
|
||||
<i v-if="action ==='STOP'" @click.stop="onStopClick">
|
||||
<mo-icon name="task-stop-line" width="14" height="14" />
|
||||
</i>
|
||||
<i v-if="action === 'RESUME'" @click.stop="onResumeClick">
|
||||
<mo-icon name="task-start-line" width="14" height="14" />
|
||||
</i>
|
||||
<i v-if="action === 'RESTART'" @click="onRestartClick">
|
||||
<mo-icon name="task-restart" width="14" height="14" />
|
||||
</i>
|
||||
<i v-if="action === 'DELETE'" @click.stop="onDeleteClick">
|
||||
<mo-icon name="delete" width="14" height="14" />
|
||||
</i>
|
||||
<i v-if="action === 'TRASH'" @click.stop="onTrashClick">
|
||||
<mo-icon name="trash" width="14" height="14" />
|
||||
</i>
|
||||
<i v-if="action ==='FOLDER'" @click.stop="onFolderClick">
|
||||
<mo-icon name="folder" width="14" height="14" />
|
||||
</i>
|
||||
<i v-if="action ==='LINK'" @click.stop="onLinkClick">
|
||||
<mo-icon name="link" width="14" height="14" />
|
||||
</i>
|
||||
<i v-if="action ==='INFO'" @click.stop="onInfoClick">
|
||||
<mo-icon name="info-circle" width="14" height="14" />
|
||||
</i>
|
||||
<i v-if="action ==='MORE'" @click.stop="onMoreClick">
|
||||
<mo-icon name="more" width="14" height="14" />
|
||||
</i>
|
||||
</li>
|
||||
</ul>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -38,6 +40,8 @@
|
||||
import * as clipboard from 'clipboard-polyfill'
|
||||
import '@/components/Icons/task-start-line'
|
||||
import '@/components/Icons/task-pause-line'
|
||||
import '@/components/Icons/task-stop-line'
|
||||
import '@/components/Icons/task-restart'
|
||||
import '@/components/Icons/delete'
|
||||
import '@/components/Icons/folder'
|
||||
import '@/components/Icons/link'
|
||||
@@ -49,11 +53,23 @@
|
||||
moveTaskFilesToTrash
|
||||
} from '@/components/Native/utils'
|
||||
import {
|
||||
checkTaskIsSeeder,
|
||||
getTaskFullPath,
|
||||
getTaskName,
|
||||
getTaskUri,
|
||||
getTaskFullPath
|
||||
parseHeader
|
||||
} from '@shared/utils'
|
||||
|
||||
const taskActionsMap = {
|
||||
active: ['PAUSE', 'DELETE'],
|
||||
paused: ['RESUME', 'DELETE'],
|
||||
waiting: ['RESUME', 'DELETE'],
|
||||
error: ['RESTART', 'TRASH'],
|
||||
complete: ['RESTART', 'TRASH'],
|
||||
removed: ['RESTART', 'TRASH'],
|
||||
seeding: ['STOP', 'DELETE']
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'mo-task-item-actions',
|
||||
props: {
|
||||
@@ -67,23 +83,48 @@
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
taskName: function () {
|
||||
taskName () {
|
||||
return getTaskName(this.task)
|
||||
},
|
||||
path: function () {
|
||||
path () {
|
||||
return getTaskFullPath(this.task)
|
||||
},
|
||||
isSeeder () {
|
||||
return checkTaskIsSeeder(this.task)
|
||||
},
|
||||
taskStatus () {
|
||||
const { task, isSeeder } = this
|
||||
if (isSeeder) {
|
||||
return 'seeding'
|
||||
} else {
|
||||
return task.status
|
||||
}
|
||||
},
|
||||
taskCommonActions () {
|
||||
let result = is.renderer() ? ['FOLDER'] : []
|
||||
result = (this.mode === 'LIST')
|
||||
? [...result, 'LINK', 'INFO']
|
||||
: [...result, 'LINK']
|
||||
|
||||
return result
|
||||
},
|
||||
taskActions () {
|
||||
const { taskStatus, taskCommonActions } = this
|
||||
const actions = taskActionsMap[taskStatus] || []
|
||||
const result = [...actions, ...taskCommonActions].reverse()
|
||||
return result
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
isRenderer: is.renderer,
|
||||
deleteTaskFiles: function (task) {
|
||||
deleteTaskFiles (task) {
|
||||
moveTaskFilesToTrash(task, {
|
||||
pathErrorMsg: this.$t('task.file-path-error'),
|
||||
delFailMsg: this.$t('task.remove-task-file-fail'),
|
||||
delConfigFailMsg: this.$t('task.remove-task-config-file-fail')
|
||||
})
|
||||
},
|
||||
removeTaskItem: function (task, isRemoveWithFiles) {
|
||||
removeTaskItem (task, isRemoveWithFiles) {
|
||||
this.$store.dispatch('task/removeTask', this.task)
|
||||
.then(() => {
|
||||
if (isRemoveWithFiles) {
|
||||
@@ -101,7 +142,7 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
removeTaskRecord: function (task, isRemoveWithFiles) {
|
||||
removeTaskRecord (task, isRemoveWithFiles) {
|
||||
this.$store.dispatch('task/removeTaskRecord', this.task)
|
||||
.then(() => {
|
||||
if (isRemoveWithFiles) {
|
||||
@@ -119,7 +160,7 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
onResumeClick: function () {
|
||||
onResumeClick () {
|
||||
this.$store.dispatch('task/resumeTask', this.task)
|
||||
.catch(({ code }) => {
|
||||
if (code === 1) {
|
||||
@@ -129,7 +170,72 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
onPauseClick: function () {
|
||||
onRestartClick (event) {
|
||||
const { task, taskName } = this
|
||||
const { gid, status } = task
|
||||
const uri = getTaskUri(task)
|
||||
const isNeedShowDialog = status === 'complete' || !!event.altKey
|
||||
this.$store.dispatch('task/getTaskOption', gid)
|
||||
.then((data) => {
|
||||
console.log('getTaskOption===>', data)
|
||||
const { dir, header, split } = data
|
||||
const options = {
|
||||
dir,
|
||||
header,
|
||||
split,
|
||||
out: taskName
|
||||
}
|
||||
|
||||
if (isNeedShowDialog) {
|
||||
this.showAddTaskDialog(uri, options)
|
||||
} else {
|
||||
this.directAddTask(uri, options)
|
||||
this.$store.dispatch('task/removeTaskRecord', task)
|
||||
}
|
||||
})
|
||||
},
|
||||
directAddTask (uri, options = {}) {
|
||||
const uris = [uri]
|
||||
const payload = {
|
||||
uris,
|
||||
options: {
|
||||
...options
|
||||
}
|
||||
}
|
||||
this.$store.dispatch('task/addUri', payload)
|
||||
.catch((err) => {
|
||||
this.$msg.error(err.message)
|
||||
})
|
||||
},
|
||||
showAddTaskDialog (uri, options = {}) {
|
||||
const {
|
||||
header,
|
||||
...rest
|
||||
} = options
|
||||
|
||||
const headers = parseHeader(header)
|
||||
const newOptions = {
|
||||
...rest,
|
||||
...headers
|
||||
}
|
||||
|
||||
this.$store.dispatch('app/updateAddTaskUrl', uri)
|
||||
this.$store.dispatch('app/updateAddTaskOptions', newOptions)
|
||||
this.$store.dispatch('app/showAddTaskDialog', 'uri')
|
||||
},
|
||||
onPauseClick () {
|
||||
this.pauseTask()
|
||||
},
|
||||
onStopClick () {
|
||||
this.stopSeeding()
|
||||
},
|
||||
stopSeeding () {
|
||||
if (!this.isSeeder) {
|
||||
return
|
||||
}
|
||||
this.$store.dispatch('task/stopSeeding', this.task)
|
||||
},
|
||||
pauseTask () {
|
||||
const { taskName } = this
|
||||
this.$msg.info(this.$t('task.download-pause-message', { taskName }))
|
||||
this.$store.dispatch('task/pauseTask', this.task)
|
||||
@@ -139,7 +245,7 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
onDeleteClick: function () {
|
||||
onDeleteClick () {
|
||||
const self = this
|
||||
const { task } = this
|
||||
this.$electron.remote.dialog.showMessageBox({
|
||||
@@ -155,7 +261,7 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
onTrashClick: function () {
|
||||
onTrashClick () {
|
||||
const self = this
|
||||
const { task } = this
|
||||
this.$electron.remote.dialog.showMessageBox({
|
||||
@@ -171,12 +277,12 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
onFolderClick: function () {
|
||||
onFolderClick () {
|
||||
showItemInFolder(this.path, {
|
||||
errorMsg: this.$t('task.file-not-exist')
|
||||
})
|
||||
},
|
||||
onLinkClick: function () {
|
||||
onLinkClick () {
|
||||
this.$store.dispatch('app/fetchEngineOptions')
|
||||
.then((data) => {
|
||||
const { btTracker } = data
|
||||
@@ -187,10 +293,10 @@
|
||||
})
|
||||
})
|
||||
},
|
||||
onInfoClick: function () {
|
||||
onInfoClick () {
|
||||
this.$store.dispatch('task/showTaskItemInfoDialog', this.task)
|
||||
},
|
||||
onMoreClick: function () {
|
||||
onMoreClick () {
|
||||
console.log('onMoreClick===>')
|
||||
}
|
||||
}
|
||||
@@ -218,7 +324,7 @@
|
||||
background-color: $--task-item-action-hover-background;
|
||||
width: auto;
|
||||
}
|
||||
&> i {
|
||||
&> .task-item-action {
|
||||
display: inline-block;
|
||||
padding: 5px;
|
||||
margin: 0 4px;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
v-if="status === 'active'"
|
||||
:percentage="percent"
|
||||
:show-text="false"
|
||||
status="text"
|
||||
status="success"
|
||||
:color="color">
|
||||
</el-progress>
|
||||
<el-progress
|
||||
|
||||
@@ -56,7 +56,9 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.form-actions {
|
||||
background: $--dk-form-actions-background;
|
||||
}
|
||||
.panel {
|
||||
background-color: $--dk-panel-background;
|
||||
}
|
||||
@@ -235,7 +237,7 @@
|
||||
color: #e6e6e6;
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: $--color-primary;
|
||||
color: $--color-primary-light-4;
|
||||
border-color: #606060;
|
||||
background-color: #333;
|
||||
}
|
||||
@@ -307,12 +309,52 @@
|
||||
/* Dialog */
|
||||
.el-dialog {
|
||||
background-color: $--dk-dialog-background;
|
||||
.el-dialog__body {
|
||||
color: $--dk-dialog-text-color;
|
||||
}
|
||||
}
|
||||
|
||||
.add-task-dialog .el-dialog__footer {
|
||||
background-color: $--dk-add-task-dialog-footer-background;
|
||||
}
|
||||
|
||||
.torrent-file-list {
|
||||
border-color: $--dk-table-border-color;
|
||||
}
|
||||
|
||||
.el-table {
|
||||
background-color: $--dk-table-background;
|
||||
color: $--dk-table-text-color;
|
||||
tr {
|
||||
background-color: $--dk-table-background;
|
||||
}
|
||||
th {
|
||||
background-color: $--dk-table-th-background;
|
||||
color: $--dk-table-text-color;
|
||||
}
|
||||
th.is-leaf, td {
|
||||
background-color: $--dk-table-background;
|
||||
color: $--dk-table-text-color;
|
||||
border-bottom-color: $--dk-table-border-color;
|
||||
}
|
||||
}
|
||||
.el-table thead th.is-leaf {
|
||||
background-color: $--dk-table-th-background;
|
||||
}
|
||||
|
||||
.el-table--enable-row-hover .el-table__body tr:hover > td,
|
||||
.el-table--enable-row-hover .el-table__body tr.el-table__row--striped:hover > td {
|
||||
background-color: $--dk-table-hover-background;
|
||||
}
|
||||
|
||||
.el-table--group::after, .el-table--border::after, .el-table::before {
|
||||
background-color: $--dk-table-border-color;
|
||||
}
|
||||
|
||||
.el-table--striped .el-table__body tr.el-table__row--striped td {
|
||||
background-color: $--dk-table-striped-background;
|
||||
}
|
||||
|
||||
/* Tabs */
|
||||
.el-tabs__item {
|
||||
color: #a2a3a4;
|
||||
@@ -332,4 +374,20 @@
|
||||
.form-preference .el-switch__label {
|
||||
color: $--dk-preference-form-text-color;
|
||||
}
|
||||
|
||||
.form-preference .el-checkbox__input.is-checked + .el-checkbox__label {
|
||||
color: $--dk-preference-form-text-color;
|
||||
}
|
||||
|
||||
.form-preference .el-form-item {
|
||||
a {
|
||||
color: #dfdfdf;
|
||||
&:hover {
|
||||
color: #eee;
|
||||
}
|
||||
&:active {
|
||||
color: #eee;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,11 +30,15 @@ $--dk-panel-background: #343434 !default;
|
||||
$--dk-panel-title-color: #fff !default;
|
||||
$--dk-panel-border-color: #EBECF0 !default;
|
||||
|
||||
/* Form Actions
|
||||
-------------------------- */
|
||||
$--dk-form-actions-background: #343434 !default;
|
||||
|
||||
/* Task
|
||||
-------------------------- */
|
||||
$--dk-task-action-color: #eee !default;
|
||||
$--dk-task-action-hover-color: $--color-primary !default;
|
||||
$--dk-task-item-backgroud: #2D2D2D !default;
|
||||
$--dk-task-item-backgroud: #2d2d2d !default;
|
||||
$--dk-task-item-border-color: #555 !default;
|
||||
$--dk-task-item-hover-border-color: $--color-primary !default;
|
||||
$--dk-task-item-hover-background: $--color-primary !default;
|
||||
@@ -50,7 +54,7 @@ $--dk-add-task-dialog-footer-background: #4a4a4a !default;
|
||||
|
||||
/* Preference
|
||||
-------------------------- */
|
||||
$--dk-preference-form-text-color: #dfdfdf;
|
||||
$--dk-preference-form-text-color: #dfdfdf !default;
|
||||
|
||||
/* Speedometer
|
||||
-------------------------- */
|
||||
@@ -64,3 +68,10 @@ $--dk-speedometer-text-color: #9b9b9b !default;
|
||||
/* Element UI
|
||||
-------------------------- */
|
||||
$--dk-dialog-background: #343434 !default;
|
||||
$--dk-dialog-text-color: #9b9b9b !default;
|
||||
$--dk-table-background: #2a2b2c !default;
|
||||
$--dk-table-striped-background: #1f2122 !default;
|
||||
$--dk-table-hover-background: #565656 !default;
|
||||
$--dk-table-th-background: #1f2122 !default;
|
||||
$--dk-table-text-color: #9b9b9b !default;
|
||||
$--dk-table-border-color: #565656 !default;
|
||||
|
||||
@@ -5,10 +5,34 @@ body {
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Monospaced Number', 'Chinese Quote', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
font-family: "Monospaced Number", "Chinese Quote", -apple-system,
|
||||
BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB",
|
||||
"Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-variant: tabular-nums;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
border-radius: 8px;
|
||||
background-color: rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb:window-inactive {
|
||||
background-color: rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-corner {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
::-webkit-resizer {
|
||||
display: none;
|
||||
}
|
||||
|
||||
img {
|
||||
width: auto;
|
||||
height: auto;
|
||||
@@ -28,7 +52,7 @@ img {
|
||||
|
||||
.el-progress--line.is-text {
|
||||
.el-progress-bar__inner::before {
|
||||
content: '';
|
||||
content: "";
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
@@ -63,6 +87,9 @@ img {
|
||||
.el-message__content {
|
||||
line-height: 18px;
|
||||
word-break: break-all;
|
||||
a {
|
||||
color: $--link-color;
|
||||
}
|
||||
}
|
||||
|
||||
.tab-title-dialog {
|
||||
@@ -88,6 +115,17 @@ img {
|
||||
color: $--color-info;
|
||||
}
|
||||
|
||||
.el-input-number.el-input-number--mini {
|
||||
&.is-controls-left .el-input__inner {
|
||||
padding-left: 34px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
&.is-controls-right .el-input__inner {
|
||||
padding-left: 5px;
|
||||
padding-right: 34px;
|
||||
}
|
||||
}
|
||||
|
||||
/* App Main
|
||||
-------------------------- */
|
||||
#app,
|
||||
@@ -101,6 +139,10 @@ img {
|
||||
-webkit-user-select: none;
|
||||
}
|
||||
|
||||
.non-draggable {
|
||||
-webkit-app-region: no-drag;
|
||||
}
|
||||
|
||||
.aside {
|
||||
background-color: $--aside-background;
|
||||
color: $--aside-text-color;
|
||||
@@ -133,15 +175,16 @@ img {
|
||||
li {
|
||||
margin-bottom: 8px;
|
||||
padding: 8px 10px;
|
||||
font-size: 14px;
|
||||
font-size: 0;
|
||||
line-height: 20px;
|
||||
border-radius: 3px;
|
||||
cursor: pointer;
|
||||
|
||||
i,
|
||||
span {
|
||||
vertical-align: middle;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
&:hover,
|
||||
@@ -191,7 +234,11 @@ img {
|
||||
}
|
||||
.panel-content {
|
||||
position: relative;
|
||||
padding: 16px 36px 52px;
|
||||
padding: 16px 36px 64px;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.form-actions {
|
||||
background: $--form-actions-background;
|
||||
}
|
||||
|
||||
@@ -30,6 +30,10 @@ $--panel-background: $--color-white !default;
|
||||
$--panel-title-color: $--color-text-primary !default;
|
||||
$--panel-border-color: rgba(0, 0, 0, 0.1) !default;
|
||||
|
||||
/* Form Actions
|
||||
-------------------------- */
|
||||
$--form-actions-background: $--color-white !default;
|
||||
|
||||
/* Task
|
||||
-------------------------- */
|
||||
$--task-action-color: #4d515a !default;
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
import EngineClient from '@/components/Native/EngineClient'
|
||||
import Ipc from '@/components/Native/Ipc'
|
||||
import { mapState } from 'vuex'
|
||||
import { getLangDirection } from '@shared/utils'
|
||||
|
||||
export default {
|
||||
name: 'Motrix',
|
||||
@@ -36,7 +37,8 @@
|
||||
},
|
||||
rpcSecret: state => state.config.rpcSecret,
|
||||
theme: state => state.config.theme,
|
||||
locale: state => state.config.locale
|
||||
locale: state => state.config.locale,
|
||||
dir: state => getLangDirection(state.config.locale)
|
||||
}),
|
||||
themeClass: function () {
|
||||
if (this.theme === 'auto') {
|
||||
@@ -47,13 +49,17 @@
|
||||
},
|
||||
i18nClass: function () {
|
||||
return `i18n-${this.locale}`
|
||||
},
|
||||
dirClass: function () {
|
||||
return `dir-${this.dir}`
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
isRenderer: is.renderer,
|
||||
updateRootClassName: function () {
|
||||
const { themeClass = '', i18nClass = '' } = this
|
||||
document.documentElement.className = `${themeClass} ${i18nClass}`
|
||||
const { themeClass = '', i18nClass = '', dirClass = '' } = this
|
||||
const className = `${themeClass} ${i18nClass} ${dirClass}`
|
||||
document.documentElement.className = className
|
||||
}
|
||||
},
|
||||
beforeMount: function () {
|
||||
@@ -65,6 +71,9 @@
|
||||
},
|
||||
i18nClass: function (val, oldVal) {
|
||||
this.updateRootClassName()
|
||||
},
|
||||
dirClass: function (val, oldVal) {
|
||||
this.updateRootClassName()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,13 +20,14 @@ const state = {
|
||||
downloadSpeed: 0,
|
||||
uploadSpeed: 0,
|
||||
numActive: 0,
|
||||
numStopped: 0,
|
||||
numWaiting: 0
|
||||
numWaiting: 0,
|
||||
numStopped: 0
|
||||
},
|
||||
addTaskVisible: false,
|
||||
addTaskType: 'uri',
|
||||
addTaskUrl: '',
|
||||
addTaskTorrents: []
|
||||
addTaskTorrents: [],
|
||||
addTaskOptions: {}
|
||||
}
|
||||
|
||||
const getters = {
|
||||
@@ -60,6 +61,11 @@ const mutations = {
|
||||
CHANGE_ADD_TASK_TORRENTS (state, fileList) {
|
||||
state.addTaskTorrents = [...fileList]
|
||||
},
|
||||
UPDATE_ADD_TASK_OPTIONS (state, options) {
|
||||
state.addTaskOptions = {
|
||||
...options
|
||||
}
|
||||
},
|
||||
UPDATE_INTERVAL (state, millisecond) {
|
||||
let interval = millisecond
|
||||
if (millisecond > MAX_INTERVAL) {
|
||||
@@ -162,6 +168,9 @@ const actions = {
|
||||
addTaskAddTorrents ({ commit }, { fileList }) {
|
||||
commit('CHANGE_ADD_TASK_TORRENTS', fileList)
|
||||
},
|
||||
updateAddTaskOptions ({ commit }, options = {}) {
|
||||
commit('UPDATE_ADD_TASK_OPTIONS', options)
|
||||
},
|
||||
updateInterval ({ commit }, millisecond) {
|
||||
commit('UPDATE_INTERVAL', millisecond)
|
||||
},
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import api from '@/api'
|
||||
import { isEmpty } from 'lodash'
|
||||
|
||||
const state = {
|
||||
engineMode: 'MAX',
|
||||
@@ -21,13 +22,12 @@ const actions = {
|
||||
})
|
||||
})
|
||||
},
|
||||
save ({ commit }, data) {
|
||||
let { btTracker } = data
|
||||
btTracker = btTracker.trim().replace(/(?:\r\n|\r|\n)/g, ',')
|
||||
const config = {
|
||||
...data,
|
||||
btTracker
|
||||
save ({ commit, dispatch }, config) {
|
||||
dispatch('task/saveSession', null, { root: true })
|
||||
if (isEmpty(config)) {
|
||||
return
|
||||
}
|
||||
|
||||
commit('UPDATE_PREFERENCE_DATA', config)
|
||||
return api.savePreference(config)
|
||||
},
|
||||
|
||||
@@ -57,6 +57,7 @@ const actions = {
|
||||
return api.addUri({ uris, options })
|
||||
.then(() => {
|
||||
dispatch('fetchList')
|
||||
dispatch('app/updateAddTaskOptions', {}, { root: true })
|
||||
})
|
||||
},
|
||||
addTorrent ({ dispatch }, data) {
|
||||
@@ -64,6 +65,7 @@ const actions = {
|
||||
return api.addTorrent({ torrent, options })
|
||||
.then(() => {
|
||||
dispatch('fetchList')
|
||||
dispatch('app/updateAddTaskOptions', {}, { root: true })
|
||||
})
|
||||
},
|
||||
addMetalink ({ dispatch }, data) {
|
||||
@@ -71,8 +73,21 @@ const actions = {
|
||||
return api.addMetalink({ metalink, options })
|
||||
.then(() => {
|
||||
dispatch('fetchList')
|
||||
dispatch('app/updateAddTaskOptions', {}, { root: true })
|
||||
})
|
||||
},
|
||||
getTaskOption (_, gid) {
|
||||
return new Promise((resolve) => {
|
||||
api.getOption({ gid })
|
||||
.then((data) => {
|
||||
resolve(data)
|
||||
})
|
||||
})
|
||||
},
|
||||
changeTaskOption (_, payload) {
|
||||
const { gid, options } = payload
|
||||
return api.changeOption({ gid, options })
|
||||
},
|
||||
removeTask ({ dispatch }, task) {
|
||||
const { gid } = task
|
||||
return api.forcePauseTask({ gid })
|
||||
@@ -123,8 +138,18 @@ const actions = {
|
||||
dispatch('saveSession')
|
||||
})
|
||||
},
|
||||
removeTaskRecord ({ dispatch }, task) {
|
||||
stopSeeding ({ dispatch }, task) {
|
||||
const { gid } = task
|
||||
const options = {
|
||||
seedTime: 0
|
||||
}
|
||||
return dispatch('changeTaskOption', { gid, options })
|
||||
},
|
||||
removeTaskRecord ({ dispatch }, task) {
|
||||
const { gid, status } = task
|
||||
if (['error', 'complete', 'removed'].indexOf(status) === -1) {
|
||||
return
|
||||
}
|
||||
return api.removeTaskRecord({ gid })
|
||||
.finally(() => dispatch('fetchList'))
|
||||
},
|
||||
|
||||
@@ -1,25 +1,27 @@
|
||||
const userKeys = [
|
||||
'locale',
|
||||
'cookie',
|
||||
'resume-all-when-app-launched',
|
||||
'task-notification',
|
||||
'hide-app-menu',
|
||||
'new-task-show-downloading',
|
||||
'use-proxy',
|
||||
'all-proxy-backup',
|
||||
'log-path',
|
||||
'session-path',
|
||||
'enable-egg-features',
|
||||
'theme',
|
||||
'auto-check-update',
|
||||
'last-check-update-time'
|
||||
'cookie',
|
||||
'enable-egg-features',
|
||||
'hide-app-menu',
|
||||
'keep-window-state',
|
||||
'last-check-update-time',
|
||||
'locale',
|
||||
'log-path',
|
||||
'new-task-show-downloading',
|
||||
'open-at-login',
|
||||
'protocols',
|
||||
'resume-all-when-app-launched',
|
||||
'session-path',
|
||||
'task-notification',
|
||||
'theme',
|
||||
'use-proxy'
|
||||
]
|
||||
|
||||
const systemKeys = [
|
||||
'max-concurrent-downloads',
|
||||
'all-proxy',
|
||||
'all-proxy-passwd',
|
||||
'all-proxy-user',
|
||||
'all-proxy',
|
||||
'allow-overwrite',
|
||||
'allow-piece-length-change',
|
||||
'always-resume',
|
||||
@@ -42,10 +44,10 @@ const systemKeys = [
|
||||
'bt-save-metadata',
|
||||
'bt-seed-unverified',
|
||||
'bt-stop-timeout',
|
||||
'bt-tracker',
|
||||
'bt-tracker-connect-timeout',
|
||||
'bt-tracker-interval',
|
||||
'bt-tracker-timeout',
|
||||
'bt-tracker',
|
||||
'check-integrity',
|
||||
'checksum',
|
||||
'conditional-get',
|
||||
@@ -64,9 +66,9 @@ const systemKeys = [
|
||||
'force-save',
|
||||
'ftp-passwd',
|
||||
'ftp-pasv',
|
||||
'ftp-proxy',
|
||||
'ftp-proxy-passwd',
|
||||
'ftp-proxy-user',
|
||||
'ftp-proxy',
|
||||
'ftp-reuse-connection',
|
||||
'ftp-type',
|
||||
'ftp-user',
|
||||
@@ -77,15 +79,16 @@ const systemKeys = [
|
||||
'http-auth-challenge',
|
||||
'http-no-cache',
|
||||
'http-passwd',
|
||||
'http-proxy',
|
||||
'http-proxy-passwd',
|
||||
'http-proxy-user',
|
||||
'http-proxy',
|
||||
'http-user',
|
||||
'https-proxy',
|
||||
'https-proxy-passwd',
|
||||
'https-proxy-user',
|
||||
'https-proxy',
|
||||
'index-out',
|
||||
'lowest-speed-limit',
|
||||
'max-concurrent-downloads',
|
||||
'max-connection-per-server',
|
||||
'max-download-limit',
|
||||
'max-file-not-found',
|
||||
@@ -93,6 +96,8 @@ const systemKeys = [
|
||||
'max-resume-failure-tries',
|
||||
'max-tries',
|
||||
'max-upload-limit',
|
||||
'max-overall-download-limit',
|
||||
'max-overall-upload-limit',
|
||||
'metalink-base-uri',
|
||||
'metalink-enable-unique-protocol',
|
||||
'metalink-language',
|
||||
@@ -106,8 +111,8 @@ const systemKeys = [
|
||||
'no-proxy',
|
||||
'out',
|
||||
'parameterized-uri',
|
||||
'pause',
|
||||
'pause-metadata',
|
||||
'pause',
|
||||
'piece-length',
|
||||
'proxy-method',
|
||||
'realtime-chunk-checksum',
|
||||
|
||||
@@ -3,3 +3,9 @@ export const DARK_THEME = 'dark'
|
||||
|
||||
export const BEST_TRACKERS_URL = 'https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_best.txt'
|
||||
export const BEST_TRACKERS_IP_URL = 'https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_best_ip.txt'
|
||||
|
||||
// One Week
|
||||
export const AUTO_CHECK_UPDATE_INTERVAL = 7 * 24 * 60 * 60 * 1000
|
||||
|
||||
export const NONE_SELECTED_FILES = 'none'
|
||||
export const SELECTED_ALL_FILES = 'all'
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
export default {
|
||||
'engine-version': 'Engine Version',
|
||||
'license': 'Lizenz',
|
||||
'about': 'Über',
|
||||
'release': 'Versionen',
|
||||
'support': 'Unterstützung anfordern'
|
||||
|
||||
@@ -4,6 +4,8 @@ export default {
|
||||
'about': 'Über Motrix',
|
||||
'preferences': 'Präferenzen...',
|
||||
'check-for-updates': 'Nach Updates suchen...',
|
||||
'check-updates-now': 'Jetzt prüfen',
|
||||
'checking-for-updates': 'Nach Updates suchen ...',
|
||||
'check-for-updates-title': 'Nach Updates suchen',
|
||||
'update-available-message': 'Eine neue Version von Motrix ist verfügbar, jetzt aktualisieren?',
|
||||
'update-not-available-message': 'Sie sind auf dem neuesten Stand!',
|
||||
|
||||
@@ -3,11 +3,19 @@ export default {
|
||||
'advanced': 'Erweitert',
|
||||
'lab': 'Experimentell',
|
||||
'save': 'Speichern & übernehmen',
|
||||
'save-success-message': 'Einstellungen erfolgreich speichern',
|
||||
'save-fail-message': 'Speichern der Einstellungen fehlgeschlagen',
|
||||
'discard': 'Verwerfen',
|
||||
'startup': 'Startup',
|
||||
'open-at-login': 'Beim Login öffnen',
|
||||
'keep-window-state': 'Stellen Sie die Größe und Position des Fensters wieder her',
|
||||
'auto-resume-all': 'Alle nicht abgeschlossenen Aufgaben automatisch fortsetzen',
|
||||
'default-dir': 'Standard Speicherort',
|
||||
'default-dir': 'Standardpfad',
|
||||
'mas-default-dir-tips': 'Aufgrund der Einschränkungen durch Sandbox-Berechtigungen im App Store wird der Download Ordner als Standard empfohlen',
|
||||
'transfer-settings': 'Übertragung',
|
||||
'transfer-speed-upload': 'Upload-Limit',
|
||||
'transfer-speed-download': 'Download-Limit',
|
||||
'transfer-speed-unlimited': 'Unbegrenzt',
|
||||
'task-manage': 'Aufgaben verwalten',
|
||||
'max-concurrent-downloads': 'Maximal aktive Aufgaben',
|
||||
'max-connection-per-server': 'Maximale Verbindungen pro Server',
|
||||
@@ -29,6 +37,9 @@ export default {
|
||||
'bt-tracker-input-tips': 'Tracker-Server, einer pro Zeile',
|
||||
'bt-tracker-tips': 'Empfehlen:',
|
||||
'sync-tracker-tips': 'Von ngosang/trackerslist synchronisieren',
|
||||
'security': 'Sicherheit',
|
||||
'rpc-secret': 'RPC-Geheimnis',
|
||||
'rpc-secret-tips': 'Geheime RPC-Anleitung anzeigen',
|
||||
'developer': 'Entwickler',
|
||||
'mock-user-agent': 'User-Agent simulieren',
|
||||
'app-log-path': 'Appprotokollpfad',
|
||||
@@ -37,11 +48,14 @@ 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',
|
||||
'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, ',
|
||||
'baidu-exporter-help': 'mehr über die Verwendung zu erfahren',
|
||||
'auto-update': 'Auto-Update',
|
||||
'auto-check-update': 'Automatische Updates überprüfen',
|
||||
'last-check-update-time': 'letzte kontrolle update - zeit'
|
||||
}
|
||||
|
||||
@@ -9,8 +9,14 @@ export default {
|
||||
'torrent-task': 'Torrent',
|
||||
'uri-task-tips': 'Eine Download URL pro Zeile (magnet wird unterstützt)',
|
||||
'thunder-link-tips': 'Tipp: Thunder Links werden möglicherweise nach dem dekodieren nicht heruntergeladen',
|
||||
'new-task-uris-required': 'Bitte geben Sie mindestens eine gültige URL ein',
|
||||
'new-task-torrent-required': 'Bitte wählen Sie eine Torrent-Datei',
|
||||
'file-name': 'Dateiname',
|
||||
'file-extension': 'Dateityp',
|
||||
'file-size': 'Dateigröße',
|
||||
'selected-files-sum': 'Ausgewählt: {{selectedFilesCount}} Dateien, insgesamt {{selectedFilesTotalSize}}',
|
||||
'task-name': 'Aufgaben Name',
|
||||
'task-out': 'Umbenennen',
|
||||
'task-out': 'Dateiname',
|
||||
'task-out-tips': 'Optional, unterstützt nur Einzelaufgaben',
|
||||
'task-split': 'Splits',
|
||||
'task-dir': 'Ordner',
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
export default {
|
||||
'engine-version': 'Engine Version',
|
||||
'license': 'License',
|
||||
'about': 'About',
|
||||
'release': 'Release',
|
||||
'release': 'Releases',
|
||||
'support': 'Support'
|
||||
}
|
||||
|
||||
@@ -4,8 +4,10 @@ export default {
|
||||
'about': 'About Motrix',
|
||||
'preferences': 'Preferences...',
|
||||
'check-for-updates': 'Check for Updates...',
|
||||
'check-updates-now': 'Check now',
|
||||
'checking-for-updates': 'Checking for updates ...',
|
||||
'check-for-updates-title': 'Check for Updates',
|
||||
'update-available-message': 'A new version of Motrix is available, update now?',
|
||||
'update-available-message': 'A newer version of Motrix is available, update now?',
|
||||
'update-not-available-message': 'You are up-to-date!',
|
||||
'update-downloaded-message': 'Ready to install...',
|
||||
'update-error-message': 'Update Error',
|
||||
|
||||
@@ -3,18 +3,26 @@ export default {
|
||||
'advanced': 'Advanced',
|
||||
'lab': 'Lab',
|
||||
'save': 'Save & Apply',
|
||||
'save-success-message': 'Save preferences successfully',
|
||||
'save-fail-message': 'Save preferences failed',
|
||||
'discard': 'Discard',
|
||||
'startup': 'Startup',
|
||||
'auto-resume-all': 'Auto resume all unfinished tasks',
|
||||
'default-dir': 'Default Dir',
|
||||
'mas-default-dir-tips': 'Due to the sandbox permissions restrictions of the App Store, the default download dir is recommended to be set to Downloads directory',
|
||||
'task-manage': 'Task Manage',
|
||||
'open-at-login': 'Open at login',
|
||||
'keep-window-state': 'Keep size and position of the window when exit',
|
||||
'auto-resume-all': 'Automatically resume all unfinished tasks',
|
||||
'default-dir': 'Default Path',
|
||||
'mas-default-dir-tips': 'Due to sandbox permission restrictions of the App Store, the default download directory is recommended to be set to ~/Downloads',
|
||||
'transfer-settings': 'Transmission',
|
||||
'transfer-speed-upload': 'Upload limit',
|
||||
'transfer-speed-download': 'Download limit',
|
||||
'transfer-speed-unlimited': 'Unlimited',
|
||||
'task-manage': 'Task Management',
|
||||
'max-concurrent-downloads': 'Maximum active tasks',
|
||||
'max-connection-per-server': 'Max connection per server',
|
||||
'new-task-show-downloading': 'Auto show downloading after add task',
|
||||
'max-connection-per-server': 'Maximum connection per server',
|
||||
'new-task-show-downloading': 'Automatically show downloading after adding task',
|
||||
'continue': 'Continue',
|
||||
'task-completed-notify': 'Notification after download is complete',
|
||||
'auto-purge-record': 'Auto purge download record when app exit',
|
||||
'auto-purge-record': 'Automatically purge download records when exiting app',
|
||||
'ui': 'UI',
|
||||
'appearance': 'Appearance',
|
||||
'theme-auto': 'Auto',
|
||||
@@ -26,22 +34,28 @@ export default {
|
||||
'proxy': 'Proxy',
|
||||
'use-proxy': 'Enable Proxy',
|
||||
'bt-tracker': 'Tracker Servers',
|
||||
'bt-tracker-input-tips': 'Tracker server, one per line',
|
||||
'bt-tracker-tips': 'Recommend: ',
|
||||
'bt-tracker-input-tips': 'Tracker servers, one per line',
|
||||
'bt-tracker-tips': 'Recommended: ',
|
||||
'sync-tracker-tips': 'Sync from ngosang/trackerslist',
|
||||
'security': 'Security',
|
||||
'rpc-secret': 'RPC Secret',
|
||||
'rpc-secret-tips': 'View RPC Secret Manual',
|
||||
'developer': 'Developer',
|
||||
'mock-user-agent': 'Mock User-Agent',
|
||||
'app-log-path': 'App log path',
|
||||
'download-session-path': 'Download session path',
|
||||
'factory-reset': 'Factory Reset',
|
||||
'factory-reset-confirm': 'Are you sure you want to revert to factory settings?',
|
||||
'lab-warning': '⚠️ Enabling lab features may cause app crashes or data loss, decide for yourself!',
|
||||
'download-protocol': 'Protocol',
|
||||
'support-more-download-protocols': 'Enable more download protocols support',
|
||||
'lab-warning': '⚠️ Enabling lab features may result in app crash or data loss, decide at you own risk!',
|
||||
'download-protocol': '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, ',
|
||||
'baidu-exporter-help': 'Click here for usage',
|
||||
'auto-check-update': 'Auto check update',
|
||||
'last-check-update-time': 'Last Check Update Time'
|
||||
'auto-update': 'Auto Update',
|
||||
'auto-check-update': 'Automatically check for update',
|
||||
'last-check-update-time': 'Last Time Checking for Update'
|
||||
}
|
||||
|
||||
@@ -7,13 +7,19 @@ export default {
|
||||
'open-file': 'Open Torrent File...',
|
||||
'uri-task': 'URL',
|
||||
'torrent-task': 'Torrent',
|
||||
'uri-task-tips': 'One task url per line (support magnet)',
|
||||
'thunder-link-tips': 'Tip: Thunder links may not be downloaded after decoding',
|
||||
'uri-task-tips': 'One task url per line (supports magnet)',
|
||||
'thunder-link-tips': 'Tip: Thunder links may not be downloadable after decoding',
|
||||
'new-task-uris-required': 'Please enter at least one valid resource url',
|
||||
'new-task-torrent-required': 'Please select a torrent file',
|
||||
'file-name': 'File Name',
|
||||
'file-extension': 'File Type',
|
||||
'file-size': 'File Size',
|
||||
'selected-files-sum': 'Selected: {{selectedFilesCount}} files, total size {{selectedFilesTotalSize}}',
|
||||
'task-name': 'Task Name',
|
||||
'task-out': 'Rename',
|
||||
'task-out-tips': 'Optional, support single task',
|
||||
'task-out-tips': 'Optional (only supports single task)',
|
||||
'task-split': 'Splits',
|
||||
'task-dir': 'Dir',
|
||||
'task-dir': 'Save to',
|
||||
'pause-task': 'Pause Task',
|
||||
'task-ua': 'UA',
|
||||
'task-user-agent': 'User-Agent',
|
||||
@@ -22,61 +28,61 @@ export default {
|
||||
'navigate-to-downloading': 'Navigate to Downloading',
|
||||
'show-advanced-options': 'Advanced Options',
|
||||
'copyright-warning': 'Copyright Warning',
|
||||
'copyright-warning-message': 'The file you want to download may be copyrighted audio or video, please make sure you have the copyright license.',
|
||||
'copyright-yes': 'Yes, I have',
|
||||
'copyright-no': 'No',
|
||||
'copyright-error-message': 'Adding task failed due to copyright issues',
|
||||
'pause-task-success': 'Pause task "{{taskName}}" success',
|
||||
'pause-task-fail': 'Pause task "{{taskName}}" fail',
|
||||
'copyright-warning-message': 'The file you want to download may be copyrighted audio or video, please ensure that you have permission to access to it.',
|
||||
'copyright-yes': 'Yes, I have permission',
|
||||
'copyright-no': 'No, I don\'t have permission',
|
||||
'copyright-error-message': 'Failed to add task due to copyright issue',
|
||||
'pause-task-success': 'Successfully paused task "{{taskName}}"',
|
||||
'pause-task-fail': 'Failed to pause task "{{taskName}}"',
|
||||
'resume-task': 'Resume Task',
|
||||
'resume-task-success': 'Resume task "{{taskName}}" success',
|
||||
'resume-task-fail': 'Resume task "{{taskName}}" fail',
|
||||
'resume-task-success': 'Successfully resumed task "{{taskName}}"',
|
||||
'resume-task-fail': 'Failed to resume task "{{taskName}}"',
|
||||
'delete-task': 'Delete Task',
|
||||
'delete-selected-tasks': 'Delete Selected Tasks',
|
||||
'delete-task-confirm': 'Are you sure to remove the "{{taskName}}" download task?',
|
||||
'delete-task-confirm': 'Are you sure you want to remove download task "{{taskName}}"?',
|
||||
'delete-task-label': 'Delete with Files',
|
||||
'delete-task-success': 'Delete task "{{taskName}}" success',
|
||||
'delete-task-fail': 'Delete task "{{taskName}}" fail',
|
||||
'remove-task-file-fail': 'Failed to delete task file, please delete it manually',
|
||||
'delete-task-success': 'Successfully deleted task "{{taskName}}"',
|
||||
'delete-task-fail': 'Failed to delete task "{{taskName}}"',
|
||||
'remove-task-file-fail': 'Failed to delete task file(s), please delete them manually',
|
||||
'remove-task-config-file-fail': 'Failed to delete task config file, please delete it manually',
|
||||
'move-task-up': 'Move Task Up',
|
||||
'move-task-down': 'Move Task Down',
|
||||
'pause-all-task': 'Pause All Task',
|
||||
'pause-all-task-success': 'Pause all task success',
|
||||
'pause-all-task-fail': 'Pause all task fail',
|
||||
'resume-all-task': 'Resume All Task',
|
||||
'resume-all-task-success': 'Resume all task success',
|
||||
'resume-all-task-fail': 'Resume all task fail',
|
||||
'pause-all-task': 'Pause All Tasks',
|
||||
'pause-all-task-success': 'Successfully paused all tasks',
|
||||
'pause-all-task-fail': 'Failed to pause all tasks',
|
||||
'resume-all-task': 'Resume All Tasks',
|
||||
'resume-all-task-success': 'Successfully resumed all tasks',
|
||||
'resume-all-task-fail': 'Failed to resume all tasks',
|
||||
'clear-recent-tasks': 'Clear Recent Tasks',
|
||||
'purge-record': 'Purge Task Record',
|
||||
'purge-record-success': 'Purge task record success',
|
||||
'purge-record-fail': 'Purge task record fail',
|
||||
'purge-record-success': 'Successfully purged task records',
|
||||
'purge-record-fail': 'Failed to purge task records',
|
||||
'refresh-list': 'Refresh Task List',
|
||||
'no-task': 'There are no current downloads',
|
||||
'no-task': 'There are no current tasks',
|
||||
'copy-link': 'Copy Link',
|
||||
'copy-link-success': 'Copy link success',
|
||||
'copy-link-success': 'Successfully copied link',
|
||||
'remove-record': 'Remove Task Record',
|
||||
'remove-record-confirm': 'Are you sure to remove the "{{taskName}}" download record?',
|
||||
'remove-record-confirm': 'Are you sure you want to remove download record for "{{taskName}}"?',
|
||||
'remove-record-label': 'Delete with Files',
|
||||
'remove-record-success': 'Remove task "{{taskName}}" record success',
|
||||
'remove-record-fail': 'Remove task "{{taskName}}" record fail',
|
||||
'remove-record-success': 'Successfully removed task record for "{{taskName}}"',
|
||||
'remove-record-fail': 'Failed to remove task record for "{{taskName}}"',
|
||||
'show-in-folder': 'Show Task In Folder',
|
||||
'file-not-exist': 'File does not exist or has been deleted',
|
||||
'file-not-exist': 'Target file does not exist or has been deleted',
|
||||
'file-path-error': 'File path error',
|
||||
'opening-task-message': 'Opening "{{taskName}}" ...',
|
||||
'get-task-name': 'Get the task name...',
|
||||
'get-task-name': 'Getting task name...',
|
||||
'remaining-prefix': 'Remaining',
|
||||
'select-torrent': 'Drag the torrent here, or click to select',
|
||||
'task-info-dialog-title': '{{title}} Detail',
|
||||
'download-start-message': 'Start download {{taskName}}',
|
||||
'download-pause-message': 'Pause download {{taskName}}',
|
||||
'download-stop-message': '{{taskName}} download stopped',
|
||||
'download-error-message': '{{taskName}} download error occurred',
|
||||
'download-complete-message': '{{taskName}} download completed',
|
||||
'select-torrent': 'Drag torrent file here, or click to select',
|
||||
'task-info-dialog-title': '{{title}} Details',
|
||||
'download-start-message': 'Started downloading {{taskName}}',
|
||||
'download-pause-message': 'Paused downloading {{taskName}}',
|
||||
'download-stop-message': 'Stopped downloading {{taskName}}',
|
||||
'download-error-message': 'Error occurred when downloading {{taskName}}',
|
||||
'download-complete-message': 'Completed downloading {{taskName}}',
|
||||
'download-complete-notify': 'Download Completed',
|
||||
'bt-download-complete-message': '{{taskName}} download completed, seeding',
|
||||
'bt-download-complete-notify': 'BT Download Completed, Seeding...',
|
||||
'bt-download-complete-tips': 'Tips: You can stop the task to end the seeding',
|
||||
'download-fail-message': '{{taskName}} download failed',
|
||||
'bt-download-complete-message': 'Completed downloading {{taskName}}, seeding',
|
||||
'bt-download-complete-notify': 'BT Download Completed, seeding...',
|
||||
'bt-download-complete-tips': 'Tips: You can stop a task to end its seeding',
|
||||
'download-fail-message': 'Failed to download {{taskName}}',
|
||||
'download-fail-notify': 'Download Failed'
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
export default {
|
||||
'engine-version': 'نسخهی موتور',
|
||||
'license': 'مجوز منبع باز',
|
||||
'about': 'درباره ما',
|
||||
'release': 'نسخههای منتشر شده',
|
||||
'support': 'حمایت'
|
||||
|
||||
@@ -4,6 +4,8 @@ export default {
|
||||
'about': 'درباره ماتریکس',
|
||||
'preferences': 'تنظیمات دلخواه',
|
||||
'check-for-updates': 'چک کردن آپدیت...',
|
||||
'check-updates-now': 'اکنون بررسی کنید',
|
||||
'checking-for-updates': 'بررسی برای به روز رسانی ...',
|
||||
'check-for-updates-title': 'چک کردن آپدیت',
|
||||
'update-available-message': 'نسخهی جدید ماتریکس دردسترس است. آپدیت انجام شود؟',
|
||||
'update-not-available-message': 'شما آخرین نسخه را دارید!',
|
||||
|
||||
@@ -3,11 +3,19 @@ export default {
|
||||
'advanced': 'پیشرفته',
|
||||
'lab': 'آزمایشگاه',
|
||||
'save': 'ذخیره و اجرا',
|
||||
'save-success-message': 'تنظیمات را با موفقیت ذخیره کنید',
|
||||
'save-fail-message': 'تنظیمات ذخیره نشد',
|
||||
'discard': 'لغو',
|
||||
'startup': 'شروع برنامه',
|
||||
'open-at-login': 'باز در ورود به سیستم',
|
||||
'keep-window-state': 'بازگرداندن اندازه و موقعیت پنجره',
|
||||
'auto-resume-all': 'ادامه دادن اتوماتیک تمام تسکهای ناتمام',
|
||||
'default-dir': 'فولدر پیشفرض',
|
||||
'mas-default-dir-tips': 'بخاطر محدودیتهای دسترسی سندباکس از اپ استور، پیشنهاد میشود فولدر دانلود پیشفرض ست شده باشد.',
|
||||
'transfer-settings': 'انتقال',
|
||||
'transfer-speed-upload': 'محدودیت آپلود',
|
||||
'transfer-speed-download': 'محدودیت دانلود',
|
||||
'transfer-speed-unlimited': 'نامحدود',
|
||||
'task-manage': 'مدیریت تسک',
|
||||
'max-concurrent-downloads': 'حداکثر تسکهای فعال',
|
||||
'max-connection-per-server': 'حداکثر اتصال برای هر سرور',
|
||||
@@ -29,6 +37,9 @@ export default {
|
||||
'bt-tracker-input-tips': 'ردیاب سرور، در هر خط',
|
||||
'bt-tracker-tips': 'توصیه:',
|
||||
'sync-tracker-tips': 'داده همگام سازی از ngosang/trackerslist',
|
||||
'security': 'امنیت',
|
||||
'rpc-secret': 'مخفی RPC',
|
||||
'rpc-secret-tips': 'مشاهده RPC راز دفترچه راهنما',
|
||||
'developer': 'توسعهدهنده',
|
||||
'mock-user-agent': 'Mock User-Agent',
|
||||
'app-log-path': 'ادرس لاگ برنامه',
|
||||
@@ -37,11 +48,14 @@ export default {
|
||||
'factory-reset-confirm': 'آیا شما مطمئن هستید؟',
|
||||
'lab-warning': '⚠️ فعالسازی امکانات آزمایشگاه ممکن است باعث کرش برنامه یا از دست دادن دیتا بشود، خودتون تصمیم بگیرین!',
|
||||
'download-protocol': 'پروتکل',
|
||||
'support-more-download-protocols': 'فعالسازی حمایت از پروتکلهای دانلود بیشتر',
|
||||
'protocols-default-client': 'به عنوان مشتری پیش فرض برای پروتکل های زیر تنظیم شده است',
|
||||
'protocols-magnet': 'آهن ربا [ magnet:// ]',
|
||||
'protocols-thunder': 'تندر [ thunder:// ]',
|
||||
'browser-extensions': 'افزونهها',
|
||||
'baidu-exporter': 'BaiduExporter',
|
||||
'browser-extensions-tips': 'تهیه شده توسط انجمن، ',
|
||||
'baidu-exporter-help': 'برای استفاده اینجا کلیک کنید',
|
||||
'auto-update': 'به روز رسانی خودکار',
|
||||
'auto-check-update': 'اتوماتیک برای آپدیت چک کن',
|
||||
'last-check-update-time': 'آخرین باری که برای آپدیت چک شده'
|
||||
}
|
||||
|
||||
@@ -9,6 +9,12 @@ export default {
|
||||
'torrent-task': 'تورنت',
|
||||
'uri-task-tips': 'یک آدرس دانلود در هر خط',
|
||||
'thunder-link-tips': 'نکته: لینکهای تاندر ممکن هست بعد دیکد کردن دانلود نشوند',
|
||||
'new-task-uris-required': 'لطفا حداقل یک آدرس دانلود معتبر وارد کنید',
|
||||
'new-task-torrent-required': 'لطفا فایل تورنت را انتخاب کنید',
|
||||
'file-name': 'نام فایل',
|
||||
'file-extension': 'امتداد',
|
||||
'file-size': 'اندازه',
|
||||
'selected-files-sum': 'انتخاب شده: {{selectedFilesCount}} فایلها، مجموع {{selectedFilesTotalSize}}',
|
||||
'task-name': 'اسم تسک',
|
||||
'task-out': 'تغییرنام',
|
||||
'task-out-tips': 'اختیاری، حمایت تک تسک',
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
export default {
|
||||
'engine-version': 'Version du moteur',
|
||||
'license': 'Licence',
|
||||
'about': 'À Propos',
|
||||
'release': 'Release',
|
||||
'support': 'Support'
|
||||
|
||||
@@ -4,6 +4,8 @@ export default {
|
||||
'about': 'À Propos de Motrix',
|
||||
'preferences': 'Préférences...',
|
||||
'check-for-updates': 'Vérifier les mises à jour...',
|
||||
'check-updates-now': 'Vérifier maintenant',
|
||||
'checking-for-updates': 'Vérification des mises à jour ...',
|
||||
'check-for-updates-title': 'Vérifier les mises à jour',
|
||||
'update-available-message': 'Une nouvelle version de Motrix est disponible, mise à jour maintenant?',
|
||||
'update-not-available-message': 'Vous êtes à jour!',
|
||||
|
||||
@@ -3,11 +3,19 @@ export default {
|
||||
'advanced': 'Avancé',
|
||||
'lab': 'Labo',
|
||||
'save': 'Sauver et appliquer',
|
||||
'save-success-message': 'Enregistrer les préférences avec succès',
|
||||
'save-fail-message': 'La sauvegarde des préférences a échoué',
|
||||
'discard': 'Annuler les changement',
|
||||
'startup': 'Démarrage',
|
||||
'open-at-login': 'Ouvrir à la connexion',
|
||||
'keep-window-state': 'Restaurez la taille et la position de la fenêtre',
|
||||
'auto-resume-all': 'Reprendre les tâches non terminées',
|
||||
'default-dir': 'Répertoire par défaut',
|
||||
'mas-default-dir-tips': 'En raison des restrictions d\'autorisations du bac à sable de l\'App Store, il est recommandé de définir le répertoire de téléchargement par défaut sur le répertoire Téléchargements.',
|
||||
'transfer-settings': 'Transmission',
|
||||
'transfer-speed-upload': 'Limite de téléchargement',
|
||||
'transfer-speed-download': 'Limite de téléchargement',
|
||||
'transfer-speed-unlimited': 'Unlimited',
|
||||
'task-manage': 'Tâches',
|
||||
'max-concurrent-downloads': 'Nombre de tâches active au maximum',
|
||||
'max-connection-per-server': 'Nombre maximum de connexions par serveurs',
|
||||
@@ -29,6 +37,9 @@ export default {
|
||||
'bt-tracker-input-tips': 'Serveur de suivi, un par ligne',
|
||||
'bt-tracker-tips': 'Recommander:',
|
||||
'sync-tracker-tips': 'Sync de ngosang/trackerslist',
|
||||
'security': 'Sécurité',
|
||||
'rpc-secret': 'RPC Secret',
|
||||
'rpc-secret-tips': 'Voir le manuel secret RPC',
|
||||
'developer': 'Développeur',
|
||||
'mock-user-agent': 'Mock User-Agent',
|
||||
'app-log-path': 'Chemin des logs',
|
||||
@@ -37,11 +48,14 @@ 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',
|
||||
'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é, ',
|
||||
'baidu-exporter-help': 'Cliquez ici pour voir l\'utilisation',
|
||||
'auto-update': 'Mettre à jour',
|
||||
'auto-check-update': 'Mise à jour automatique',
|
||||
'last-check-update-time': 'dernier contrôle la mise à jour du temps'
|
||||
}
|
||||
|
||||
@@ -9,6 +9,12 @@ export default {
|
||||
'torrent-task': 'Torrent',
|
||||
'uri-task-tips': 'Un lien par ligne (supporte les magnets)',
|
||||
'thunder-link-tips': 'Astuce: Les liens Thunder ne doivent pas être téléchargés après décodage',
|
||||
'new-task-uris-required': 'Veuillez entrer au moins une URL de ressource valide',
|
||||
'new-task-torrent-required': 'Veuillez sélectionner un fichier torrent',
|
||||
'file-name': 'Nom de fichier',
|
||||
'file-extension': 'Ext',
|
||||
'file-size': 'Taille',
|
||||
'selected-files-sum': 'Sélectionné: {{selectedFilesCount}} fichiers, total {{selectedFilesTotalSize}}',
|
||||
'task-name': 'Nom de la tâche',
|
||||
'task-out': 'Renommer',
|
||||
'task-out-tips': 'Optionel, supporte une seule tâche',
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
export default {
|
||||
'engine-version': 'バージョンを確認',
|
||||
'license': 'ライセンス',
|
||||
'about': '私たちについて',
|
||||
'release': 'リリースノート',
|
||||
'support': 'サポート'
|
||||
|
||||
@@ -4,6 +4,17 @@ export default {
|
||||
'about': 'Motrix について',
|
||||
'preferences': '環境設定...',
|
||||
'check-for-updates': '更新を確認...',
|
||||
'check-updates-now': '今すぐチェック',
|
||||
'checking-for-updates': 'アップデートをチェックしています...',
|
||||
'check-for-updates-title': 'アップデートをチェック',
|
||||
'update-available-message': '新しいバージョンのMotrixが利用可能です、今すぐ更新しますか?',
|
||||
'update-not-available-message': 'あなたは最新です!',
|
||||
'update-downloaded-message': 'インストールする準備ができています...',
|
||||
'update-error-message': '更新エラー',
|
||||
'engine-damaged-message': 'エンジンが破損しています、再インストールしてください : (',
|
||||
'engine-missing-message': 'エンジンが見つかりません。再インストールしてください : (',
|
||||
'system-error-title': 'システムエラー',
|
||||
'system-error-message': 'アプリケーションの起動に失敗しました:{{message}}',
|
||||
'hide': 'Motrix を隠す',
|
||||
'hide-others': 'ほかを隠す',
|
||||
'unhide': 'すべてを表示',
|
||||
|
||||
@@ -3,11 +3,19 @@ export default {
|
||||
'advanced': '詳細設定',
|
||||
'lab': '実験室',
|
||||
'save': '保存して適用',
|
||||
'save-success-message': '設定を保存します',
|
||||
'save-fail-message': '設定を保存できませんでした',
|
||||
'discard': '放棄',
|
||||
'startup': '起動',
|
||||
'open-at-login': '自動的に起動します',
|
||||
'auto-resume-all': '起動後自動的に未完了タスクを再開',
|
||||
'keep-window-state': 'ウィンドウのサイズと位置を元に戻します',
|
||||
'default-dir': '既定の保存先',
|
||||
'mas-default-dir-tips': 'App Store の Sandbox 制限のため,デフォルトディレクトリ設定は「Download」を推奨します。',
|
||||
'transfer-settings': '転送設定',
|
||||
'transfer-speed-upload': 'アップロード制限',
|
||||
'transfer-speed-download': 'ダウンロード制限',
|
||||
'transfer-speed-unlimited': '無制限',
|
||||
'task-manage': 'タスク管理',
|
||||
'max-concurrent-downloads': '最大同時タスク数',
|
||||
'max-connection-per-server': '最大サーバ接続数',
|
||||
@@ -29,6 +37,9 @@ export default {
|
||||
'bt-tracker-input-tips': 'トラッカーサーバ、一行に一つ',
|
||||
'bt-tracker-tips': 'お勧め:',
|
||||
'sync-tracker-tips': 'ngosang/trackerslist からの同期',
|
||||
'security': 'セキュリティ',
|
||||
'rpc-secret': 'RPCシークレット',
|
||||
'rpc-secret-tips': 'RPCシークレットマニュアルの閲覧',
|
||||
'developer': '開発者',
|
||||
'mock-user-agent': '偽装ユーザーエージェント(UA)',
|
||||
'app-log-path': 'ログディレクトリを適用',
|
||||
@@ -37,11 +48,14 @@ export default {
|
||||
'factory-reset-confirm': '本当に初期設定に戻しますか?',
|
||||
'lab-warning': '⚠️ベータ機能をオンにするとアプリケーションの強制終了やデータが損失する可能性があります。自己責任でお願いします。',
|
||||
'download-protocol': 'プロトコル',
|
||||
'support-more-download-protocols': 'より多くのプロトコルを適用',
|
||||
'protocols-default-client': '以下のプロトコルのデフォルトクライアントとして設定',
|
||||
'protocols-magnet': '磁石 [ magnet:// ]',
|
||||
'protocols-thunder': 'サンダー [ thunder:// ]',
|
||||
'browser-extensions': 'ブラウザ拡張機能',
|
||||
'baidu-exporter': 'バイドゥオンラインストレージ拡張機能',
|
||||
'browser-extensions-tips': '他のユーザによって作成されたものです。動作は保証できません。',
|
||||
'baidu-exporter-help': 'ここをクリックし使用説明を見る',
|
||||
'auto-update': '自動更新',
|
||||
'auto-check-update': '更新を自動で確認する',
|
||||
'last-check-update-time': '前回更新確認時間'
|
||||
}
|
||||
|
||||
@@ -9,6 +9,12 @@ export default {
|
||||
'torrent-task': 'torrentタスク',
|
||||
'uri-task-tips': 'URLを複数追加したとき、一行につき一つのリンクとなります(マグネットリンクをサポート)',
|
||||
'thunder-link-tips': '注意:Thunder(Xunlei)リンク解析後、ダウンロードできるかは保証できません',
|
||||
'new-task-uris-required': '少なくとも1つの有効なリソースURLを入力してください',
|
||||
'new-task-torrent-required': 'トレントファイルを選択してください',
|
||||
'file-name': 'ファイル名',
|
||||
'file-extension': '拡張子',
|
||||
'file-size': 'サイズ',
|
||||
'selected-files-sum': '選択済み:{{selectedFilesCount}}ファイル、合計{{selectedFilesTotalSize}}',
|
||||
'task-name': 'タスク名',
|
||||
'task-out': '名前を変更',
|
||||
'task-out-tips': 'オプション(単独タスクのみサポート)',
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
export default {
|
||||
'engine-version': '엔진 버전',
|
||||
'license': '라이선스',
|
||||
'about': '정보',
|
||||
'release': '배포',
|
||||
'support': '지원'
|
||||
|
||||
@@ -4,6 +4,8 @@ export default {
|
||||
'about': 'Motrix 정보',
|
||||
'preferences': '설정...',
|
||||
'check-for-updates': '업데이트 확인...',
|
||||
'check-updates-now': '지금 확인',
|
||||
'checking-for-updates': '업데이트 확인 중 ...',
|
||||
'check-for-updates-title': '업데이트 확인',
|
||||
'update-available-message': '새 버전의 Motrix를 사용할 수 있습니다, 지금 업데이트 하시겠습니까?',
|
||||
'update-not-available-message': '최신 버전을 사용 중입니다!',
|
||||
|
||||
@@ -3,11 +3,19 @@ export default {
|
||||
'advanced': '고급',
|
||||
'lab': '실험실',
|
||||
'save': '저장 & 적용',
|
||||
'save-success-message': '환경 설정을 성공적으로 저장 합니다',
|
||||
'save-fail-message': '환경 설정 저장 실패',
|
||||
'discard': '포기',
|
||||
'startup': '시작',
|
||||
'open-at-login': '로그인 시 엽니다',
|
||||
'auto-resume-all': '완료되지 않은 모든 작업 자동 재개',
|
||||
'keep-window-state': '창의 크기와 위치를 복원합니다',
|
||||
'default-dir': '기본 폴더',
|
||||
'mas-default-dir-tips': '앱스토어의 샌드박스 사용 권한 제한으로 인해 기본 다운로드 폴더를 다운로드 폴더로 설정하는 것이 권장됩니다.',
|
||||
'transfer-settings': '전송 설정',
|
||||
'transfer-speed-upload': '업로드 제한',
|
||||
'transfer-speed-download': '다운로드 제한',
|
||||
'transfer-speed-unlimited': '무제한',
|
||||
'task-manage': '작업 관리',
|
||||
'max-concurrent-downloads': '최대 활성 작업',
|
||||
'max-connection-per-server': '서버당 최대 연결 수',
|
||||
@@ -26,9 +34,12 @@ export default {
|
||||
'proxy': '프록시',
|
||||
'use-proxy': '프록시 허용',
|
||||
'bt-tracker': '트래커 서버',
|
||||
'bt-tracker-input-tips': '추적 서버, 한 줄에 하나씩',
|
||||
'bt-tracker-input-tips': '트래커 서버, 한 줄에 하나씩',
|
||||
'bt-tracker-tips': '추천 :',
|
||||
'sync-tracker-tips': 'ngosang/trackerslist 에서 데이터 동기화',
|
||||
'sync-tracker-tips': 'ngosang/trackerslist에서 동기화',
|
||||
'security': '보안',
|
||||
'rpc-secret': 'RPC 비밀',
|
||||
'rpc-secret-tips': 'RPC 비밀 매뉴얼보기',
|
||||
'developer': '개발자',
|
||||
'mock-user-agent': '사용자 에이전트 흉내',
|
||||
'app-log-path': '앱 로그 경로',
|
||||
@@ -37,11 +48,14 @@ export default {
|
||||
'factory-reset-confirm': '초기 설정으로 되돌리시겠습니까?',
|
||||
'lab-warning': '⚠️ 실험실 기능을 활성화하면 앱 충돌이나 데이터 손실을 초래할 수 있으므로 직접 결정하십시오!',
|
||||
'download-protocol': '프로토콜',
|
||||
'support-more-download-protocols': '더 많은 다운로드 프로토콜 지원 허용',
|
||||
'protocols-default-client': '다음 프로토콜의 기본 클라이언트로 설정',
|
||||
'protocols-magnet': '자석 [ magnet:// ]',
|
||||
'protocols-thunder': '우뢰 [ thunder:// ]',
|
||||
'browser-extensions': '확장 프로그램',
|
||||
'baidu-exporter': 'BaiduExporter',
|
||||
'browser-extensions-tips': '커뮤니티에서 제공하는, ',
|
||||
'baidu-exporter-help': '사용법을 보려면 여기를 클릭하십시오.',
|
||||
'auto-update': '자동 업데이트',
|
||||
'auto-check-update': '업데이트 자동 확인',
|
||||
'last-check-update-time': '마지막 업데이트 확인 시간'
|
||||
}
|
||||
|
||||
@@ -9,6 +9,12 @@ export default {
|
||||
'torrent-task': '토렌트',
|
||||
'uri-task-tips': '한 줄의 하나의 작업 URL (마그넷 지원)',
|
||||
'thunder-link-tips': '팁 : 디코딩 후 썬더 링크가 다운로드 되지 않을 수 있습니다.',
|
||||
'new-task-uris-required': '적어도 하나 이상의 유효한 리소스 URL을 입력하십시오.',
|
||||
'new-task-torrent-required': '토런트 파일을 선택하십시오',
|
||||
'file-name': '파일 이름',
|
||||
'file-extension': '파일 확장자',
|
||||
'file-size': '파일 크기',
|
||||
'selected-files-sum': '선택됨: {{selectedFilesCount}} 개의 파일, 총 {{selectedFilesTotalSize}}',
|
||||
'task-name': '작업 이름',
|
||||
'task-out': '이름 변경',
|
||||
'task-out-tips': '선택적, 단일 작업 지원',
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
export default {
|
||||
'engine-version': 'Versão da Engine',
|
||||
'license': 'Licença',
|
||||
'about': 'Sobre',
|
||||
'release': 'Release',
|
||||
'support': 'Suporte'
|
||||
|
||||
@@ -4,6 +4,8 @@ export default {
|
||||
'about': 'Sobre o Motrix',
|
||||
'preferences': 'Preferências...',
|
||||
'check-for-updates': 'Verificar por Atualizações...',
|
||||
'check-updates-now': 'Verificar agora',
|
||||
'checking-for-updates': 'Verificar atualizações ...',
|
||||
'check-for-updates-title': 'Verificar por Atualizações',
|
||||
'update-available-message': 'Uma nova versão do Motrix está disponível, atualize agora?',
|
||||
'update-not-available-message': 'Você esta atualizado!',
|
||||
|
||||
@@ -3,11 +3,19 @@ export default {
|
||||
'advanced': 'Avançado',
|
||||
'lab': 'Lab',
|
||||
'save': 'Salvar & Aplicar',
|
||||
'save-success-message': 'Salvar preferências com sucesso',
|
||||
'save-fail-message': 'Salvar preferências falhadas',
|
||||
'discard': 'Descartar',
|
||||
'startup': 'Inicialização',
|
||||
'open-at-login': 'Abra no login',
|
||||
'keep-window-state': 'Restaurar tamanho e posição da janela',
|
||||
'auto-resume-all': 'Auto resumir todas as tarefas não finalizadas',
|
||||
'default-dir': 'Diretório Padrão',
|
||||
'mas-default-dir-tips': 'Devido às restrições de permissões do sandbox da App Store, recomenda-se que o diretório de download padrão seja definido como o diretório de downloads',
|
||||
'transfer-settings': 'Transmissão',
|
||||
'transfer-speed-upload': 'limite de envio',
|
||||
'transfer-speed-download': 'limite de transferência',
|
||||
'transfer-speed-unlimited': 'Ilimitado',
|
||||
'task-manage': 'Gerenciador de Tarefas',
|
||||
'max-concurrent-downloads': 'Máximo de tarefas ativas',
|
||||
'max-connection-per-server': 'Máximo de coneções por servidor',
|
||||
@@ -29,6 +37,9 @@ export default {
|
||||
'bt-tracker-input-tips': 'servidor rastreador, um por linha',
|
||||
'bt-tracker-tips': 'Recomendar:',
|
||||
'sync-tracker-tips': 'Sincronizar dados de ngosang/trackerslist',
|
||||
'security': 'Segurança',
|
||||
'rpc-secret': 'Segredo de RPC',
|
||||
'rpc-secret-tips': 'Veja o manual secreto de RPC',
|
||||
'developer': 'Desenvolverdor',
|
||||
'mock-user-agent': 'Mock User-Agent',
|
||||
'app-log-path': 'Diretório de logs',
|
||||
@@ -37,11 +48,14 @@ 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',
|
||||
'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, ',
|
||||
'baidu-exporter-help': 'Clique aqui ver as instruções de uso',
|
||||
'auto-update': 'Atualização automática',
|
||||
'auto-check-update': 'A verificação automática de atualizações',
|
||||
'last-check-update-time': 'última verificação do tempo de atualização'
|
||||
}
|
||||
|
||||
@@ -9,6 +9,12 @@ export default {
|
||||
'torrent-task': 'Torrent',
|
||||
'uri-task-tips': 'Uma url por linha (magnet links são aceitos)',
|
||||
'thunder-link-tips': 'Dica: Thunder links não podem ser baixados após decodificados',
|
||||
'new-task-uris-required': 'Por favor, insira pelo menos um URL de recurso válido',
|
||||
'new-task-torrent-required': 'Por favor, selecione um arquivo torrent',
|
||||
'file-name': 'Nome do arquivo',
|
||||
'file-extension': 'Ext',
|
||||
'file-size': 'Tamanho',
|
||||
'selected-files-sum': 'Selecionado: {{selectedFilesCount}} arquivos, total {{selectedFilesTotalSize}}',
|
||||
'task-name': 'Nome da Tarefa',
|
||||
'task-out': 'Renomear',
|
||||
'task-out-tips': 'Opcional, suporte únicc tarefa',
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
export default {
|
||||
'engine-version': 'Engine Versiyonu',
|
||||
'license': 'Lisans',
|
||||
'about': 'Hakkında',
|
||||
'release': 'Sürüm',
|
||||
'support': 'Destek'
|
||||
|
||||
@@ -4,6 +4,8 @@ export default {
|
||||
'about': 'Motrix Hakkında',
|
||||
'preferences': 'Ayarlar...',
|
||||
'check-for-updates': 'Güncellemeleri kontrol et...',
|
||||
'check-updates-now': 'Şimdi kontrol et',
|
||||
'checking-for-updates': 'Güncellemeleri kontrol ediyor ...',
|
||||
'check-for-updates-title': 'Güncellemeleri kontrol et',
|
||||
'update-available-message': 'Motrix\'in yeni bir sürümü var, şimdi güncelle?',
|
||||
'update-not-available-message': 'Gündemdesin!',
|
||||
|
||||