Compare commits
36 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7012040fec | |||
| dd6e01b91d | |||
| f19a637a4b | |||
| fff378d99c | |||
| 0fde4467e8 | |||
| f2e8ce241b | |||
| 6644fed425 | |||
| cd7ab8999f | |||
| ecbe7f40c3 | |||
| ff808dc462 | |||
| 4d7922f112 | |||
| bd1547cd0b | |||
| e579146260 | |||
| 9d18333a93 | |||
| 5daece6dab | |||
| 8bfb7d906e | |||
| f4ece13ceb | |||
| 763ea6ee7a | |||
| cc27cb3459 | |||
| b8c57df4f5 | |||
| e6765380bc | |||
| 0172a003d3 | |||
| ef2b3a04b2 | |||
| 75f5760b33 | |||
| 1f033d1e47 | |||
| 458e21479b | |||
| 46e5324ae6 | |||
| de8996b3b3 | |||
| 1f83848358 | |||
| 69d3ade305 | |||
| a0a1fe90f7 | |||
| 553bf80960 | |||
| 04446b582e | |||
| f10f4a2588 | |||
| 513f566a59 | |||
| f49f083044 |
@@ -1,10 +1,10 @@
|
||||
'use strict'
|
||||
|
||||
const chalk = require('chalk')
|
||||
const electron = require('electron')
|
||||
const path = require('path')
|
||||
const path = require('node:path')
|
||||
const { spawn } = require('node:child_process')
|
||||
const { say } = require('cfonts')
|
||||
const { spawn } = require('child_process')
|
||||
const electron = require('electron')
|
||||
const chalk = require('chalk')
|
||||
const Webpack = require('webpack')
|
||||
const WebpackDevServer = require('webpack-dev-server')
|
||||
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
process.env.BABEL_ENV = 'main'
|
||||
|
||||
const devMode = process.env.NODE_ENV !== 'production'
|
||||
const path = require('path')
|
||||
const path = require('node:path')
|
||||
const Webpack = require('webpack')
|
||||
const ESLintPlugin = require('eslint-webpack-plugin')
|
||||
const TerserPlugin = require('terser-webpack-plugin')
|
||||
const { dependencies } = require('../package.json')
|
||||
const { appId } = require('../electron-builder.json')
|
||||
const Webpack = require('webpack')
|
||||
const TerserPlugin = require('terser-webpack-plugin');
|
||||
const ESLintPlugin = require('eslint-webpack-plugin');
|
||||
const devMode = process.env.NODE_ENV !== 'production'
|
||||
|
||||
let mainConfig = {
|
||||
entry: {
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
|
||||
process.env.BABEL_ENV = 'renderer'
|
||||
|
||||
const devMode = process.env.NODE_ENV !== 'production'
|
||||
const path = require('path')
|
||||
const { dependencies } = require('../package.json')
|
||||
const path = require('node:path')
|
||||
const Webpack = require('webpack')
|
||||
const TerserPlugin = require('terser-webpack-plugin');
|
||||
const CopyWebpackPlugin = require('copy-webpack-plugin')
|
||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
|
||||
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin')
|
||||
const { VueLoaderPlugin } = require('vue-loader')
|
||||
const ESLintPlugin = require('eslint-webpack-plugin');
|
||||
const CopyWebpackPlugin = require('copy-webpack-plugin')
|
||||
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin')
|
||||
const ESLintPlugin = require('eslint-webpack-plugin')
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin')
|
||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
|
||||
const TerserPlugin = require('terser-webpack-plugin')
|
||||
const { dependencies } = require('../package.json')
|
||||
const devMode = process.env.NODE_ENV !== 'production'
|
||||
|
||||
/**
|
||||
* List of node_modules to include in webpack bundle
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
|
||||
process.env.BABEL_ENV = 'web'
|
||||
|
||||
const devMode = process.env.NODE_ENV !== 'production'
|
||||
const path = require('path')
|
||||
const path = require('node:path')
|
||||
const { dependencies } = require('../package.json')
|
||||
const Webpack = require('webpack')
|
||||
const TerserPlugin = require('terser-webpack-plugin');
|
||||
const CopyWebpackPlugin = require('copy-webpack-plugin')
|
||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
|
||||
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin')
|
||||
const { VueLoaderPlugin } = require('vue-loader')
|
||||
const ESLintPlugin = require('eslint-webpack-plugin');
|
||||
const CopyWebpackPlugin = require('copy-webpack-plugin')
|
||||
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin')
|
||||
const ESLintPlugin = require('eslint-webpack-plugin')
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin')
|
||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
|
||||
const TerserPlugin = require('terser-webpack-plugin')
|
||||
const devMode = process.env.NODE_ENV !== 'production'
|
||||
|
||||
/**
|
||||
* List of node_modules to include in webpack bundle
|
||||
@@ -48,7 +48,7 @@ let webConfig = {
|
||||
loader: 'sass-loader',
|
||||
options: {
|
||||
implementation: require('sass'),
|
||||
additionalData: '@import "@/components/Theme/Variables.scss";',
|
||||
additionalData: '@import "@/components/Theme/Variables.scss"',
|
||||
sassOptions: {
|
||||
includePaths:[__dirname, 'src']
|
||||
}
|
||||
@@ -66,7 +66,7 @@ let webConfig = {
|
||||
options: {
|
||||
implementation: require('sass'),
|
||||
indentedSyntax: true,
|
||||
additionalData: '@import "@/components/Theme/Variables.scss";',
|
||||
additionalData: '@import "@/components/Theme/Variables.scss"',
|
||||
sassOptions: {
|
||||
includePaths:[__dirname, 'src']
|
||||
}
|
||||
|
||||
+7
-7
@@ -18,17 +18,17 @@ module.exports = {
|
||||
rules: {
|
||||
'no-console': 'off',
|
||||
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
||||
'indent': ['error', 2],
|
||||
indent: ['error', 2],
|
||||
'vue/script-indent': ['error', 2, {
|
||||
'baseIndent': 1
|
||||
}],
|
||||
baseIndent: 1
|
||||
}]
|
||||
},
|
||||
overrides: [
|
||||
{
|
||||
'files': ['*.vue'],
|
||||
'rules': {
|
||||
'indent': 'off'
|
||||
files: ['*.vue'],
|
||||
rules: {
|
||||
indent: 'off'
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
|
||||
+16
-5
@@ -1,8 +1,10 @@
|
||||
# Motrix
|
||||
|
||||
<a href="https://motrix.app">
|
||||
<img src="./static/512x512.png" width="256" alt="App Icon" />
|
||||
</a>
|
||||
<p>
|
||||
<a href="https://motrix.app">
|
||||
<img src="./static/512x512.png" width="256" alt="Motrix App Icon" />
|
||||
</a>
|
||||
</p>
|
||||
|
||||
## 一款全能的下载工具
|
||||
|
||||
@@ -47,12 +49,21 @@ scoop install motrix
|
||||
|
||||
### macOS
|
||||
|
||||
macOS 用户可以使用 `brew cask` 安装 Motrix,感谢 [@Mitscherlich](https://github.com/Mitscherlich) 的 [PR](https://github.com/Homebrew/homebrew-cask/pull/59494)。
|
||||
macOS 用户可以使用 `brew` 安装 Motrix,感谢 [@Mitscherlich](https://github.com/Mitscherlich) 的 [PR](https://github.com/Homebrew/homebrew-cask/pull/59494)。
|
||||
|
||||
```bash
|
||||
brew update && brew install --cask motrix
|
||||
brew update && brew install motrix
|
||||
```
|
||||
|
||||
#### 自动更新
|
||||
Motrix v1.8.0+ 版本更改了应用 BundleID ( `net.agalwood.Motrix` => `app.motrix.native` ), Motrix v1.6.11 的自动更新会因为签名不一致而失败。[Motrix 安装助手](https://github.com/motrixapp/motrix-install-assistant)将帮助您安装最新的 Motrix 应用程序。
|
||||
|
||||
<p>
|
||||
<a href="https://github.com/motrixapp/motrix-install-assistant">
|
||||
<img src="https://raw.githubusercontent.com/motrixapp/motrix-install-assistant/main/build/256x256.png" width="192" alt="Motrix Install Assistant Icon" />
|
||||
</a>
|
||||
</p>
|
||||
|
||||
### Linux
|
||||
|
||||
你可以下载 `AppImage` (适用于所有 Linux 发行版)或 `snap` 来安装 Motrix,更多 Linux 安装包格式请查看 [GitHub/release](https://github.com/agalwood/Motrix/releases) 。
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
# Motrix
|
||||
|
||||
<a href="https://motrix.app">
|
||||
<img src="./static/512x512.png" width="256" alt="App Icon" />
|
||||
</a>
|
||||
<p>
|
||||
<a href="https://motrix.app">
|
||||
<img src="./static/512x512.png" width="256" alt="Motrix App Icon" />
|
||||
</a>
|
||||
</p>
|
||||
|
||||
## A full-featured download manager
|
||||
|
||||
@@ -47,12 +49,22 @@ scoop install motrix
|
||||
|
||||
### macOS
|
||||
|
||||
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).
|
||||
The macOS users can install Motrix using `brew`, thanks to [PR](https://github.com/Homebrew/homebrew-cask/pull/59494) of [@Mitscherlich](https://github.com/Mitscherlich).
|
||||
|
||||
```bash
|
||||
brew update && brew install --cask motrix
|
||||
brew update && brew install motrix
|
||||
```
|
||||
|
||||
#### Auto Update
|
||||
|
||||
Since Motrix v1.8.0 and later versions changed the App BundleID ( `net.agalwood.Motrix` => `app.motrix.native` ), the automatic update of Motrix v1.6.11 will fail. [Motrix Install Assistant](https://github.com/motrixapp/motrix-install-assistant) will help you install the latest Motrix application.
|
||||
|
||||
<p>
|
||||
<a href="https://github.com/motrixapp/motrix-install-assistant">
|
||||
<img src="https://raw.githubusercontent.com/motrixapp/motrix-install-assistant/main/build/256x256.png" width="192" alt="Motrix Install Assistant Icon" />
|
||||
</a>
|
||||
</p>
|
||||
|
||||
### Linux
|
||||
|
||||
You can download the `AppImage` (for all Linux distributions) or `snap` to install Motrix, see [GitHub/release](https://github.com/agalwood/Motrix/releases) for more Linux installation package formats.
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 103 KiB |
@@ -29,9 +29,9 @@
|
||||
// TODO: Remove script once https://github.com/electron/electron/issues/17972 is solved by
|
||||
// `electron-builder`
|
||||
|
||||
const fs = require('fs')
|
||||
const { spawn } = require('child_process')
|
||||
const { chdir } = require('process')
|
||||
const fs = require('node:fs')
|
||||
const { spawn } = require('node:child_process')
|
||||
const { chdir } = require('node:process')
|
||||
|
||||
const pkg = require('../package.json')
|
||||
const binName = `${pkg.name}`.toLowerCase()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
require('dotenv').config()
|
||||
const { join } = require('path')
|
||||
const { join } = require('node:path')
|
||||
const { notarize } = require('@electron/notarize')
|
||||
const { appId } = require('../electron-builder.json')
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 451 KiB |
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 530 KiB |
+11
-11
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Motrix",
|
||||
"version": "1.8.16",
|
||||
"version": "1.8.19",
|
||||
"description": "A full-featured download manager",
|
||||
"homepage": "https://motrix.app",
|
||||
"author": {
|
||||
@@ -32,14 +32,14 @@
|
||||
"postinstall": "electron-builder install-app-deps && npm run lint:fix"
|
||||
},
|
||||
"engines": {
|
||||
"node" : ">=16.0.0"
|
||||
"node": ">=16.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"node-fetch": "^2.6.1",
|
||||
"ws": "^8.13.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.21.5",
|
||||
"@babel/core": "^7.21.8",
|
||||
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
||||
"@babel/plugin-transform-runtime": "^7.21.4",
|
||||
"@babel/preset-env": "^7.21.5",
|
||||
@@ -60,15 +60,15 @@
|
||||
"babel-plugin-component": "^1.1.1",
|
||||
"bittorrent-peerid": "^1.3.6",
|
||||
"blob-util": "^2.0.2",
|
||||
"cfonts": "^3.1.1",
|
||||
"cfonts": "^3.2.0",
|
||||
"chalk": "^4.1.2",
|
||||
"copy-webpack-plugin": "^11.0.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"css-loader": "^6.7.3",
|
||||
"css-minimizer-webpack-plugin": "^5.0.0",
|
||||
"del": "^6.1.1",
|
||||
"electron": "^22.3.7",
|
||||
"electron-builder": "^24.3.0",
|
||||
"electron": "^22.3.9",
|
||||
"electron-builder": "^24.4.0",
|
||||
"electron-devtools-installer": "^3.2.0",
|
||||
"electron-is": "^3.0.0",
|
||||
"electron-log": "^4.4.8",
|
||||
@@ -80,7 +80,7 @@
|
||||
"eslint-plugin-import": "^2.27.5",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
"eslint-plugin-promise": "^6.1.1",
|
||||
"eslint-plugin-vue": "^9.11.0",
|
||||
"eslint-plugin-vue": "^9.12.0",
|
||||
"eslint-webpack-plugin": "^4.0.1",
|
||||
"file-loader": "^6.2.0",
|
||||
"html-webpack-plugin": "^5.5.1",
|
||||
@@ -94,7 +94,7 @@
|
||||
"sass": "1.62.1",
|
||||
"sass-loader": "^12.6.0",
|
||||
"style-loader": "^3.3.2",
|
||||
"terser-webpack-plugin": "^5.3.7",
|
||||
"terser-webpack-plugin": "^5.3.8",
|
||||
"vue": "^2.7.14",
|
||||
"vue-electron": "^1.0.6",
|
||||
"vue-loader": "^15.10.1",
|
||||
@@ -104,9 +104,9 @@
|
||||
"vue-template-compiler": "^2.7.14",
|
||||
"vuex": "^3.6.2",
|
||||
"vuex-router-sync": "^5.0.0",
|
||||
"webpack": "^5.81.0",
|
||||
"webpack-cli": "^5.0.2",
|
||||
"webpack-dev-server": "^4.13.3",
|
||||
"webpack": "^5.82.1",
|
||||
"webpack-cli": "^5.1.1",
|
||||
"webpack-dev-server": "^4.15.0",
|
||||
"webpack-hot-middleware": "^2.25.3",
|
||||
"webpack-merge": "^5.8.0",
|
||||
"worker-loader": "^3.0.8"
|
||||
|
||||
+92
-24
@@ -1,14 +1,15 @@
|
||||
import { EventEmitter } from 'events'
|
||||
import { EventEmitter } from 'node:events'
|
||||
import { readFile, unlink } from 'node:fs'
|
||||
import { extname, basename } from 'node:path'
|
||||
import { app, shell, dialog, ipcMain } from 'electron'
|
||||
import is from 'electron-is'
|
||||
import { readFile, unlink } from 'fs'
|
||||
import { extname, basename } from 'path'
|
||||
import { isEmpty, isEqual } from 'lodash'
|
||||
|
||||
import {
|
||||
APP_RUN_MODE,
|
||||
AUTO_SYNC_TRACKER_INTERVAL,
|
||||
AUTO_CHECK_UPDATE_INTERVAL
|
||||
AUTO_CHECK_UPDATE_INTERVAL,
|
||||
PROXY_SCOPES
|
||||
} from '@shared/constants'
|
||||
import { checkIsNeedRun } from '@shared/utils'
|
||||
import {
|
||||
@@ -16,6 +17,7 @@ import {
|
||||
fetchBtTrackerFromSource,
|
||||
reduceTrackerString
|
||||
} from '@shared/utils/tracker'
|
||||
import { showItemInFolder } from './utils'
|
||||
import logger from './core/Logger'
|
||||
import Context from './core/Context'
|
||||
import ConfigManager from './core/ConfigManager'
|
||||
@@ -60,22 +62,22 @@ export default class Application extends EventEmitter {
|
||||
|
||||
this.initEngineClient()
|
||||
|
||||
this.initTouchBarManager()
|
||||
|
||||
this.initThemeManager()
|
||||
|
||||
this.initTrayManager()
|
||||
|
||||
this.initTouchBarManager()
|
||||
|
||||
this.initDockManager()
|
||||
|
||||
this.initAutoLaunchManager()
|
||||
|
||||
this.initEnergyManager()
|
||||
|
||||
this.initUpdaterManager()
|
||||
|
||||
this.initProtocolManager()
|
||||
|
||||
this.initUpdaterManager()
|
||||
|
||||
this.handleCommands()
|
||||
|
||||
this.handleEvents()
|
||||
@@ -287,6 +289,49 @@ export default class Application extends EventEmitter {
|
||||
})
|
||||
}
|
||||
|
||||
watchProxyChange () {
|
||||
const { userConfig } = this.configManager
|
||||
const key = 'proxy'
|
||||
this.configListeners[key] = userConfig.onDidChange(key, async (newValue, oldValue) => {
|
||||
logger.info(`[Motrix] detected ${key} value change event:`, newValue, oldValue)
|
||||
this.updateManager.setupProxy(newValue)
|
||||
|
||||
const { enable, server, bypass, scope = [] } = newValue
|
||||
const system = enable && server && scope.includes(PROXY_SCOPES.DOWNLOAD)
|
||||
? {
|
||||
'all-proxy': server,
|
||||
'no-proxy': bypass
|
||||
}
|
||||
: {}
|
||||
this.configManager.setSystemConfig(system)
|
||||
this.engineClient.call('changeGlobalOption', system)
|
||||
})
|
||||
}
|
||||
|
||||
watchLocaleChange () {
|
||||
const { userConfig } = this.configManager
|
||||
const key = 'locale'
|
||||
this.configListeners[key] = userConfig.onDidChange(key, async (newValue, oldValue) => {
|
||||
logger.info(`[Motrix] detected ${key} value change event:`, newValue, oldValue)
|
||||
this.localeManager.changeLanguageByLocale(newValue)
|
||||
.then(() => {
|
||||
this.menuManager.handleLocaleChange(newValue)
|
||||
this.trayManager.handleLocaleChange(newValue)
|
||||
})
|
||||
this.sendCommandToAll('application:update-locale', { locale: newValue })
|
||||
})
|
||||
}
|
||||
|
||||
watchThemeChange () {
|
||||
const { userConfig } = this.configManager
|
||||
const key = 'theme'
|
||||
this.configListeners[key] = userConfig.onDidChange(key, async (newValue, oldValue) => {
|
||||
logger.info(`[Motrix] detected ${key} value change event:`, newValue, oldValue)
|
||||
this.themeManager.updateSystemTheme(newValue)
|
||||
this.sendCommandToAll('application:update-theme', { theme: newValue })
|
||||
})
|
||||
}
|
||||
|
||||
watchShowProgressBarChange () {
|
||||
const { userConfig } = this.configManager
|
||||
const key = 'show-progress-bar'
|
||||
@@ -394,22 +439,13 @@ export default class Application extends EventEmitter {
|
||||
this.upnp.closeClient()
|
||||
}
|
||||
|
||||
autoSyncTracker () {
|
||||
const enable = this.configManager.getUserConfig('auto-sync-tracker')
|
||||
const lastTime = this.configManager.getUserConfig('last-sync-tracker-time')
|
||||
const result = checkIsNeedRun(enable, lastTime, AUTO_SYNC_TRACKER_INTERVAL)
|
||||
logger.info('[Motrix] auto sync tracker checkIsNeedRun:', result)
|
||||
if (!result) {
|
||||
return
|
||||
}
|
||||
|
||||
const source = this.configManager.getUserConfig('tracker-source')
|
||||
syncTrackers (source, proxy) {
|
||||
if (isEmpty(source)) {
|
||||
return
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
fetchBtTrackerFromSource(source).then((data) => {
|
||||
fetchBtTrackerFromSource(source, proxy).then((data) => {
|
||||
logger.warn('[Motrix] auto sync tracker data:', data)
|
||||
if (!data || data.length === 0) {
|
||||
return
|
||||
@@ -431,6 +467,21 @@ export default class Application extends EventEmitter {
|
||||
}, 500)
|
||||
}
|
||||
|
||||
autoSyncTrackers () {
|
||||
const enable = this.configManager.getUserConfig('auto-sync-tracker')
|
||||
const lastTime = this.configManager.getUserConfig('last-sync-tracker-time')
|
||||
const result = checkIsNeedRun(enable, lastTime, AUTO_SYNC_TRACKER_INTERVAL)
|
||||
logger.info('[Motrix] auto sync tracker checkIsNeedRun:', result)
|
||||
if (!result) {
|
||||
return
|
||||
}
|
||||
|
||||
const source = this.configManager.getUserConfig('tracker-source')
|
||||
const proxy = this.configManager.getUserConfig('proxy', { enable: false })
|
||||
|
||||
this.syncTrackers(source, proxy)
|
||||
}
|
||||
|
||||
autoResumeTask () {
|
||||
const enabled = this.configManager.getUserConfig('resume-all-when-app-launched')
|
||||
if (!enabled) {
|
||||
@@ -632,9 +683,12 @@ export default class Application extends EventEmitter {
|
||||
}
|
||||
|
||||
const enabled = this.configManager.getUserConfig('auto-check-update')
|
||||
const proxy = this.configManager.getSystemConfig('all-proxy')
|
||||
const lastTime = this.configManager.getUserConfig('last-check-update-time')
|
||||
const autoCheck = checkIsNeedRun(enabled, lastTime, AUTO_CHECK_UPDATE_INTERVAL)
|
||||
this.updateManager = new UpdateManager({
|
||||
autoCheck: checkIsNeedRun(enabled, lastTime, AUTO_CHECK_UPDATE_INTERVAL)
|
||||
autoCheck,
|
||||
proxy
|
||||
})
|
||||
this.handleUpdaterEvents()
|
||||
}
|
||||
@@ -660,7 +714,7 @@ export default class Application extends EventEmitter {
|
||||
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)
|
||||
win.setProgressBar(1)
|
||||
})
|
||||
|
||||
this.updateManager.on('update-cancelled', (event) => {
|
||||
@@ -694,7 +748,7 @@ export default class Application extends EventEmitter {
|
||||
|
||||
const sessionPath = this.context.get('session-path')
|
||||
setTimeout(() => {
|
||||
unlink(sessionPath, function (err) {
|
||||
unlink(sessionPath, (err) => {
|
||||
logger.info('[Motrix] Removed the download seesion file:', err)
|
||||
})
|
||||
|
||||
@@ -742,7 +796,7 @@ export default class Application extends EventEmitter {
|
||||
|
||||
this.on('application:reset-session', () => this.resetSession())
|
||||
|
||||
this.on('application:reset', () => {
|
||||
this.on('application:factory-reset', () => {
|
||||
this.offConfigListeners()
|
||||
this.configManager.reset()
|
||||
this.relaunch()
|
||||
@@ -823,6 +877,17 @@ export default class Application extends EventEmitter {
|
||||
this.openExternal(url)
|
||||
})
|
||||
|
||||
this.on('application:reveal-in-folder', (data) => {
|
||||
const { gid, path } = data
|
||||
logger.info('[Motrix] application:reveal-in-folder===>', path)
|
||||
if (path) {
|
||||
showItemInFolder(path)
|
||||
}
|
||||
if (gid) {
|
||||
this.sendCommandToAll('application:show-task-detail', { gid })
|
||||
}
|
||||
})
|
||||
|
||||
this.on('help:official-website', () => {
|
||||
const url = 'https://motrix.app/'
|
||||
this.openExternal(url)
|
||||
@@ -858,7 +923,7 @@ export default class Application extends EventEmitter {
|
||||
|
||||
handleEvents () {
|
||||
this.once('application:initialized', () => {
|
||||
this.autoSyncTracker()
|
||||
this.autoSyncTrackers()
|
||||
|
||||
this.autoResumeTask()
|
||||
|
||||
@@ -872,6 +937,9 @@ export default class Application extends EventEmitter {
|
||||
this.watchProtocolsChange()
|
||||
this.watchRunModeChange()
|
||||
this.watchShowProgressBarChange()
|
||||
this.watchProxyChange()
|
||||
this.watchLocaleChange()
|
||||
this.watchThemeChange()
|
||||
|
||||
this.on('download-status-change', (downloading) => {
|
||||
this.trayManager.handleDownloadStatusChange(downloading)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { EventEmitter } from 'events'
|
||||
import { EventEmitter } from 'node:events'
|
||||
import { app } from 'electron'
|
||||
import is from 'electron-is'
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ export default {
|
||||
'new-bt-task': 'application:new-bt-task',
|
||||
'pause-all-task': 'application:pause-all-task',
|
||||
'resume-all-task': 'application:resume-all-task',
|
||||
'reveal-in-folder': 'application:reveal-in-folder',
|
||||
'preferences': 'application:preferences',
|
||||
'about': 'application:about'
|
||||
}
|
||||
|
||||
@@ -3,18 +3,22 @@ import is from 'electron-is'
|
||||
import Store from 'electron-store'
|
||||
|
||||
import {
|
||||
getConfigBasePath,
|
||||
getDhtPath,
|
||||
getUserDownloadsPath,
|
||||
getMaxConnectionPerServer
|
||||
getMaxConnectionPerServer,
|
||||
getUserDownloadsPath
|
||||
} from '../utils/index'
|
||||
import {
|
||||
APP_RUN_MODE,
|
||||
APP_THEME,
|
||||
EMPTY_STRING,
|
||||
ENGINE_RPC_PORT,
|
||||
IP_VERSION,
|
||||
LOGIN_SETTING_OPTIONS,
|
||||
NGOSANG_TRACKERS_BEST_IP_URL_CDN,
|
||||
NGOSANG_TRACKERS_BEST_URL_CDN
|
||||
NGOSANG_TRACKERS_BEST_URL_CDN,
|
||||
PROXY_SCOPES,
|
||||
PROXY_SCOPE_OPTIONS
|
||||
} from '@shared/constants'
|
||||
import { CHROME_UA } from '@shared/ua'
|
||||
import { separateConfig } from '@shared/utils'
|
||||
@@ -29,22 +33,20 @@ export default class ConfigManager {
|
||||
}
|
||||
|
||||
init () {
|
||||
this.initSystemConfig()
|
||||
this.initUserConfig()
|
||||
this.initSystemConfig()
|
||||
}
|
||||
|
||||
/**
|
||||
* Some aria2 conf
|
||||
* Aria2 Configuration Priority
|
||||
* system.json > built-in aria2.conf
|
||||
* https://aria2.github.io/manual/en/html/aria2c.html
|
||||
*
|
||||
* Best bt trackers
|
||||
* @see https://github.com/ngosang/trackerslist
|
||||
*
|
||||
* @see https://github.com/XIU2/TrackersListCollection
|
||||
*/
|
||||
initSystemConfig () {
|
||||
this.systemConfig = new Store({
|
||||
name: 'system',
|
||||
cwd: getConfigBasePath(),
|
||||
/* eslint-disable quote-props */
|
||||
defaults: {
|
||||
'all-proxy': EMPTY_STRING,
|
||||
@@ -72,10 +74,10 @@ export default class ConfigManager {
|
||||
'no-proxy': EMPTY_STRING,
|
||||
'pause-metadata': false,
|
||||
'pause': true,
|
||||
'rpc-listen-port': 16800,
|
||||
'rpc-listen-port': ENGINE_RPC_PORT,
|
||||
'rpc-secret': EMPTY_STRING,
|
||||
'seed-ratio': 1,
|
||||
'seed-time': 60,
|
||||
'seed-ratio': 2,
|
||||
'seed-time': 2880,
|
||||
'split': getMaxConnectionPerServer(),
|
||||
'user-agent': CHROME_UA
|
||||
}
|
||||
@@ -87,6 +89,7 @@ export default class ConfigManager {
|
||||
initUserConfig () {
|
||||
this.userConfig = new Store({
|
||||
name: 'user',
|
||||
cwd: getConfigBasePath(),
|
||||
// Schema need electron-store upgrade to 3.x.x,
|
||||
// but it will cause the application build to fail.
|
||||
// schema: {
|
||||
@@ -97,7 +100,6 @@ export default class ConfigManager {
|
||||
// },
|
||||
/* eslint-disable quote-props */
|
||||
defaults: {
|
||||
'all-proxy-backup': EMPTY_STRING,
|
||||
'auto-check-update': is.macOS(),
|
||||
'auto-hide-window': false,
|
||||
'auto-sync-tracker': true,
|
||||
@@ -116,6 +118,12 @@ export default class ConfigManager {
|
||||
'no-confirm-before-delete-task': false,
|
||||
'open-at-login': false,
|
||||
'protocols': { 'magnet': true, 'thunder': false },
|
||||
'proxy': {
|
||||
'enable': false,
|
||||
'server': EMPTY_STRING,
|
||||
'bypass': EMPTY_STRING,
|
||||
'scope': PROXY_SCOPE_OPTIONS
|
||||
},
|
||||
'resume-all-when-app-launched': false,
|
||||
'run-mode': APP_RUN_MODE.STANDARD,
|
||||
'show-progress-bar': true,
|
||||
@@ -128,7 +136,6 @@ export default class ConfigManager {
|
||||
'tray-theme': APP_THEME.AUTO,
|
||||
'tray-speedometer': is.macOS(),
|
||||
'update-channel': 'latest',
|
||||
'use-proxy': false,
|
||||
'window-state': {}
|
||||
}
|
||||
/* eslint-enable quote-props */
|
||||
@@ -139,13 +146,18 @@ export default class ConfigManager {
|
||||
fixSystemConfig () {
|
||||
// Remove aria2c unrecognized options
|
||||
const { others } = separateConfig(this.systemConfig.store)
|
||||
if (!others) {
|
||||
return
|
||||
if (others && Object.keys(others).length > 0) {
|
||||
Object.keys(others).forEach(key => {
|
||||
this.systemConfig.delete(key)
|
||||
})
|
||||
}
|
||||
|
||||
Object.keys(others).forEach(key => {
|
||||
this.systemConfig.delete(key)
|
||||
})
|
||||
const proxy = this.getUserConfig('proxy', { enable: false })
|
||||
const { enable, server, bypass, scope = [] } = proxy
|
||||
if (enable && server && scope.includes(PROXY_SCOPES.DOWNLOAD)) {
|
||||
this.setSystemConfig('all-proxy', server)
|
||||
this.setSystemConfig('no-proxy', bypass)
|
||||
}
|
||||
|
||||
// Fix spawn ENAMETOOLONG on Windows
|
||||
const tracker = reduceTrackerString(this.systemConfig.get('bt-tracker'))
|
||||
|
||||
@@ -3,7 +3,6 @@ import {
|
||||
getEnginePath,
|
||||
getAria2BinPath,
|
||||
getAria2ConfPath,
|
||||
getLogPath,
|
||||
getSessionPath
|
||||
} from '../utils'
|
||||
|
||||
@@ -14,12 +13,17 @@ export default class Context {
|
||||
this.init()
|
||||
}
|
||||
|
||||
getLogPath () {
|
||||
const { path } = logger.transports.file.getFile()
|
||||
return path
|
||||
}
|
||||
|
||||
init () {
|
||||
// The key of Context cannot be the same as that of userConfig and systemConfig.
|
||||
this.context = {
|
||||
platform: platform,
|
||||
arch: arch,
|
||||
'log-path': getLogPath(),
|
||||
'log-path': this.getLogPath(),
|
||||
'session-path': getSessionPath(),
|
||||
'engine-path': getEnginePath(platform, arch),
|
||||
'aria2-bin-path': getAria2BinPath(platform, arch),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { spawn } from 'node:child_process'
|
||||
import { existsSync, writeFile, unlink } from 'node:fs'
|
||||
import is from 'electron-is'
|
||||
import { existsSync, writeFile, unlink } from 'fs'
|
||||
import { spawn } from 'child_process'
|
||||
|
||||
import logger from './Logger'
|
||||
import { getI18n } from '../ui/Locale'
|
||||
@@ -43,9 +43,9 @@ export default class Engine {
|
||||
const pid = this.instance.pid.toString()
|
||||
this.writePidFile(pidPath, pid)
|
||||
|
||||
this.instance.once('close', function () {
|
||||
this.instance.once('close', () => {
|
||||
try {
|
||||
unlink(pidPath, function (err) {
|
||||
unlink(pidPath, (err) => {
|
||||
if (err) {
|
||||
logger.warn(`[Motrix] Unlink engine process pid file failed: ${err}`)
|
||||
}
|
||||
@@ -56,11 +56,11 @@ export default class Engine {
|
||||
})
|
||||
|
||||
if (is.dev()) {
|
||||
this.instance.stdout.on('data', function (data) {
|
||||
this.instance.stdout.on('data', (data) => {
|
||||
logger.log('[Motrix] engine stdout===>', data.toString())
|
||||
})
|
||||
|
||||
this.instance.stderr.on('data', function (data) {
|
||||
this.instance.stderr.on('data', (data) => {
|
||||
logger.log('[Motrix] engine stderr===>', data.toString())
|
||||
})
|
||||
}
|
||||
|
||||
+10
-1
@@ -1,7 +1,16 @@
|
||||
import { join } from 'node:path'
|
||||
import is from 'electron-is'
|
||||
import logger from 'electron-log'
|
||||
|
||||
logger.transports.file.level = is.production() ? 'info' : 'silly'
|
||||
import { IS_PORTABLE, PORTABLE_EXECUTABLE_DIR } from '@shared/constants'
|
||||
|
||||
const level = is.production() ? 'info' : 'silly'
|
||||
logger.transports.file.level = level
|
||||
|
||||
if (IS_PORTABLE) {
|
||||
logger.transports.file.resolvePath = () => join(PORTABLE_EXECUTABLE_DIR, 'main.log')
|
||||
}
|
||||
|
||||
logger.info('[Motrix] Logger init')
|
||||
logger.warn('[Motrix] Logger init')
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { EventEmitter } from 'events'
|
||||
import { EventEmitter } from 'node:events'
|
||||
import { app } from 'electron'
|
||||
import is from 'electron-is'
|
||||
import { parse } from 'querystring'
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { EventEmitter } from 'events'
|
||||
import { resolve } from 'path'
|
||||
import { EventEmitter } from 'node:events'
|
||||
import { resolve } from 'node:path'
|
||||
import { dialog } from 'electron'
|
||||
import is from 'electron-is'
|
||||
import { autoUpdater } from 'electron-updater'
|
||||
|
||||
import { PROXY_SCOPES } from '@shared/constants'
|
||||
import logger from './Logger'
|
||||
import { getI18n } from '../ui/Locale'
|
||||
|
||||
@@ -22,6 +23,9 @@ export default class UpdateManager extends EventEmitter {
|
||||
this.updater.autoDownload = false
|
||||
this.updater.autoInstallOnAppQuit = false
|
||||
this.updater.logger = logger
|
||||
logger.info('[Motrix] setup proxy:', this.options.proxy)
|
||||
this.setupProxy(this.options.proxy)
|
||||
|
||||
this.autoCheckData = {
|
||||
checkEnable: this.options.autoCheck,
|
||||
userCheck: false
|
||||
@@ -29,6 +33,31 @@ export default class UpdateManager extends EventEmitter {
|
||||
this.init()
|
||||
}
|
||||
|
||||
setupProxy (proxy) {
|
||||
const { enable, server, scope = [] } = proxy
|
||||
if (!enable || !server || !scope.includes(PROXY_SCOPES.UPDATE_APP)) {
|
||||
this.updater.netSession.setProxy({
|
||||
proxyRules: undefined
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
const url = new URL(server)
|
||||
const { username, password, protocol = 'http:', host, port } = url
|
||||
const proxyRules = `${protocol}//${host}`
|
||||
|
||||
logger.info(`[Motrix] setup proxy: ${proxyRules}`, username, password, protocol, host, port)
|
||||
this.updater.netSession.setProxy({
|
||||
proxyRules
|
||||
})
|
||||
|
||||
if (server.includes('@')) {
|
||||
this.updater.signals.login((_authInfo, callback) => {
|
||||
callback(username, password)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
init () {
|
||||
// Event: error
|
||||
// Event: checking-for-update
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import is from 'electron-is'
|
||||
import { EventEmitter } from 'events'
|
||||
import { EventEmitter } from 'node:events'
|
||||
import { app } from 'electron'
|
||||
|
||||
import { bytesToSize } from '@shared/utils'
|
||||
|
||||
@@ -5,20 +5,20 @@ const localeManager = new LocaleManager({
|
||||
resources
|
||||
})
|
||||
|
||||
export function getLocaleManager () {
|
||||
export const getLocaleManager = () => {
|
||||
return localeManager
|
||||
}
|
||||
|
||||
export function setupLocaleManager (locale) {
|
||||
export const setupLocaleManager = (locale) => {
|
||||
localeManager.changeLanguageByLocale(locale)
|
||||
|
||||
return localeManager
|
||||
}
|
||||
|
||||
export function getI18n () {
|
||||
export const getI18n = () => {
|
||||
return localeManager.getI18n()
|
||||
}
|
||||
|
||||
export function getI18nTranslator () {
|
||||
export const getI18nTranslator = () => {
|
||||
return localeManager.getI18n().t
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { EventEmitter } from 'events'
|
||||
import { EventEmitter } from 'node:events'
|
||||
import { Menu } from 'electron'
|
||||
|
||||
import keymap from '@shared/keymap'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { EventEmitter } from 'events'
|
||||
import { EventEmitter } from 'node:events'
|
||||
import { nativeTheme } from 'electron'
|
||||
|
||||
import { APP_THEME } from '@shared/constants'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { EventEmitter } from 'events'
|
||||
import { join } from 'path'
|
||||
import { EventEmitter } from 'node:events'
|
||||
import { join } from 'node:path'
|
||||
import { TouchBar, nativeImage } from 'electron'
|
||||
|
||||
import { handleCommand } from '../utils/menu'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { EventEmitter } from 'events'
|
||||
import { join } from 'path'
|
||||
import { EventEmitter } from 'node:events'
|
||||
import { join } from 'node:path'
|
||||
import { Tray, Menu, nativeImage } from 'electron'
|
||||
import is from 'electron-is'
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { join } from 'path'
|
||||
import { EventEmitter } from 'events'
|
||||
import { join } from 'node:path'
|
||||
import { EventEmitter } from 'node:events'
|
||||
import { debounce } from 'lodash'
|
||||
import { app, shell, screen, BrowserWindow } from 'electron'
|
||||
import is from 'electron-is'
|
||||
@@ -168,6 +168,10 @@ export default class WindowManager extends EventEmitter {
|
||||
|
||||
destroyWindow (page) {
|
||||
const win = this.getWindow(page)
|
||||
if (!win) {
|
||||
return
|
||||
}
|
||||
|
||||
this.removeWindow(page)
|
||||
win.removeListener('closed')
|
||||
win.removeListener('move')
|
||||
|
||||
+57
-33
@@ -1,46 +1,54 @@
|
||||
import { app, nativeTheme } from 'electron'
|
||||
import { resolve } from 'node:path'
|
||||
import { access, constants, existsSync, lstatSync } from 'node:fs'
|
||||
import { app, nativeTheme, shell } from 'electron'
|
||||
import is from 'electron-is'
|
||||
import { resolve } from 'path'
|
||||
import { existsSync, lstatSync } from 'fs'
|
||||
|
||||
import {
|
||||
APP_THEME,
|
||||
ENGINE_MAX_CONNECTION_PER_SERVER,
|
||||
IP_VERSION
|
||||
IP_VERSION,
|
||||
IS_PORTABLE,
|
||||
PORTABLE_EXECUTABLE_DIR
|
||||
} from '@shared/constants'
|
||||
import { engineBinMap, engineArchMap } from '../configs/engine'
|
||||
import logger from '../core/Logger'
|
||||
|
||||
export function getLogPath () {
|
||||
export const getUserDataPath = () => {
|
||||
return IS_PORTABLE ? PORTABLE_EXECUTABLE_DIR : app.getPath('userData')
|
||||
}
|
||||
|
||||
export const getSystemLogPath = () => {
|
||||
return app.getPath('logs')
|
||||
}
|
||||
|
||||
export function getDhtPath (protocol) {
|
||||
const name = protocol === IP_VERSION.V6 ? 'dht6.dat' : 'dht.dat'
|
||||
return resolve(app.getPath('userData'), `./${name}`)
|
||||
}
|
||||
|
||||
export function getSessionPath () {
|
||||
return resolve(app.getPath('userData'), './download.session')
|
||||
}
|
||||
|
||||
export function getEnginePidPath () {
|
||||
return resolve(app.getPath('userData'), './engine.pid')
|
||||
}
|
||||
|
||||
export function getUserDataPath () {
|
||||
return app.getPath('userData')
|
||||
}
|
||||
|
||||
export function getUserDownloadsPath () {
|
||||
export const getUserDownloadsPath = () => {
|
||||
return app.getPath('downloads')
|
||||
}
|
||||
|
||||
export function getEngineBin (platform) {
|
||||
export const getConfigBasePath = () => {
|
||||
const path = getUserDataPath()
|
||||
return path
|
||||
}
|
||||
|
||||
export const getSessionPath = () => {
|
||||
return resolve(getUserDataPath(), './download.session')
|
||||
}
|
||||
|
||||
export const getEnginePidPath = () => {
|
||||
return resolve(getUserDataPath(), './engine.pid')
|
||||
}
|
||||
|
||||
export const getDhtPath = (protocol) => {
|
||||
const name = protocol === IP_VERSION.V6 ? 'dht6.dat' : 'dht.dat'
|
||||
return resolve(getUserDataPath(), `./${name}`)
|
||||
}
|
||||
|
||||
export const getEngineBin = (platform) => {
|
||||
const result = engineBinMap[platform] || ''
|
||||
return result
|
||||
}
|
||||
|
||||
export function getEngineArch (platform, arch) {
|
||||
export const getEngineArch = (platform, arch) => {
|
||||
if (!['darwin', 'win32', 'linux'].includes(platform)) {
|
||||
return ''
|
||||
}
|
||||
@@ -76,7 +84,7 @@ export const getAria2ConfPath = (platform, arch) => {
|
||||
return resolve(base, './aria2.conf')
|
||||
}
|
||||
|
||||
export function transformConfig (config) {
|
||||
export const transformConfig = (config) => {
|
||||
const result = []
|
||||
for (const [k, v] of Object.entries(config)) {
|
||||
if (v !== '') {
|
||||
@@ -86,7 +94,7 @@ export function transformConfig (config) {
|
||||
return result
|
||||
}
|
||||
|
||||
export function isRunningInDmg () {
|
||||
export const isRunningInDmg = () => {
|
||||
if (!is.macOS() || is.dev()) {
|
||||
return false
|
||||
}
|
||||
@@ -95,7 +103,7 @@ export function isRunningInDmg () {
|
||||
return result
|
||||
}
|
||||
|
||||
export function moveAppToApplicationsFolder (errorMsg = '') {
|
||||
export const moveAppToApplicationsFolder = (errorMsg = '') => {
|
||||
return new Promise((resolve, reject) => {
|
||||
try {
|
||||
const result = app.moveToApplicationsFolder()
|
||||
@@ -110,7 +118,7 @@ export function moveAppToApplicationsFolder (errorMsg = '') {
|
||||
})
|
||||
}
|
||||
|
||||
export function splitArgv (argv) {
|
||||
export const splitArgv = (argv) => {
|
||||
const args = []
|
||||
const extra = {}
|
||||
for (const arg of argv) {
|
||||
@@ -126,7 +134,7 @@ export function splitArgv (argv) {
|
||||
return { args, extra }
|
||||
}
|
||||
|
||||
export function parseArgvAsUrl (argv) {
|
||||
export const parseArgvAsUrl = (argv) => {
|
||||
const arg = argv[1]
|
||||
if (!arg) {
|
||||
return
|
||||
@@ -137,7 +145,7 @@ export function parseArgvAsUrl (argv) {
|
||||
}
|
||||
}
|
||||
|
||||
export function checkIsSupportedSchema (url = '') {
|
||||
export const checkIsSupportedSchema = (url = '') => {
|
||||
const str = url.toLowerCase()
|
||||
if (
|
||||
str.startsWith('ftp:') ||
|
||||
@@ -154,11 +162,11 @@ export function checkIsSupportedSchema (url = '') {
|
||||
}
|
||||
}
|
||||
|
||||
export function isDirectory (path) {
|
||||
export const isDirectory = (path) => {
|
||||
return existsSync(path) && lstatSync(path).isDirectory()
|
||||
}
|
||||
|
||||
export function parseArgvAsFile (argv) {
|
||||
export const parseArgvAsFile = (argv) => {
|
||||
let arg = argv[1]
|
||||
if (!arg || isDirectory(arg)) {
|
||||
return
|
||||
@@ -188,3 +196,19 @@ export const convertArrayBufferToBuffer = (arrayBuffer) => {
|
||||
}
|
||||
return buffer
|
||||
}
|
||||
|
||||
export const showItemInFolder = (fullPath) => {
|
||||
if (!fullPath) {
|
||||
return
|
||||
}
|
||||
|
||||
fullPath = resolve(fullPath)
|
||||
access(fullPath, constants.F_OK, (err) => {
|
||||
if (err) {
|
||||
logger.warn(`[Motrix] ${fullPath} ${err ? 'does not exist' : 'exists'}`)
|
||||
return
|
||||
}
|
||||
|
||||
shell.showItemInFolder(fullPath)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { parse } from 'querystring'
|
||||
|
||||
export function concat (template, submenu, submenuToAdd) {
|
||||
export const concat = (template, submenu, submenuToAdd) => {
|
||||
submenuToAdd.forEach(sub => {
|
||||
let relativeItem = null
|
||||
if (sub.position) {
|
||||
@@ -37,7 +37,7 @@ export function concat (template, submenu, submenuToAdd) {
|
||||
})
|
||||
}
|
||||
|
||||
export function merge (template, item) {
|
||||
export const merge = (template, item) => {
|
||||
if (item.id) {
|
||||
const matched = findById(template, item.id)
|
||||
if (matched) {
|
||||
@@ -73,7 +73,7 @@ function findById (template, id) {
|
||||
return null
|
||||
}
|
||||
|
||||
export function translateTemplate (template, keystrokesByCommand, i18n) {
|
||||
export const translateTemplate = (template, keystrokesByCommand, i18n) => {
|
||||
for (const i in template) {
|
||||
const item = template[i]
|
||||
if (item.command) {
|
||||
@@ -101,7 +101,7 @@ export function translateTemplate (template, keystrokesByCommand, i18n) {
|
||||
return template
|
||||
}
|
||||
|
||||
export function handleCommand (item) {
|
||||
export const handleCommand = (item) => {
|
||||
handleCommandBefore(item)
|
||||
|
||||
const args = item['command-arg']
|
||||
@@ -158,7 +158,7 @@ function acceleratorForCommand (command, keystrokesByCommand) {
|
||||
return null
|
||||
}
|
||||
|
||||
export function flattenMenuItems (menu) {
|
||||
export const flattenMenuItems = (menu) => {
|
||||
const flattenItems = {}
|
||||
menu.items.forEach(item => {
|
||||
if (item.id) {
|
||||
@@ -171,7 +171,7 @@ export function flattenMenuItems (menu) {
|
||||
return flattenItems
|
||||
}
|
||||
|
||||
export function updateStates (itemsById, visibleStates, enabledStates, checkedStates) {
|
||||
export const updateStates = (itemsById, visibleStates, enabledStates, checkedStates) => {
|
||||
if (visibleStates) {
|
||||
for (const command in visibleStates) {
|
||||
const item = itemsById[command]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { EventEmitter } from 'events'
|
||||
import { EventEmitter } from 'node:events'
|
||||
|
||||
export default class CommandManager extends EventEmitter {
|
||||
constructor () {
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
import Icon from '@/components/Icons/Icon'
|
||||
|
||||
Icon.register({
|
||||
'document': {
|
||||
'width': 24,
|
||||
'height': 24,
|
||||
'raw': `<rect x="3" y="1" width="18" height="22"></rect>
|
||||
<line x1="15" y1="6" x2="17" y2="6"></line>
|
||||
<line x1="15" y1="10" x2="17" y2="10"></line>
|
||||
<line x1="7" y1="14" x2="17" y2="14"></line>
|
||||
<line x1="7" y1="18" x2="17" y2="18"></line>
|
||||
<rect x="7" y="6" width="4" height="4"></rect>`,
|
||||
'g': {
|
||||
'stroke': 'currentColor',
|
||||
'stroke-linecap': 'round',
|
||||
'stroke-linejoin': 'round',
|
||||
'stroke-width': '2',
|
||||
'fill': 'none'
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -49,15 +49,15 @@
|
||||
:label-width="formLabelWidth"
|
||||
>
|
||||
<el-switch
|
||||
v-model="form.useProxy"
|
||||
:active-text="$t('preferences.use-proxy')"
|
||||
@change="onUseProxyChange"
|
||||
v-model="form.proxy.enable"
|
||||
:active-text="$t('preferences.enable-proxy')"
|
||||
@change="onProxyEnableChange"
|
||||
>
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label-width="formLabelWidth"
|
||||
v-if="form.useProxy"
|
||||
v-if="form.proxy.enable"
|
||||
style="margin-top: -16px;"
|
||||
>
|
||||
<el-col
|
||||
@@ -69,8 +69,8 @@
|
||||
>
|
||||
<el-input
|
||||
placeholder="[http://][USER:PASSWORD@]HOST[:PORT]"
|
||||
@change="onAllProxyBackupChange"
|
||||
v-model="form.allProxyBackup">
|
||||
@change="onProxyServerChange"
|
||||
v-model="form.proxy.server">
|
||||
</el-input>
|
||||
</el-col>
|
||||
<el-col
|
||||
@@ -84,9 +84,30 @@
|
||||
type="textarea"
|
||||
rows="2"
|
||||
auto-complete="off"
|
||||
:placeholder="`${$t('preferences.no-proxy-input-tips')}`"
|
||||
v-model="form.noProxy">
|
||||
@change="handleProxyBypassChange"
|
||||
:placeholder="`${$t('preferences.proxy-bypass-input-tips')}`"
|
||||
v-model="form.proxy.bypass">
|
||||
</el-input>
|
||||
</el-col>
|
||||
<el-col
|
||||
class="form-item-sub"
|
||||
:xs="24"
|
||||
:sm="24"
|
||||
:md="20"
|
||||
:lg="20"
|
||||
>
|
||||
<el-select
|
||||
class="proxy-scope"
|
||||
v-model="form.proxy.scope"
|
||||
multiple
|
||||
>
|
||||
<el-option
|
||||
v-for="item in proxyScopeOptions"
|
||||
:key="item"
|
||||
:label="$t(`preferences.proxy-scope-${item}`)"
|
||||
:value="item"
|
||||
/>
|
||||
</el-select>
|
||||
<div class="el-form-item__info" style="margin-top: 8px;">
|
||||
<a target="_blank" href="https://github.com/agalwood/Motrix/wiki/Proxy" rel="noopener noreferrer">
|
||||
{{ $t('preferences.proxy-tips') }}
|
||||
@@ -226,7 +247,7 @@
|
||||
<el-input
|
||||
:show-password="hideRpcSecret"
|
||||
placeholder="RPC Secret"
|
||||
:maxlength="24"
|
||||
:maxlength="64"
|
||||
v-model="form.rpcSecret"
|
||||
>
|
||||
<i slot="append" @click.prevent="onRpcSecretDiceClick">
|
||||
@@ -428,9 +449,14 @@
|
||||
import ShowInFolder from '@/components/Native/ShowInFolder'
|
||||
import SubnavSwitcher from '@/components/Subnav/SubnavSwitcher'
|
||||
import userAgentMap from '@shared/ua'
|
||||
import { trackerSourceOptions, ENGINE_RPC_PORT, EMPTY_STRING, LOG_LEVELS } from '@shared/constants'
|
||||
import {
|
||||
backupConfig,
|
||||
EMPTY_STRING,
|
||||
ENGINE_RPC_PORT,
|
||||
LOG_LEVELS,
|
||||
TRACKER_SOURCE_OPTIONS,
|
||||
PROXY_SCOPE_OPTIONS
|
||||
} from '@shared/constants'
|
||||
import {
|
||||
buildRpcUrl,
|
||||
calcFormLabelWidth,
|
||||
changedConfig,
|
||||
@@ -449,8 +475,6 @@
|
||||
|
||||
const initForm = (config) => {
|
||||
const {
|
||||
allProxy,
|
||||
allProxyBackup,
|
||||
autoCheckUpdate,
|
||||
autoSyncTracker,
|
||||
btTracker,
|
||||
@@ -461,8 +485,8 @@
|
||||
lastSyncTrackerTime,
|
||||
listenPort,
|
||||
logLevel,
|
||||
noProxy,
|
||||
protocols,
|
||||
proxy,
|
||||
rpcListenPort,
|
||||
rpcSecret,
|
||||
trackerSource,
|
||||
@@ -470,8 +494,6 @@
|
||||
userAgent
|
||||
} = config
|
||||
const result = {
|
||||
allProxy,
|
||||
allProxyBackup,
|
||||
autoCheckUpdate,
|
||||
autoSyncTracker,
|
||||
btTracker: convertCommaToLine(btTracker),
|
||||
@@ -482,10 +504,8 @@
|
||||
lastSyncTrackerTime,
|
||||
listenPort,
|
||||
logLevel,
|
||||
noProxy: convertCommaToLine(noProxy),
|
||||
protocols: {
|
||||
...protocols
|
||||
},
|
||||
proxy: cloneDeep(proxy),
|
||||
protocols: { ...protocols },
|
||||
rpcListenPort,
|
||||
rpcSecret,
|
||||
trackerSource,
|
||||
@@ -512,8 +532,9 @@
|
||||
formLabelWidth: calcFormLabelWidth(locale),
|
||||
formOriginal,
|
||||
hideRpcSecret: true,
|
||||
proxyScopeOptions: PROXY_SCOPE_OPTIONS,
|
||||
rules: {},
|
||||
trackerSourceOptions,
|
||||
trackerSourceOptions: TRACKER_SOURCE_OPTIONS,
|
||||
trackerSyncing: false
|
||||
}
|
||||
},
|
||||
@@ -571,6 +592,10 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleLocaleChange (locale) {
|
||||
const lng = getLanguage(locale)
|
||||
getLocaleManager().changeLanguage(lng)
|
||||
},
|
||||
onCheckUpdateClick () {
|
||||
this.$electron.ipcRenderer.send('command', 'application:check-for-updates')
|
||||
this.$msg.info(this.$t('app.checking-for-updates'))
|
||||
@@ -601,11 +626,29 @@
|
||||
[protocol]: enabled
|
||||
}
|
||||
},
|
||||
onUseProxyChange (flag) {
|
||||
this.form.allProxy = flag ? this.form.allProxyBackup : ''
|
||||
onProxyEnableChange (enable) {
|
||||
this.form.proxy = {
|
||||
...this.form.proxy,
|
||||
enable
|
||||
}
|
||||
},
|
||||
onAllProxyBackupChange (value) {
|
||||
this.form.allProxy = value
|
||||
onProxyServerChange (server) {
|
||||
this.form.proxy = {
|
||||
...this.form.proxy,
|
||||
server
|
||||
}
|
||||
},
|
||||
handleProxyBypassChange (bypass) {
|
||||
this.form.proxy = {
|
||||
...this.form.proxy,
|
||||
bypass: convertLineToComma(bypass)
|
||||
}
|
||||
},
|
||||
onProxyScopeChange (scope) {
|
||||
this.form.proxy = {
|
||||
...this.form.proxy,
|
||||
scope: [...scope]
|
||||
}
|
||||
},
|
||||
changeUA (type) {
|
||||
const ua = userAgentMap[type]
|
||||
@@ -634,7 +677,7 @@
|
||||
},
|
||||
onRpcSecretDiceClick () {
|
||||
this.hideRpcSecret = false
|
||||
const rpcSecret = randomize('Aa0', 12)
|
||||
const rpcSecret = randomize('Aa0', 16)
|
||||
this.form.rpcSecret = rpcSecret
|
||||
|
||||
setTimeout(() => {
|
||||
@@ -667,7 +710,7 @@
|
||||
cancelId: 1
|
||||
}).then(({ response }) => {
|
||||
if (response === 0) {
|
||||
this.$electron.ipcRenderer.send('command', 'application:reset')
|
||||
this.$electron.ipcRenderer.send('command', 'application:factory-reset')
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -676,10 +719,6 @@
|
||||
.then((config) => {
|
||||
this.form = initForm(config)
|
||||
this.formOriginal = cloneDeep(this.form)
|
||||
if (changedConfig.basic.theme !== undefined) {
|
||||
this.$electron.ipcRenderer.send('command',
|
||||
'application:change-theme', changedConfig.basic.theme)
|
||||
}
|
||||
})
|
||||
},
|
||||
submitForm (formName) {
|
||||
@@ -695,27 +734,22 @@
|
||||
}
|
||||
|
||||
const {
|
||||
btAutoDownloadContent,
|
||||
autoHideWindow,
|
||||
btAutoDownloadContent,
|
||||
btTracker,
|
||||
noProxy,
|
||||
rpcListenPort
|
||||
} = data
|
||||
|
||||
if ('btAutoDownloadContent' in data) {
|
||||
data.pauseMetadata = !btAutoDownloadContent
|
||||
data.followMetalink = btAutoDownloadContent
|
||||
data.followTorrent = btAutoDownloadContent
|
||||
data.followMetalink = btAutoDownloadContent
|
||||
data.pauseMetadata = !btAutoDownloadContent
|
||||
}
|
||||
|
||||
if (btTracker) {
|
||||
data.btTracker = reduceTrackerString(convertLineToComma(btTracker))
|
||||
}
|
||||
|
||||
if (noProxy) {
|
||||
data.noProxy = convertLineToComma(noProxy)
|
||||
}
|
||||
|
||||
if (rpcListenPort === EMPTY_STRING) {
|
||||
data.rpcListenPort = this.rpcDefaultPort
|
||||
}
|
||||
@@ -767,19 +801,8 @@
|
||||
cancelId: 1
|
||||
}).then(({ response }) => {
|
||||
if (response === 0) {
|
||||
if (changedConfig.basic.theme !== undefined) {
|
||||
this.$electron.ipcRenderer.send('command',
|
||||
'application:change-theme', backupConfig.theme)
|
||||
}
|
||||
if (changedConfig.basic.locale !== undefined) {
|
||||
const lng = getLanguage(backupConfig.locale)
|
||||
getLocaleManager().changeLanguage(lng)
|
||||
this.$electron.ipcRenderer.send('command',
|
||||
'application:change-locale', lng)
|
||||
}
|
||||
changedConfig.basic = {}
|
||||
changedConfig.advanced = {}
|
||||
backupConfig.theme = undefined
|
||||
next()
|
||||
}
|
||||
})
|
||||
@@ -790,6 +813,9 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.proxy-scope {
|
||||
width: 100%;
|
||||
}
|
||||
.bt-tracker {
|
||||
position: relative;
|
||||
.sync-tracker-btn {
|
||||
|
||||
@@ -72,7 +72,6 @@
|
||||
<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"
|
||||
@@ -144,8 +143,7 @@
|
||||
<el-select
|
||||
style="width: 100px;"
|
||||
v-model="uploadUnit"
|
||||
@change="handleUploadChange"
|
||||
:placeholder="$t('preferences.speed-units')">
|
||||
@change="handleUploadChange">
|
||||
<el-option
|
||||
v-for="item in speedUnits"
|
||||
:key="item.value"
|
||||
@@ -167,8 +165,7 @@
|
||||
<el-select
|
||||
style="width: 100px;"
|
||||
v-model="downloadUnit"
|
||||
@change="handleDownloadChange"
|
||||
:placeholder="$t('preferences.speed-units')">
|
||||
@change="handleDownloadChange">
|
||||
<el-option
|
||||
v-for="item in speedUnits"
|
||||
:key="item.value"
|
||||
@@ -308,7 +305,6 @@
|
||||
import { availableLanguages, getLanguage } from '@shared/locales'
|
||||
import { getLocaleManager } from '@/components/Locale'
|
||||
import {
|
||||
backupConfig,
|
||||
calcFormLabelWidth,
|
||||
changedConfig,
|
||||
checkIsNeedRestart,
|
||||
@@ -316,14 +312,19 @@
|
||||
diffConfig,
|
||||
extractSpeedUnit
|
||||
} from '@shared/utils'
|
||||
import { APP_RUN_MODE, ENGINE_MAX_CONCURRENT_DOWNLOADS } from '@shared/constants'
|
||||
import {
|
||||
APP_RUN_MODE,
|
||||
EMPTY_STRING,
|
||||
ENGINE_MAX_CONCURRENT_DOWNLOADS,
|
||||
ENGINE_RPC_PORT
|
||||
} from '@shared/constants'
|
||||
import { reduceTrackerString } from '@shared/utils/tracker'
|
||||
|
||||
const initForm = (config) => {
|
||||
const {
|
||||
autoHideWindow,
|
||||
btSaveMetadata,
|
||||
btForceEncryption,
|
||||
btSaveMetadata,
|
||||
dir,
|
||||
engineMaxConnectionPerServer,
|
||||
followMetalink,
|
||||
@@ -349,11 +350,16 @@
|
||||
theme,
|
||||
traySpeedometer
|
||||
} = config
|
||||
|
||||
const btAutoDownloadContent = followTorrent &&
|
||||
followMetalink &&
|
||||
!pauseMetadata
|
||||
|
||||
const result = {
|
||||
autoHideWindow,
|
||||
btAutoDownloadContent: !pauseMetadata,
|
||||
btSaveMetadata,
|
||||
btAutoDownloadContent,
|
||||
btForceEncryption,
|
||||
btSaveMetadata,
|
||||
continue: config.continue,
|
||||
dir,
|
||||
engineMaxConnectionPerServer,
|
||||
@@ -370,6 +376,7 @@
|
||||
newTaskShowDownloading,
|
||||
noConfirmBeforeDeleteTask,
|
||||
openAtLogin,
|
||||
pauseMetadata,
|
||||
resumeAllWhenAppLaunched,
|
||||
runMode,
|
||||
seedRatio,
|
||||
@@ -396,13 +403,6 @@
|
||||
let form = {}
|
||||
form = initForm(extend(form, formOriginal, changedConfig.basic))
|
||||
|
||||
if (backupConfig.theme === undefined) {
|
||||
backupConfig.theme = formOriginal.theme
|
||||
} else {
|
||||
formOriginal.theme = backupConfig.theme
|
||||
}
|
||||
backupConfig.locale = formOriginal.locale
|
||||
|
||||
return {
|
||||
form,
|
||||
formLabelWidth: calcFormLabelWidth(locale),
|
||||
@@ -516,6 +516,9 @@
|
||||
showHideAppMenuOption () {
|
||||
return is.windows() || is.linux()
|
||||
},
|
||||
rpcDefaultPort () {
|
||||
return ENGINE_RPC_PORT
|
||||
},
|
||||
...mapState('preference', {
|
||||
config: state => state.config
|
||||
})
|
||||
@@ -524,22 +527,18 @@
|
||||
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)
|
||||
},
|
||||
handleDownloadChange (value) {
|
||||
const speedLimit = parseInt(this.form.maxOverallDownloadLimit)
|
||||
const speedLimit = parseInt(this.form.maxOverallDownloadLimit, 10)
|
||||
this.downloadUnit = value
|
||||
const limit = speedLimit > 0 ? `${speedLimit}${value}` : 0
|
||||
this.form.maxOverallDownloadLimit = limit
|
||||
},
|
||||
handleUploadChange (value) {
|
||||
const speedLimit = parseInt(this.form.maxOverallUploadLimit)
|
||||
const speedLimit = parseInt(this.form.maxOverallUploadLimit, 10)
|
||||
this.uploadUnit = value
|
||||
const limit = speedLimit > 0 ? `${speedLimit}${value}` : 0
|
||||
this.form.maxOverallUploadLimit = limit
|
||||
@@ -577,20 +576,25 @@
|
||||
...changedConfig.advanced
|
||||
}
|
||||
|
||||
const { btAutoDownloadContent, autoHideWindow, btTracker, noProxy } = data
|
||||
const {
|
||||
autoHideWindow,
|
||||
btAutoDownloadContent,
|
||||
btTracker,
|
||||
rpcListenPort
|
||||
} = data
|
||||
|
||||
if ('btAutoDownloadContent' in data) {
|
||||
data.pauseMetadata = !btAutoDownloadContent
|
||||
data.followMetalink = btAutoDownloadContent
|
||||
data.followTorrent = btAutoDownloadContent
|
||||
data.followMetalink = btAutoDownloadContent
|
||||
data.pauseMetadata = !btAutoDownloadContent
|
||||
}
|
||||
|
||||
if (btTracker) {
|
||||
data.btTracker = reduceTrackerString(convertLineToComma(btTracker))
|
||||
}
|
||||
|
||||
if (noProxy) {
|
||||
data.noProxy = convertLineToComma(noProxy)
|
||||
if (rpcListenPort === EMPTY_STRING) {
|
||||
data.rpcListenPort = this.rpcDefaultPort
|
||||
}
|
||||
|
||||
console.log('[Motrix] preference changed data:', data)
|
||||
@@ -621,8 +625,6 @@
|
||||
})
|
||||
},
|
||||
resetForm (formName) {
|
||||
this.$refs.themeSwitcher.currentValue = backupConfig.theme
|
||||
this.handleLocaleChange(this.formOriginal.locale)
|
||||
this.syncFormConfig()
|
||||
}
|
||||
},
|
||||
@@ -642,16 +644,8 @@
|
||||
cancelId: 1
|
||||
}).then(({ response }) => {
|
||||
if (response === 0) {
|
||||
if (changedConfig.basic.theme !== undefined) {
|
||||
this.$electron.ipcRenderer.send('command',
|
||||
'application:change-theme', backupConfig.theme)
|
||||
}
|
||||
if (changedConfig.basic.locale !== undefined) {
|
||||
this.handleLocaleChange(this.formOriginal.locale)
|
||||
}
|
||||
changedConfig.basic = {}
|
||||
changedConfig.advanced = {}
|
||||
backupConfig.theme = undefined
|
||||
next()
|
||||
}
|
||||
})
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
custom-class="tab-title-dialog add-task-dialog"
|
||||
width="67vw"
|
||||
:visible="visible"
|
||||
:top="dialogTop"
|
||||
:show-close="false"
|
||||
:before-close="beforeClose"
|
||||
@open="handleOpen"
|
||||
@@ -244,6 +245,9 @@
|
||||
}),
|
||||
taskType () {
|
||||
return this.type
|
||||
},
|
||||
dialogTop () {
|
||||
return this.showAdvanced ? '8vh' : '15vh'
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
@@ -65,6 +65,9 @@
|
||||
<el-button @click="toggleImageSelection()">
|
||||
<mo-icon name="image" width="12" height="12" />
|
||||
</el-button>
|
||||
<el-button @click="toggleDocumentSelection()">
|
||||
<mo-icon name="document" width="12" height="12" />
|
||||
</el-button>
|
||||
</el-button-group>
|
||||
</el-col>
|
||||
<el-col
|
||||
@@ -85,6 +88,7 @@
|
||||
import '@/components/Icons/video'
|
||||
import '@/components/Icons/audio'
|
||||
import '@/components/Icons/image'
|
||||
import '@/components/Icons/document'
|
||||
import {
|
||||
NONE_SELECTED_FILES,
|
||||
SELECTED_ALL_FILES
|
||||
@@ -92,9 +96,10 @@
|
||||
import {
|
||||
bytesToSize,
|
||||
calcProgress,
|
||||
filterVideoFiles,
|
||||
filterAudioFiles,
|
||||
filterDocumentFiles,
|
||||
filterImageFiles,
|
||||
filterVideoFiles,
|
||||
removeExtensionDot
|
||||
} from '@shared/utils'
|
||||
|
||||
@@ -192,6 +197,10 @@
|
||||
const filtered = filterImageFiles(this.files)
|
||||
this.toggleSelection(filtered)
|
||||
},
|
||||
toggleDocumentSelection () {
|
||||
const filtered = filterDocumentFiles(this.files)
|
||||
this.toggleSelection(filtered)
|
||||
},
|
||||
handleRowDbClick (row, column, event) {
|
||||
this.$refs.torrentTable.toggleRowSelection(row)
|
||||
},
|
||||
|
||||
@@ -6,6 +6,11 @@
|
||||
:label-width="formLabelWidth"
|
||||
v-if="task"
|
||||
>
|
||||
<el-form-item :label="`${$t('task.task-gid')}: `">
|
||||
<div class="form-static-value">
|
||||
{{ task.gid }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item :label="`${$t('task.task-name')}: `">
|
||||
<div class="form-static-value">
|
||||
{{ taskFullName }}
|
||||
|
||||
@@ -237,6 +237,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
.el-select-dropdown.is-multiple .el-select-dropdown__item.selected {
|
||||
background-color: #3d3d3d;
|
||||
color: $--color-primary;
|
||||
}
|
||||
|
||||
.el-upload-dragger {
|
||||
background-color: #2d2d2d;
|
||||
border-color: #606060;
|
||||
@@ -449,4 +454,13 @@
|
||||
border-color: $--dk-popover-border-color;
|
||||
}
|
||||
|
||||
.el-tag.el-tag--info.el-tag--light {
|
||||
background-color: #5b5b5b;
|
||||
border-color: #606060;
|
||||
color: #e6e6e6;
|
||||
}
|
||||
|
||||
.el-tag__close.el-icon-close {
|
||||
color: #2d2d2d;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
import EngineClient from '@/components/Native/EngineClient'
|
||||
import Ipc from '@/components/Native/Ipc'
|
||||
import TitleBar from '@/components/Native/TitleBar'
|
||||
import { getLanguage } from '@shared/locales'
|
||||
import { getLocaleManager } from '@/components/Locale'
|
||||
|
||||
export default {
|
||||
name: 'motrix-app',
|
||||
@@ -78,13 +80,17 @@
|
||||
this.updateRootClassName()
|
||||
},
|
||||
watch: {
|
||||
themeClass (val, oldVal) {
|
||||
locale (val) {
|
||||
const lng = getLanguage(val)
|
||||
getLocaleManager().changeLanguage(lng)
|
||||
},
|
||||
themeClass () {
|
||||
this.updateRootClassName()
|
||||
},
|
||||
i18nClass (val, oldVal) {
|
||||
i18nClass () {
|
||||
this.updateRootClassName()
|
||||
},
|
||||
directionClass (val, oldVal) {
|
||||
directionClass () {
|
||||
this.updateRootClassName()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,12 @@ const updateSystemTheme = (payload = {}) => {
|
||||
|
||||
const updateTheme = (payload = {}) => {
|
||||
const { theme } = payload
|
||||
store.dispatch('preference/updateThemeConfig', theme)
|
||||
store.dispatch('preference/updateAppTheme', theme)
|
||||
}
|
||||
|
||||
const updateLocale = (payload = {}) => {
|
||||
const { locale } = payload
|
||||
store.dispatch('preference/updateAppLocale', locale)
|
||||
}
|
||||
|
||||
const updateTrayFocused = (payload = {}) => {
|
||||
@@ -160,6 +165,14 @@ const selectAllTask = () => {
|
||||
store.dispatch('task/selectAllTask')
|
||||
}
|
||||
|
||||
const showTaskDetail = (payload = {}) => {
|
||||
const { gid } = payload
|
||||
navigateTaskList()
|
||||
if (gid) {
|
||||
store.dispatch('task/showTaskDetailByGid', gid)
|
||||
}
|
||||
}
|
||||
|
||||
const fetchPreference = () => {
|
||||
store.dispatch('preference/fetchPreference')
|
||||
}
|
||||
@@ -179,8 +192,10 @@ commands.register('application:move-task-down', moveTaskDown)
|
||||
commands.register('application:pause-all-task', pauseAllTask)
|
||||
commands.register('application:resume-all-task', resumeAllTask)
|
||||
commands.register('application:select-all-task', selectAllTask)
|
||||
commands.register('application:show-task-detail', showTaskDetail)
|
||||
|
||||
commands.register('application:update-preference-config', fetchPreference)
|
||||
commands.register('application:update-system-theme', updateSystemTheme)
|
||||
commands.register('application:update-theme', updateTheme)
|
||||
commands.register('application:update-locale', updateLocale)
|
||||
commands.register('application:update-tray-focused', updateTrayFocused)
|
||||
|
||||
@@ -114,14 +114,19 @@ const actions = {
|
||||
favoriteDirectories: favorite
|
||||
})
|
||||
},
|
||||
updateThemeConfig ({ dispatch }, theme) {
|
||||
updateAppTheme ({ dispatch }, theme) {
|
||||
dispatch('updatePreference', { theme })
|
||||
},
|
||||
updateAppLocale ({ dispatch }, locale) {
|
||||
dispatch('updatePreference', { locale })
|
||||
},
|
||||
updatePreference ({ commit }, config) {
|
||||
commit('UPDATE_PREFERENCE_DATA', config)
|
||||
},
|
||||
fetchBtTracker (_, trackerSource = []) {
|
||||
return fetchBtTrackerFromSource(trackerSource)
|
||||
const { proxy = { enable: false } } = state.config
|
||||
console.log('fetchBtTracker', trackerSource, proxy)
|
||||
return fetchBtTrackerFromSource(trackerSource, proxy)
|
||||
},
|
||||
toggleEngineMode () {
|
||||
|
||||
|
||||
@@ -88,6 +88,14 @@ const actions = {
|
||||
dispatch('updateCurrentTaskItem', data)
|
||||
})
|
||||
},
|
||||
showTaskDetailByGid ({ commit, dispatch }, gid) {
|
||||
api.fetchTaskItem({ gid })
|
||||
.then((task) => {
|
||||
dispatch('updateCurrentTaskItem', task)
|
||||
commit('UPDATE_CURRENT_TASK_GID', task.gid)
|
||||
commit('CHANGE_TASK_DETAIL_VISIBLE', true)
|
||||
})
|
||||
},
|
||||
showTaskDetail ({ commit, dispatch }, task) {
|
||||
dispatch('updateCurrentTaskItem', task)
|
||||
commit('UPDATE_CURRENT_TASK_GID', task.gid)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { access, constants } from 'node:fs'
|
||||
import { resolve } from 'node:path'
|
||||
import { shell, nativeTheme } from '@electron/remote'
|
||||
import { access, constants } from 'fs'
|
||||
import { resolve } from 'path'
|
||||
import { Message } from 'element-ui'
|
||||
|
||||
import {
|
||||
@@ -9,14 +9,15 @@ import {
|
||||
} from '@shared/utils'
|
||||
import { APP_THEME, TASK_STATUS } from '@shared/constants'
|
||||
|
||||
export function showItemInFolder (fullPath, { errorMsg }) {
|
||||
export const showItemInFolder = (fullPath, { errorMsg }) => {
|
||||
if (!fullPath) {
|
||||
return
|
||||
}
|
||||
|
||||
fullPath = resolve(fullPath)
|
||||
access(fullPath, constants.F_OK, (err) => {
|
||||
console.log(`[Motrix] ${fullPath} ${err ? 'does not exist' : 'exists'}`)
|
||||
if (err) {
|
||||
console.warn(`[Motrix] ${fullPath} ${err ? 'does not exist' : 'exists'}`)
|
||||
if (err && errorMsg) {
|
||||
Message.error(errorMsg)
|
||||
return
|
||||
}
|
||||
@@ -34,7 +35,7 @@ export const openItem = async (fullPath) => {
|
||||
return result
|
||||
}
|
||||
|
||||
export function getTaskFullPath (task) {
|
||||
export const getTaskFullPath = (task) => {
|
||||
const { dir, files, bittorrent } = task
|
||||
let result = resolve(dir)
|
||||
|
||||
@@ -108,7 +109,7 @@ export const moveTaskFilesToTrash = (task) => {
|
||||
return deleteResult1 && deleteResult2
|
||||
}
|
||||
|
||||
export function getSystemTheme () {
|
||||
export const getSystemTheme = () => {
|
||||
return nativeTheme.shouldUseDarkColors ? APP_THEME.DARK : APP_THEME.LIGHT
|
||||
}
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ export class Aria2 extends JSONRPCClient {
|
||||
defaultOptions = Object.assign({}, JSONRPCClient.defaultOptions, {
|
||||
secure: false,
|
||||
host: 'localhost',
|
||||
port: 6800,
|
||||
port: 16800,
|
||||
secret: '',
|
||||
path: '/jsonrpc'
|
||||
})
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
'use strict'
|
||||
|
||||
import { EventEmitter } from 'events'
|
||||
import { EventEmitter } from 'node:events'
|
||||
import _fetch from 'node-fetch'
|
||||
import _WebSocket from 'ws'
|
||||
import { JSONRPCError } from './JSONRPCError'
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
const userKeys = [
|
||||
'all-proxy-backup',
|
||||
'auto-check-update',
|
||||
'auto-hide-window',
|
||||
'auto-sync-tracker',
|
||||
@@ -20,14 +19,14 @@ const userKeys = [
|
||||
'no-confirm-before-delete-task',
|
||||
'open-at-login',
|
||||
'protocols',
|
||||
'proxy',
|
||||
'resume-all-when-app-launched',
|
||||
'run-mode',
|
||||
'show-progress-bar',
|
||||
'task-notification',
|
||||
'theme',
|
||||
'tracker-source',
|
||||
'tray-speedometer',
|
||||
'use-proxy'
|
||||
'tray-speedometer'
|
||||
]
|
||||
|
||||
const systemKeys = [
|
||||
|
||||
+45
-9
@@ -1,4 +1,6 @@
|
||||
export const EMPTY_STRING = ''
|
||||
export const PORTABLE_EXECUTABLE_DIR = process.env.PORTABLE_EXECUTABLE_DIR
|
||||
export const IS_PORTABLE = PORTABLE_EXECUTABLE_DIR && PORTABLE_EXECUTABLE_DIR !== EMPTY_STRING
|
||||
|
||||
export const APP_THEME = {
|
||||
AUTO: 'auto',
|
||||
@@ -68,10 +70,10 @@ export const NGOSANG_TRACKERS_BEST_IP_URL = 'https://raw.githubusercontent.com/n
|
||||
export const NGOSANG_TRACKERS_ALL_URL = 'https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_all.txt'
|
||||
export const NGOSANG_TRACKERS_ALL_IP_URL = 'https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_all_ip.txt'
|
||||
|
||||
export const NGOSANG_TRACKERS_BEST_URL_CDN = 'https://fastly.jsdelivr.net/gh/ngosang/trackerslist/trackers_best.txt'
|
||||
export const NGOSANG_TRACKERS_BEST_IP_URL_CDN = 'https://fastly.jsdelivr.net/gh/ngosang/trackerslist/trackers_best_ip.txt'
|
||||
export const NGOSANG_TRACKERS_ALL_URL_CDN = 'https://fastly.jsdelivr.net/gh/ngosang/trackerslist/trackers_all.txt'
|
||||
export const NGOSANG_TRACKERS_ALL_IP_URL_CDN = 'https://fastly.jsdelivr.net/gh/ngosang/trackerslist/trackers_all_ip.txt'
|
||||
export const NGOSANG_TRACKERS_BEST_URL_CDN = 'https://cdn.jsdelivr.net/gh/ngosang/trackerslist/trackers_best.txt'
|
||||
export const NGOSANG_TRACKERS_BEST_IP_URL_CDN = 'https://cdn.jsdelivr.net/gh/ngosang/trackerslist/trackers_best_ip.txt'
|
||||
export const NGOSANG_TRACKERS_ALL_URL_CDN = 'https://cdn.jsdelivr.net/gh/ngosang/trackerslist/trackers_all.txt'
|
||||
export const NGOSANG_TRACKERS_ALL_IP_URL_CDN = 'https://cdn.jsdelivr.net/gh/ngosang/trackerslist/trackers_all_ip.txt'
|
||||
|
||||
/**
|
||||
* @see https://github.com/XIU2/TrackersListCollection
|
||||
@@ -80,14 +82,14 @@ export const XIU2_TRACKERS_BEST_URL = 'https://raw.githubusercontent.com/XIU2/Tr
|
||||
export const XIU2_TRACKERS_ALL_URL = 'https://raw.githubusercontent.com/XIU2/TrackersListCollection/master/all.txt'
|
||||
export const XIU2_TRACKERS_HTTP_URL = 'https://raw.githubusercontent.com/XIU2/TrackersListCollection/master/http.txt'
|
||||
|
||||
export const XIU2_TRACKERS_BEST_URL_CDN = 'https://fastly.jsdelivr.net/gh/XIU2/TrackersListCollection/best.txt'
|
||||
export const XIU2_TRACKERS_ALL_URL_CDN = 'https://fastly.jsdelivr.net/gh/XIU2/TrackersListCollection/all.txt'
|
||||
export const XIU2_TRACKERS_HTTP_URL_CDN = 'https://fastly.jsdelivr.net/gh/XIU2/TrackersListCollection/http.txt'
|
||||
export const XIU2_TRACKERS_BEST_URL_CDN = 'https://cdn.jsdelivr.net/gh/XIU2/TrackersListCollection/best.txt'
|
||||
export const XIU2_TRACKERS_ALL_URL_CDN = 'https://cdn.jsdelivr.net/gh/XIU2/TrackersListCollection/all.txt'
|
||||
export const XIU2_TRACKERS_HTTP_URL_CDN = 'https://cdn.jsdelivr.net/gh/XIU2/TrackersListCollection/http.txt'
|
||||
|
||||
// For bt-exclude-tracker
|
||||
export const XIU2_TRACKERS_BLACK_URL = 'https://fastly.jsdelivr.net/gh/XIU2/TrackersListCollection/blacklist.txt'
|
||||
export const XIU2_TRACKERS_BLACK_URL = 'https://cdn.jsdelivr.net/gh/XIU2/TrackersListCollection/blacklist.txt'
|
||||
|
||||
export const trackerSourceOptions = [
|
||||
export const TRACKER_SOURCE_OPTIONS = [
|
||||
{
|
||||
label: 'ngosang/trackerslist',
|
||||
options: [
|
||||
@@ -170,6 +172,18 @@ export const trackerSourceOptions = [
|
||||
}
|
||||
]
|
||||
|
||||
export const PROXY_SCOPES = {
|
||||
DOWNLOAD: 'download',
|
||||
UPDATE_APP: 'update-app',
|
||||
UPDATE_TRACKERS: 'update-trackers'
|
||||
}
|
||||
|
||||
export const PROXY_SCOPE_OPTIONS = [
|
||||
PROXY_SCOPES.DOWNLOAD,
|
||||
PROXY_SCOPES.UPDATE_APP,
|
||||
PROXY_SCOPES.UPDATE_TRACKERS
|
||||
]
|
||||
|
||||
export const NONE_SELECTED_FILES = 'none'
|
||||
export const SELECTED_ALL_FILES = 'all'
|
||||
|
||||
@@ -227,7 +241,9 @@ export const IMAGE_SUFFIXES = [
|
||||
'.ai',
|
||||
'.bmp',
|
||||
'.eps',
|
||||
'.fig',
|
||||
'.gif',
|
||||
'.heic',
|
||||
'.icn',
|
||||
'.ico',
|
||||
'.jpeg',
|
||||
@@ -241,6 +257,7 @@ export const IMAGE_SUFFIXES = [
|
||||
'.webp',
|
||||
'.xd'
|
||||
]
|
||||
|
||||
export const AUDIO_SUFFIXES = [
|
||||
'.aac',
|
||||
'.ape',
|
||||
@@ -252,6 +269,7 @@ export const AUDIO_SUFFIXES = [
|
||||
'.wav',
|
||||
'.wma'
|
||||
]
|
||||
|
||||
export const VIDEO_SUFFIXES = [
|
||||
'.avi',
|
||||
'.m4v',
|
||||
@@ -273,3 +291,21 @@ export const SUB_SUFFIXES = [
|
||||
'.sst',
|
||||
'.sub'
|
||||
]
|
||||
|
||||
export const DOCUMENT_SUFFIXES = [
|
||||
'.azw3',
|
||||
'.csv',
|
||||
'.doc',
|
||||
'.docx',
|
||||
'.epub',
|
||||
'.key',
|
||||
'.mobi',
|
||||
'.numbers',
|
||||
'.pages',
|
||||
'.pdf',
|
||||
'.ppt',
|
||||
'.pptx',
|
||||
'.txt',
|
||||
'.xsl',
|
||||
'.xslx'
|
||||
]
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': 'تغيير اللغة',
|
||||
'hide-app-menu': 'إخفاء قائمة التطبيقات (Windows و Linux فقط)',
|
||||
'proxy': 'الخادم الوسيط',
|
||||
'use-proxy': 'تفعيل الخادم الوسيط',
|
||||
'no-proxy-input-tips': 'تخطي إعدادات الخادم الوسيط لهذه المضيفات والمجالات، واحدة لكل سطر',
|
||||
'enable-proxy': 'تفعيل الخادم الوسيط',
|
||||
'proxy-bypass-input-tips': 'تخطي إعدادات الخادم الوسيط لهذه المضيفات والمجالات، واحدة لكل سطر',
|
||||
'proxy-scope-download': 'تنزيل',
|
||||
'proxy-scope-update-app': 'تحديث التطبيق',
|
||||
'proxy-scope-update-trackers': 'تحديث المتتبعات',
|
||||
'proxy-tips': 'عرض دليل الخادم الوسيط',
|
||||
'bt-tracker': 'خوادم التعقب',
|
||||
'bt-tracker-input-tips': 'خوادم التعقب، واحدة لكل سطر',
|
||||
@@ -87,6 +90,5 @@ export default {
|
||||
'auto-check-update': 'تحقق تلقائيًا من التحديث',
|
||||
'last-check-update-time': 'آخر مرة تم التحقق من وجود تحديثات',
|
||||
'not-saved': 'التفضيلات غير محفوظة',
|
||||
'not-saved-confirm': 'ستفقد التفضيلات التي تم تغييرها ، هل أنت متأكد من المغادرة؟',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': 'ستفقد التفضيلات التي تم تغييرها ، هل أنت متأكد من المغادرة؟'
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ export default {
|
||||
'file-completed-size': 'تم التنزيل',
|
||||
'selected-files-sum': 'الملف المختار: {{selectedFilesCount}} ملف, الحجم الكلي {{selectedFilesTotalSize}}',
|
||||
'select-at-least-one': 'الرجاء تحديد ملف واحد على الأقل',
|
||||
'task-gid': 'GID',
|
||||
'task-name': 'اسم التحميل',
|
||||
'task-out': 'إعادة تسمية',
|
||||
'task-out-tips': 'اختياري',
|
||||
|
||||
@@ -47,8 +47,11 @@ export default {
|
||||
'change-language': 'промяна на езика',
|
||||
'hide-app-menu': 'Скриване на менюто на приложението (само за Windows и Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'use-proxy': 'използване на Proxy',
|
||||
'no-proxy-input-tips': 'заобикаляне на настройките на прокси за тези хостове и домейни, един по един на ред',
|
||||
'enable-proxy': 'използване на Proxy',
|
||||
'proxy-bypass-input-tips': 'заобикаляне на настройките на прокси за тези хостове и домейни, един по един на ред',
|
||||
'proxy-scope-download': 'Изтегляне',
|
||||
'proxy-scope-update-app': 'Актуализиране на приложението',
|
||||
'proxy-scope-update-trackers': 'Актуализиране на трекери',
|
||||
'proxy-tips': 'преглед на ръководството за прокси',
|
||||
'bt-tracker':'Tracker сървър',
|
||||
'bt-tracker-input-tips': 'Tracker сървър, един на ред',
|
||||
@@ -83,6 +86,5 @@ export default {
|
||||
'auto-check-update':'автоматична проверка на актуализациите',
|
||||
'last-check-update-time': 'последната актуализация е проверена',
|
||||
'not-saved': 'Предпочитанията не са запазени',
|
||||
'not-saved-confirm': 'Променените предпочитания ще бъдат загубени, сигурни ли сте, че ще напуснете?',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': 'Променените предпочитания ще бъдат загубени, сигурни ли сте, че ще напуснете?'
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ export default {
|
||||
'file-completed-size': 'Изтеглено',
|
||||
'selected-files-sum': 'избрано: {{selectedFilesCount}} файлове, общ размер {{selectedFilesTotalSize}}',
|
||||
'select-at-least-one': 'Моля, изберете поне един файл',
|
||||
'task-gid': 'GID',
|
||||
'task-name':'Име на изтегляне',
|
||||
'task-out': 'Преименуване',
|
||||
'task-out-tips':'незадължителен',
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': 'Cambiar idioma',
|
||||
'hide-app-menu': 'Ocultar el menú (només Windows i Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'use-proxy': 'Activar proxy',
|
||||
'no-proxy-input-tips': 'Eviteu la configuració del servidor intermediari per a aquests amfitrions i dominis, un per línia',
|
||||
'enable-proxy': 'Activar proxy',
|
||||
'proxy-bypass-input-tips': 'Eviteu la configuració del servidor intermediari per a aquests amfitrions i dominis, un per línia',
|
||||
'proxy-scope-download': 'Descàrrega',
|
||||
'proxy-scope-update-app': 'Actualització de l\'aplicació',
|
||||
'proxy-scope-update-trackers': 'Actualitza els rastrejadors',
|
||||
'proxy-tips': 'Consulteu el manual del servidor intermediari',
|
||||
'bt-tracker': 'Seguir servidors',
|
||||
'bt-tracker-input-tips': 'Seguir servidors, un per línia',
|
||||
@@ -85,6 +88,5 @@ export default {
|
||||
'auto-check-update': 'Revisar actualitzacions automàticament',
|
||||
'last-check-update-time': 'Última revisió d\'actualitzacions',
|
||||
'not-saved': 'Preferències no desades',
|
||||
'not-saved-confirm': 'Les preferències modificades es perdran, esteu segur que marxareu?',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': 'Les preferències modificades es perdran, esteu segur que marxareu?'
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ export default {
|
||||
'file-completed-size': 'Descarregat',
|
||||
'selected-files-sum': 'Seleccionat: {{selectedFilesCount}} arxius, mida total: {{selectedFilesTotalSize}}',
|
||||
'select-at-least-one': 'Seleccioneu com a mínim un fitxer',
|
||||
'task-gid': 'GID',
|
||||
'task-name': 'Nom de la tasca',
|
||||
'task-out': 'Canviar nom',
|
||||
'task-out-tips': 'Opcional',
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': 'Sprache ändern',
|
||||
'hide-app-menu': 'App Menü ausblenden (nur auf Windows & Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'use-proxy': 'Proxy aktivieren',
|
||||
'no-proxy-input-tips': 'Proxy-Einstellungen für diese Hosts und Domänen umgehen, eine pro Zeile',
|
||||
'enable-proxy': 'Proxy aktivieren',
|
||||
'proxy-bypass-input-tips': 'Proxy-Einstellungen für diese Hosts und Domänen umgehen, eine pro Zeile',
|
||||
'proxy-scope-download': 'Herunterladen',
|
||||
'proxy-scope-update-app': 'Anwendung aktualisieren',
|
||||
'proxy-scope-update-trackers': 'Tracker aktualisieren',
|
||||
'proxy-tips': 'Proxy-Handbuch anzeigen',
|
||||
'bt-tracker': 'Tracker-Server',
|
||||
'bt-tracker-input-tips': 'Tracker-Server, einer pro Zeile',
|
||||
@@ -87,6 +90,5 @@ export default {
|
||||
'auto-check-update': 'Automatisch auf Updates prüfen',
|
||||
'last-check-update-time': 'letzte kontrolle update - zeit',
|
||||
'not-saved': 'Einstellungen nicht gespeichert',
|
||||
'not-saved-confirm': 'Die geänderten Einstellungen gehen verloren. Möchten Sie wirklich gehen?',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': 'Die geänderten Einstellungen gehen verloren. Möchten Sie wirklich gehen?'
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ export default {
|
||||
'file-completed-size': 'Heruntergeladen',
|
||||
'selected-files-sum': 'Ausgewählt: {{selectedFilesCount}} Dateien, insgesamt {{selectedFilesTotalSize}}',
|
||||
'select-at-least-one': 'Bitte wählen Sie mindestens eine Datei aus',
|
||||
'task-gid': 'GID',
|
||||
'task-name': 'Aufgaben Name',
|
||||
'task-out': 'Dateiname',
|
||||
'task-out-tips': 'Optional',
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': 'Αλλαγή Γλώσσας',
|
||||
'hide-app-menu': 'Κρύψε το μενού της εφαρμογής (μόνο για Windows & Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'use-proxy': 'Χρησιμοίησε Proxy',
|
||||
'no-proxy-input-tips': 'Μη χρησιμοποιήσεις ρυθμίσεις proxy για αυτούς τους Hosts και τα Domains, ένα ανά γραμμή',
|
||||
'enable-proxy': 'Χρησιμοίησε Proxy',
|
||||
'proxy-bypass-input-tips': 'Μη χρησιμοποιήσεις ρυθμίσεις proxy για αυτούς τους Hosts και τα Domains, ένα ανά γραμμή',
|
||||
'proxy-scope-download': 'Λήψη',
|
||||
'proxy-scope-update-app': 'Ενημέρωση εφαρμογής',
|
||||
'proxy-scope-update-trackers': 'Ενημέρωση Trackers',
|
||||
'proxy-tips': 'Εμφάνιση εγχειριδίου Proxy',
|
||||
'bt-tracker': 'Tracker Servers',
|
||||
'bt-tracker-input-tips': 'Tracker servers, ένα ανά γραμμή',
|
||||
@@ -85,6 +88,5 @@ export default {
|
||||
'auto-check-update': 'Αυτόματος έλεγχος για ενημερώσεις',
|
||||
'last-check-update-time': 'Τελευταία φορά που έγινε έλεγχος για Ενημερώσεις',
|
||||
'not-saved': 'Οι προτιμήσεις δεν αποθηκεύτηκαν',
|
||||
'not-saved-confirm': 'Οι αλλαγμένες προτιμήσεις θα χαθούν, είστε σίγουροι ότι θα φύγετε;',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': 'Οι αλλαγμένες προτιμήσεις θα χαθούν, είστε σίγουροι ότι θα φύγετε;'
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ export default {
|
||||
'file-completed-size': 'Έγινε λήψη',
|
||||
'selected-files-sum': 'Επιλεγμένα: {{selectedFilesCount}} αρχεία, συνολικό μέγεθος {{selectedFilesTotalSize}}',
|
||||
'select-at-least-one': 'Επιλέξτε τουλάχιστον ένα αρχείο',
|
||||
'task-gid': 'GID',
|
||||
'task-name': 'Όνομα εργασίας',
|
||||
'task-out': 'Άλλο Όνομα',
|
||||
'task-out-tips': 'Προαιρετικό',
|
||||
|
||||
@@ -43,13 +43,16 @@ export default {
|
||||
'run-mode-tray': 'Tray Application',
|
||||
'run-mode-hide-tray': 'Hide Tray Application',
|
||||
'tray-speedometer': 'Show the real-time speed in the menu bar tray',
|
||||
'show-progress-bar': 'Show download prgress bar',
|
||||
'show-progress-bar': 'Show download progress bar',
|
||||
'language': 'Language',
|
||||
'change-language': 'Change language',
|
||||
'hide-app-menu': 'Hide App Menu (Windows & Linux Only)',
|
||||
'proxy': 'Proxy',
|
||||
'use-proxy': 'Enable Proxy',
|
||||
'no-proxy-input-tips': 'Bypass proxy settings for these Hosts and Domains, one per line',
|
||||
'enable-proxy': 'Enable Proxy',
|
||||
'proxy-bypass-input-tips': 'Bypass proxy settings for these Hosts and Domains, one per line',
|
||||
'proxy-scope-download': 'Download',
|
||||
'proxy-scope-update-app': 'Update Application',
|
||||
'proxy-scope-update-trackers': 'Update Trackers',
|
||||
'proxy-tips': 'View Proxy Manual',
|
||||
'bt-tracker': 'Tracker Servers',
|
||||
'bt-tracker-input-tips': 'Tracker servers, one per line',
|
||||
@@ -87,6 +90,5 @@ export default {
|
||||
'auto-check-update': 'Automatically check for updates',
|
||||
'last-check-update-time': 'Last checked for an update',
|
||||
'not-saved': 'Preferences not saved',
|
||||
'not-saved-confirm': 'The modified preferences will be lost, are you sure you want to leave?',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': 'The modified preferences will be lost, are you sure you want to leave?'
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ export default {
|
||||
'file-completed-size': 'Completed',
|
||||
'selected-files-sum': 'Selected: {{selectedFilesCount}} files, total size {{selectedFilesTotalSize}}',
|
||||
'select-at-least-one': 'Please select at least one file',
|
||||
'task-gid': 'GID',
|
||||
'task-name': 'Task Name',
|
||||
'task-out': 'Rename',
|
||||
'task-out-tips': 'Optional',
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': 'Cambiar Idioma',
|
||||
'hide-app-menu': 'Ocultar el menú (Solo Windows y Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'use-proxy': 'Activar Proxy',
|
||||
'no-proxy-input-tips': 'Omitir la configuración del proxy para estos hosts y dominios, uno por línea',
|
||||
'enable-proxy': 'Activar Proxy',
|
||||
'proxy-bypass-input-tips': 'Omitir la configuración del proxy para estos hosts y dominios, uno por línea',
|
||||
'proxy-scope-download': 'Descargar',
|
||||
'proxy-scope-update-app': 'Actualizar aplicación',
|
||||
'proxy-scope-update-trackers': 'Actualizar Trackers',
|
||||
'proxy-tips': 'Ver manual para Proxy',
|
||||
'bt-tracker': 'Servidores de rastreadores',
|
||||
'bt-tracker-input-tips': 'Servidores de rastreadores, uno por línea',
|
||||
@@ -85,6 +88,5 @@ export default {
|
||||
'auto-check-update': 'Revisar automáticamente por actualizaciones',
|
||||
'last-check-update-time': 'Última revisión de actualizaciones',
|
||||
'not-saved': 'Preferencias no guardadas',
|
||||
'not-saved-confirm': 'Las preferencias cambiadas se perderán, ¿está seguro de irse?',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': 'Las preferencias cambiadas se perderán, ¿está seguro de irse?'
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ export default {
|
||||
'file-completed-size': 'Terminado',
|
||||
'selected-files-sum': 'Seleccionado: {{selectedFilesCount}} archivos, tamaño total {{selectedFilesTotalSize}}',
|
||||
'select-at-least-one': 'Seleccione al menos un archivo',
|
||||
'task-gid': 'GID',
|
||||
'task-name': 'Nombre de la tarea',
|
||||
'task-out': 'Renombrar',
|
||||
'task-out-tips': 'Opcional',
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': 'تغییر زبان',
|
||||
'hide-app-menu': 'پنهان کردن منوی برنامه (تنها در ویندوز و لینوکس)',
|
||||
'proxy': 'پیشکار',
|
||||
'use-proxy': 'فعال کردن پیشکار',
|
||||
'no-proxy-input-tips': 'تنظیمات پیشکار را برای این میزبانها و دامنهها استفاده نکن، یکی در هر خط',
|
||||
'enable-proxy': 'فعال کردن پیشکار',
|
||||
'proxy-bypass-input-tips': 'تنظیمات پیشکار را برای این میزبانها و دامنهها استفاده نکن، یکی در هر خط',
|
||||
'proxy-scope-download': 'دانلود',
|
||||
'proxy-scope-update-app': 'بهروزرسانی برنامه',
|
||||
'proxy-scope-update-trackers': 'بهروزرسانی پیگیرها',
|
||||
'proxy-tips': 'مشاهده راهنمای پیشکار',
|
||||
'bt-tracker': 'سرورهای ردیاب',
|
||||
'bt-tracker-input-tips': 'سرورهای ردیاب، یکی در هر خط',
|
||||
@@ -87,6 +90,5 @@ export default {
|
||||
'auto-check-update': 'به صورت خودکار برای بهروز رسانی بررسی کن',
|
||||
'last-check-update-time': 'آخرین زمان بررسی برای بهروز رسانی',
|
||||
'not-saved': 'تنظیمات برگزیده ذخیره نشد',
|
||||
'not-saved-confirm': 'تنظیمات برگزیده تغییر یافته از بین خواهند رفت، آیا مطمئن هستید که می روید؟',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': 'تنظیمات برگزیده تغییر یافته از بین خواهند رفت، آیا مطمئن هستید که می روید؟'
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ export default {
|
||||
'file-completed-size': 'تکمیل شده',
|
||||
'selected-files-sum': 'گزیده: {{selectedFilesCount}} پرونده، اندازه کل {{selectedFilesTotalSize}}',
|
||||
'select-at-least-one': 'لطفاً حداقل یک پرونده را انتخاب کنید',
|
||||
'task-gid': 'GID',
|
||||
'task-name': 'نام وظیفه',
|
||||
'task-out': 'تغییرنام',
|
||||
'task-out-tips': 'اختیاری',
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': 'Changer la langue',
|
||||
'hide-app-menu': 'Cacher le menu de l\'application (Windows & Linux uniquement)',
|
||||
'proxy': 'Proxy',
|
||||
'use-proxy': 'Activer le Proxy',
|
||||
'no-proxy-input-tips': 'Contourner les paramètres de proxy pour ces hôtes et domaines, un par ligne',
|
||||
'enable-proxy': 'Activer le Proxy',
|
||||
'proxy-bypass-input-tips': 'Contourner les paramètres de proxy pour ces hôtes et domaines, un par ligne',
|
||||
'proxy-scope-download': 'Télécharger',
|
||||
'proxy-scope-update-app': 'Mettre à jour l\'application',
|
||||
'proxy-scope-update-trackers': 'Mettre à jour les trackers',
|
||||
'proxy-tips': 'Afficher le manuel du proxy',
|
||||
'bt-tracker': 'Serveurs Tracker',
|
||||
'bt-tracker-input-tips': 'Serveur de suivi, un par ligne',
|
||||
@@ -85,6 +88,5 @@ export default {
|
||||
'auto-check-update': 'Mise à jour automatique',
|
||||
'last-check-update-time': 'dernier contrôle la mise à jour du temps',
|
||||
'not-saved': 'Préférences non enregistrées',
|
||||
'not-saved-confirm': 'Les préférences modifiées seront perdues, êtes-vous sûr de partir ?',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': 'Les préférences modifiées seront perdues, êtes-vous sûr de partir ?'
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ export default {
|
||||
'file-completed-size': 'Téléchargé',
|
||||
'selected-files-sum': 'Sélectionné: {{selectedFilesCount}} fichiers, total {{selectedFilesTotalSize}}',
|
||||
'select-at-least-one': 'Veuillez sélectionner au moins un fichier',
|
||||
'task-gid': 'GID',
|
||||
'task-name': 'Nom de la tâche',
|
||||
'task-out': 'Renommer',
|
||||
'task-out-tips': 'Optionel',
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': 'Nyelv váltas',
|
||||
'hide-app-menu': 'Alkalmazás csik elrejtése (csak Windows és Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'use-proxy': 'Proxy engedélyezése',
|
||||
'no-proxy-input-tips': 'Proxy beálitassok elvetése ezek url és domain-nél (/sor)',
|
||||
'enable-proxy': 'Proxy engedélyezése',
|
||||
'proxy-bypass-input-tips': 'Proxy beálitassok elvetése ezek url és domain-nél (/sor)',
|
||||
'proxy-scope-download': 'Letöltés',
|
||||
'proxy-scope-update-app': 'Alkalmazás frissítése',
|
||||
'proxy-scope-update-trackers': 'Nyomkövetők frissítése',
|
||||
'proxy-tips': 'Proxy kéziköny megnyitasa',
|
||||
'bt-tracker': 'Lekövetö szerverek',
|
||||
'bt-tracker-input-tips': 'Lekövetö szerverek (/sor)',
|
||||
@@ -85,6 +88,5 @@ export default {
|
||||
'auto-check-update': 'Automatikus keresen frissitéseket',
|
||||
'last-check-update-time': 'Legutolsó frissités:',
|
||||
'not-saved': 'A beállítások nincsenek mentve',
|
||||
'not-saved-confirm': 'A megváltozott beállítások elvesznek. Biztosan kilép?',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': 'A megváltozott beállítások elvesznek. Biztosan kilép?'
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ export default {
|
||||
'file-completed-size': 'Letöltött',
|
||||
'selected-files-sum': 'Kijelölve: {{selectedFilesCount}} fájl, teljes méret {{selectedFilesTotalSize}}',
|
||||
'select-at-least-one': 'Válasszon legalább egy fájlt',
|
||||
'task-gid': 'GID',
|
||||
'task-name': 'Feladat név',
|
||||
'task-out': 'Átnevezés',
|
||||
'task-out-tips': 'Opcionális',
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': 'Ubah Bahasa',
|
||||
'hide-app-menu': 'Sembunyikan Menu Aplikasi (hanya: Windows & Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'use-proxy': 'Aktifkan Proxy',
|
||||
'no-proxy-input-tips': 'Abaikan pengaturan proxy untuk Host dan Domain ini, satu per baris',
|
||||
'enable-proxy': 'Aktifkan Proxy',
|
||||
'proxy-bypass-input-tips': 'Abaikan pengaturan proxy untuk Host dan Domain ini, satu per baris',
|
||||
'proxy-scope-download': 'Unduh',
|
||||
'proxy-scope-update-app': 'Perbarui Aplikasi',
|
||||
'proxy-scope-update-trackers': 'Perbarui Pelacak',
|
||||
'proxy-tips': 'Lihat Manual Proxy',
|
||||
'bt-tracker': 'Server Pelacak',
|
||||
'bt-tracker-input-tips': 'Server pelacak, satu per baris',
|
||||
@@ -85,6 +88,5 @@ export default {
|
||||
'auto-check-update': 'Secara otomatis memeriksa pembaruan',
|
||||
'last-check-update-time': 'Terakhir Kali Memeriksa Pembaruan',
|
||||
'not-saved': 'Preferensi tidak disimpan',
|
||||
'not-saved-confirm': 'Preferensi yang dimodifikasi akan hilang, apakah Anda yakin untuk keluar?',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': 'Preferensi yang dimodifikasi akan hilang, apakah Anda yakin untuk keluar?'
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ export default {
|
||||
'file-completed-size': 'Ukuran domplet',
|
||||
'selected-files-sum': 'Terpilih: {{selectedFilesCount}} berkas, total ukuran {{selectedFilesTotalSize}}',
|
||||
'select-at-least-one': 'Pilih setidaknya satu file',
|
||||
'task-gid': 'GID',
|
||||
'task-name': 'Nama Tugas',
|
||||
'task-out': 'Ubah Nama',
|
||||
'task-out-tips': 'Opsional',
|
||||
|
||||
@@ -112,7 +112,7 @@ export const availableLanguages = [
|
||||
}
|
||||
]
|
||||
|
||||
function checkLngIsAvailable (locale) {
|
||||
const checkLngIsAvailable = (locale) => {
|
||||
return availableLanguages.some(lng => lng.value === locale)
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ function checkLngIsAvailable (locale) {
|
||||
* pt, pt-BR, pt-PT
|
||||
* zh, zh-CN, zh-HK, zh-TW
|
||||
*/
|
||||
export function getLanguage (locale = 'en-US') {
|
||||
export const getLanguage = (locale = 'en-US') => {
|
||||
if (checkLngIsAvailable(locale)) {
|
||||
return locale
|
||||
}
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': 'Cambia lingua',
|
||||
'hide-app-menu': 'Nascondi dal menu delle app (Solo Windows & Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'use-proxy': 'Usa Proxy',
|
||||
'no-proxy-input-tips': 'Non usare proxy per questi Host e Domini, uno per linea',
|
||||
'enable-proxy': 'Usa Proxy',
|
||||
'proxy-bypass-input-tips': 'Non usare proxy per questi Host e Domini, uno per linea',
|
||||
'proxy-scope-download': 'Scarica',
|
||||
'proxy-scope-update-app': 'Aggiorna applicazione',
|
||||
'proxy-scope-update-trackers': 'Aggiorna tracker',
|
||||
'proxy-tips': 'Guida all\'uso dei proxy (In Inglese)',
|
||||
'bt-tracker': 'Server di monitoraggio',
|
||||
'bt-tracker-input-tips': 'Tracker servers, uno per linea',
|
||||
@@ -85,6 +88,5 @@ export default {
|
||||
'auto-check-update': 'Verifica automaticamente la disponibilità di aggiornamenti',
|
||||
'last-check-update-time': 'Ultima volta quando gli aggiornamenti sono stati verificati',
|
||||
'not-saved': 'Preferenze non salvate',
|
||||
'not-saved-confirm': 'Le preferenze modificate andranno perse, sei sicuro di uscire?',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': 'Le preferenze modificate andranno perse, sei sicuro di uscire?'
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ export default {
|
||||
'file-completed-size': 'Completato',
|
||||
'selected-files-sum': 'Selezionati: {{selectedFilesCount}} files, dimensione totale {{selectedFilesTotalSize}}',
|
||||
'select-at-least-one': 'Seleziona almeno un file',
|
||||
'task-gid': 'GID',
|
||||
'task-name': 'Nome attività',
|
||||
'task-out': 'Rinomina',
|
||||
'task-out-tips': '(opzionale)',
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': '言語を切り替え',
|
||||
'hide-app-menu': 'メニューバーを隠す(Windows と Linux のみサポート)',
|
||||
'proxy': 'プロキシ',
|
||||
'use-proxy': 'プロキシを使う',
|
||||
'no-proxy-input-tips': 'これらのホストおよびドメインのプロキシ設定を1行に1つずつバイパスします',
|
||||
'enable-proxy': 'プロキシを使う',
|
||||
'proxy-bypass-input-tips': 'これらのホストおよびドメインのプロキシ設定を1行に1つずつバイパスします',
|
||||
'proxy-scope-download': 'ダウンロード',
|
||||
'proxy-scope-update-app': 'アプリケーションの更新',
|
||||
'proxy-scope-update-trackers': 'トラッカーを更新する',
|
||||
'proxy-tips': 'プロキシマニュアルを表示',
|
||||
'bt-tracker': 'トラッカーサーバー',
|
||||
'bt-tracker-input-tips': 'トラッカーサーバ、一行に一つ',
|
||||
@@ -85,6 +88,5 @@ export default {
|
||||
'auto-check-update': '更新を自動で確認する',
|
||||
'last-check-update-time': '前回更新確認時間',
|
||||
'not-saved': '設定が保存されていません',
|
||||
'not-saved-confirm': '変更された設定は失われます、よろしいですか?',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': '変更された設定は失われます、よろしいですか?'
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ export default {
|
||||
'file-completed-size': '完成サイズ',
|
||||
'selected-files-sum': '選択済み:{{selectedFilesCount}}ファイル、合計{{selectedFilesTotalSize}}',
|
||||
'select-at-least-one': '少なくとも1つのファイルを選択してください',
|
||||
'task-gid': 'GID',
|
||||
'task-name': 'タスク名',
|
||||
'task-out': '名前を変更',
|
||||
'task-out-tips': 'オプション',
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': '언어 변경',
|
||||
'hide-app-menu': '앱 메뉴 숨기기 (Windows 및 Linux)',
|
||||
'proxy': '프록시',
|
||||
'use-proxy': '프록시 사용',
|
||||
'no-proxy-input-tips': '프록시 설정을 우회할 호스트 및 도메인 (한 줄에 하나)',
|
||||
'enable-proxy': '프록시 사용',
|
||||
'proxy-bypass-input-tips': '프록시 설정을 우회할 호스트 및 도메인 (한 줄에 하나)',
|
||||
'proxy-scope-download': '다운로드',
|
||||
'proxy-scope-update-app': '애플리케이션 업데이트',
|
||||
'proxy-scope-update-trackers': '추적기 업데이트',
|
||||
'proxy-tips': '프록시 매뉴얼 보기',
|
||||
'bt-tracker': '트래커 서버',
|
||||
'bt-tracker-input-tips': '트래커 서버 (한 줄에 하나)',
|
||||
@@ -87,6 +90,5 @@ export default {
|
||||
'auto-check-update': '자동으로 업데이트 확인',
|
||||
'last-check-update-time': '마지막 업데이트 확인 시간',
|
||||
'not-saved': '설정이 저장되지 않았습니다',
|
||||
'not-saved-confirm': '수정된 설정이 손실됩니다. 나가시겠습니까?',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': '수정된 설정이 손실됩니다. 나가시겠습니까?'
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ export default {
|
||||
'file-completed-size': '전체 크기',
|
||||
'selected-files-sum': '파일 {{selectedFilesCount}}개 선택됨, 총 {{selectedFilesTotalSize}}',
|
||||
'select-at-least-one': '하나 이상의 파일을 선택하십시오',
|
||||
'task-gid': 'GID',
|
||||
'task-name': '작업 이름',
|
||||
'task-out': '이름 변경',
|
||||
'task-out-tips': '선택',
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': 'Skifte språk',
|
||||
'hide-app-menu': 'Skjul appmeny (kun Windows og Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'use-proxy': 'Aktiver proxy',
|
||||
'no-proxy-input-tips': 'Omgå proxy-innstillinger for disse vertene og domenene, en per linje',
|
||||
'enable-proxy': 'Aktiver proxy',
|
||||
'proxy-bypass-input-tips': 'Omgå proxy-innstillinger for disse vertene og domenene, en per linje',
|
||||
'proxy-scope-download': 'Nedlasting',
|
||||
'proxy-scope-update-app': 'Oppdater applikasjonen',
|
||||
'proxy-scope-update-trackers': 'Oppdater sporingskapsler',
|
||||
'proxy-tips': 'Se Proxy Manual',
|
||||
'bt-tracker': 'Tracker-servere',
|
||||
'bt-tracker-input-tips': 'Tracker-servere, en per linje',
|
||||
@@ -87,6 +90,5 @@ export default {
|
||||
'auto-check-update': 'Sjekk automatisk for oppdatering',
|
||||
'last-check-update-time': 'Siste gang sjekket for oppdatering',
|
||||
'not-saved': 'Preferansene er ikke lagret',
|
||||
'not-saved-confirm': 'De endrede preferansene vil gå tapt, er du sikker på at du vil forlate?',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': 'De endrede preferansene vil gå tapt, er du sikker på at du vil forlate?'
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ export default {
|
||||
'file-completed-size': 'Fullført',
|
||||
'selected-files-sum': 'Valgt: {{selectedFilesCount}} filer, total størrelse {{selectedFilesTotalSize}}',
|
||||
'select-at-least-one': 'Velg minst én fil',
|
||||
'task-gid': 'GID',
|
||||
'task-name': 'Oppgavenavn',
|
||||
'task-out': 'Gi nytt navn',
|
||||
'task-out-tips': 'Valgfri',
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': 'Taal veranderen',
|
||||
'hide-app-menu': 'App menu verbergen (alleen Windows & Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'use-proxy': 'Proxy aanzetten',
|
||||
'no-proxy-input-tips': 'Proxy instellingen omzeilen voor deze hosts en domeinen (één per regel)',
|
||||
'enable-proxy': 'Proxy aanzetten',
|
||||
'proxy-bypass-input-tips': 'Proxy instellingen omzeilen voor deze hosts en domeinen (één per regel)',
|
||||
'proxy-scope-download': 'Downloaden',
|
||||
'proxy-scope-update-app': 'Toepassing bijwerken',
|
||||
'proxy-scope-update-trackers': 'Trackers bijwerken',
|
||||
'proxy-tips': 'Proxy handleiding bekijken',
|
||||
'bt-tracker': 'Tracker Servers',
|
||||
'bt-tracker-input-tips': 'Tracker Servers, één per regel',
|
||||
|
||||
@@ -17,6 +17,7 @@ export default {
|
||||
'file-completed-size': 'Gedownload',
|
||||
'selected-files-sum': 'Geselecteerd: {{selectedFilesCount}} bestanden, totale grootte {{selectedFilesTotalSize}}',
|
||||
'select-at-least-one': 'Kies a.u.b. ten minste 1 bestand',
|
||||
'task-gid': 'GID',
|
||||
'task-name': 'Taak naam',
|
||||
'task-out': 'Hernoemen',
|
||||
'task-out-tips': 'Optioneel',
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': 'Zmień język',
|
||||
'hide-app-menu': 'Schowaj menu aplikacji (Tylko Windows i Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'use-proxy': 'Włącz Proxy',
|
||||
'no-proxy-input-tips': 'Omiń ustawiania proxy dla tych hostów i domen, jeden na linię',
|
||||
'enable-proxy': 'Włącz Proxy',
|
||||
'proxy-bypass-input-tips': 'Omiń ustawiania proxy dla tych hostów i domen, jeden na linię',
|
||||
'proxy-scope-download': 'Pobierz',
|
||||
'proxy-scope-update-app': 'Aktualizacja aplikacji',
|
||||
'proxy-scope-update-trackers': 'Aktualizacja trackera',
|
||||
'proxy-tips': 'Pokaż instrukcję proxy',
|
||||
'bt-tracker': 'Trackery',
|
||||
'bt-tracker-input-tips': 'Trackery, jeden na linię',
|
||||
@@ -85,6 +88,5 @@ export default {
|
||||
'auto-check-update': 'Automatycznie sprawdzaj aktualizacje',
|
||||
'last-check-update-time': 'Ostatni raz kiedy sprawdzono aktualizację',
|
||||
'not-saved': 'Preferencje nie zostały zapisane',
|
||||
'not-saved-confirm': 'Zmienione preferencje zostaną utracone, czy na pewno chcesz wyjść?',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': 'Zmienione preferencje zostaną utracone, czy na pewno chcesz wyjść?'
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ export default {
|
||||
'file-completed-size': 'Pobrano',
|
||||
'selected-files-sum': 'Wybrano: {{selectedFilesCount}} plików, Wspólny rozmiar {{selectedFilesTotalSize}}',
|
||||
'select-at-least-one': 'Wybierz co najmniej jeden plik',
|
||||
'task-gid': 'GID',
|
||||
'task-name': 'Nazwa zadania',
|
||||
'task-out': 'Zmień nazwę',
|
||||
'task-out-tips': 'Opcjonalne',
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': 'Mudar o Idioma',
|
||||
'hide-app-menu': 'Ocultar o Menu do App (Windows & Linux apenas)',
|
||||
'proxy': 'Proxy',
|
||||
'use-proxy': 'Habilitar Proxy',
|
||||
'no-proxy-input-tips': 'Ignorar configurações de proxy para esses hosts e domínios, um por linha',
|
||||
'enable-proxy': 'Habilitar Proxy',
|
||||
'proxy-bypass-input-tips': 'Ignorar configurações de proxy para esses hosts e domínios, um por linha',
|
||||
'proxy-scope-download': 'Download',
|
||||
'proxy-scope-update-app': 'Atualizar Aplicativo',
|
||||
'proxy-scope-update-trackers': 'Atualizar rastreadores',
|
||||
'proxy-tips': 'Exibir manual do proxy',
|
||||
'bt-tracker': 'Rastreadores',
|
||||
'bt-tracker-input-tips': 'servidor rastreador, um por linha',
|
||||
@@ -85,6 +88,5 @@ export default {
|
||||
'auto-check-update': 'A verificação automática de atualizações',
|
||||
'last-check-update-time': 'última verificação do tempo de atualização',
|
||||
'not-saved': 'Preferências não salvas',
|
||||
'not-saved-confirm': 'As preferências modificadas serão perdidas. Tem certeza de que deseja sair?',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': 'As preferências modificadas serão perdidas. Tem certeza de que deseja sair?'
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ export default {
|
||||
'file-completed-size': 'Baixado',
|
||||
'selected-files-sum': 'Selecionado: {{selectedFilesCount}} arquivos, total {{selectedFilesTotalSize}}',
|
||||
'select-at-least-one': 'Selecione pelo menos um arquivo',
|
||||
'task-gid': 'GID',
|
||||
'task-name': 'Nome da Tarefa',
|
||||
'task-out': 'Renomear',
|
||||
'task-out-tips': 'Opcional',
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': 'Schimbă limba',
|
||||
'hide-app-menu': 'Ascundeți meniul aplicației (numai Windows și Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'use-proxy': 'Activați Proxy',
|
||||
'no-proxy-input-tips': 'Ignorați setările proxy pentru aceste gazde și domenii, câte una pe fiecare linie',
|
||||
'enable-proxy': 'Activați Proxy',
|
||||
'proxy-bypass-input-tips': 'Ignorați setările proxy pentru aceste gazde și domenii, câte una pe fiecare linie',
|
||||
'proxy-scope-download': 'Descărcare',
|
||||
'proxy-scope-update-app': 'Actualizare aplicație',
|
||||
'proxy-scope-update-trackers': 'Actualizare Trackere',
|
||||
'proxy-tips': 'Vizualizați manualul proxy',
|
||||
'bt-tracker': 'Severe tracker (Torrent Tracker)',
|
||||
'bt-tracker-input-tips': 'Severe tracker, câte unul pe fiecare linie',
|
||||
@@ -85,6 +88,5 @@ export default {
|
||||
'auto-check-update': 'Verificați automat dacă sunt disponibile actualizări',
|
||||
'last-check-update-time': 'Ultima dată când au fost verificate actualizările disponibile',
|
||||
'not-saved': 'Preferințele nu au fost salvate',
|
||||
'not-saved-confirm': 'Preferințele modificate se vor pierde, sunteți sigur că plecați?',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': 'Preferințele modificate se vor pierde, sunteți sigur că plecați?'
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ export default {
|
||||
'file-completed-size': 'Descărcat',
|
||||
'selected-files-sum': 'Selectate: {{selectedFilesCount}} fișiere, dimensiune totală {{selectedFilesTotalSize}}',
|
||||
'select-at-least-one': 'Vă rugăm să selectați cel puțin un fișier',
|
||||
'task-gid': 'GID',
|
||||
'task-name': 'Nume sarcină',
|
||||
'task-out': 'Redenumeşte',
|
||||
'task-out-tips': 'Opțional',
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': 'Сменить язык',
|
||||
'hide-app-menu': 'Скрыть меню приложения (только для Windows и Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'use-proxy': 'Использовать Proxy',
|
||||
'no-proxy-input-tips': 'Обойти настройки прокси для этих хостов и доменов, по одному в строке',
|
||||
'enable-proxy': 'Использовать Proxy',
|
||||
'proxy-bypass-input-tips': 'Обойти настройки прокси для этих хостов и доменов, по одному в строке',
|
||||
'proxy-scope-download': 'Скачать',
|
||||
'proxy-scope-update-app': 'Обновить приложение',
|
||||
'proxy-scope-update-trackers': 'Обновить трекеры',
|
||||
'proxy-tips': 'Посмотреть руководство по прокси',
|
||||
'bt-tracker': 'Tracker Сервер',
|
||||
'bt-tracker-input-tips': 'Tracker сервера, один в строку',
|
||||
@@ -85,6 +88,5 @@ export default {
|
||||
'auto-check-update': 'Автоматически проверять обновления',
|
||||
'last-check-update-time': 'Последняя проверка на обновления прошла в',
|
||||
'not-saved': 'Настройки не сохранены',
|
||||
'not-saved-confirm': 'Измененные настройки будут потеряны, вы обязательно уйдете?',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': 'Измененные настройки будут потеряны, вы обязательно уйдете?'
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ export default {
|
||||
'file-completed-size': 'Завершенный',
|
||||
'selected-files-sum': 'Выбрано: {{selectedFilesCount}} файлов, общий размер {{selectedFilesTotalSize}}',
|
||||
'select-at-least-one': 'Пожалуйста, выберите хотя бы один файл',
|
||||
'task-gid': 'GID',
|
||||
'task-name': 'Имя загрузки',
|
||||
'task-out': 'Переименовать',
|
||||
'task-out-tips': 'Необязательный',
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': 'เปลี่ยนภาษา',
|
||||
'hide-app-menu': 'ซ่อนเมนูแอป (Windows & Linux เท่านั้น)',
|
||||
'proxy': 'พร็อกซี่',
|
||||
'use-proxy': 'เปิดใช้งานพร็อกซี่',
|
||||
'no-proxy-input-tips': 'ข้ามการตั้งค่าพร็อกซีสำหรับโฮสต์และโดเมนเหล่านี้ หนึ่งรายการต่อบรรทัด',
|
||||
'enable-proxy': 'เปิดใช้งานพร็อกซี่',
|
||||
'proxy-bypass-input-tips': 'ข้ามการตั้งค่าพร็อกซีสำหรับโฮสต์และโดเมนเหล่านี้ หนึ่งรายการต่อบรรทัด',
|
||||
'proxy-scope-download': 'ดาวน์โหลด',
|
||||
'proxy-scope-update-app': 'อัปเดตแอปพลิเคชัน',
|
||||
'proxy-scope-update-trackers': 'อัปเดตแทร็กเกอร์',
|
||||
'proxy-tips': 'ดูคู่มือพร็อกซี',
|
||||
'bt-tracker': 'เซิร์ฟเวอร์ติดตาม',
|
||||
'bt-tracker-input-tips': 'เซิร์ฟเวอร์ตัวติดตาม หนึ่งตัวต่อบรรทัด',
|
||||
|
||||
@@ -17,6 +17,7 @@ export default {
|
||||
'file-completed-size': 'สำเร็จ',
|
||||
'selected-files-sum': 'เลือกแล้ว: {{selectedFilesCount}} ไฟล์, ขนามรวม {{selectedFilesTotalSize}}',
|
||||
'select-at-least-one': 'โปรดเลือกอย่างน้อยหนึ่งไฟล์',
|
||||
'task-gid': 'GID',
|
||||
'task-name': 'ชื่องาน',
|
||||
'task-out': 'เปลี่ยนชื่อ',
|
||||
'task-out-tips': 'ไม่จำเป็น',
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': 'Dil değiştir',
|
||||
'hide-app-menu': 'Uygulama menüsünü göster (Windows & Linux için)',
|
||||
'proxy': 'Proxy',
|
||||
'use-proxy': 'Proxy etkinleştir',
|
||||
'no-proxy-input-tips': 'Her bir satırda bir tane olacak şekilde bu Ana Bilgisayarlar ve Alanlar için proxy ayarlarını atlayın',
|
||||
'enable-proxy': 'Proxy etkinleştir',
|
||||
'proxy-bypass-input-tips': 'Her bir satırda bir tane olacak şekilde bu Ana Bilgisayarlar ve Alanlar için proxy ayarlarını atlayın',
|
||||
'proxy-scope-download': 'İndirme',
|
||||
'proxy-scope-update-app': 'Uygulamayı Güncelle',
|
||||
'proxy-scope-update-trackers': 'İzleyicileri Güncelle',
|
||||
'proxy-tips': 'Proxy Kılavuzunu Görüntüle',
|
||||
'bt-tracker': 'İzleyici Sunucular',
|
||||
'bt-tracker-input-tips': 'İzleyici sunucusu, her satıra bir tane',
|
||||
@@ -85,6 +88,5 @@ export default {
|
||||
'auto-check-update': 'Otomatik Kontrol Güncellemesi',
|
||||
'last-check-update-time': 'Son Kontrol Güncelleme Saati',
|
||||
'not-saved': 'Tercihler kaydedilmedi',
|
||||
'not-saved-confirm': 'Değiştirilen tercihler kaybolacak, ayrılacağınızdan emin misiniz?',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': 'Değiştirilen tercihler kaybolacak, ayrılacağınızdan emin misiniz?'
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ export default {
|
||||
'file-completed-size': 'İndirildi',
|
||||
'selected-files-sum': 'Seçildi: {{selectedFilesCount}} dosya sayısı, total {{selectedFilesTotalSize}}',
|
||||
'select-at-least-one': 'Lütfen en az bir dosya seçin',
|
||||
'task-gid': 'GID',
|
||||
'task-name': 'Görev Adı',
|
||||
'task-out': 'Dosya Adı',
|
||||
'task-out-tips': 'Opsiyonel',
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': 'Змінити мову',
|
||||
'hide-app-menu': 'Сховати меню додатка (Тільки для Windows та Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'use-proxy': 'Застосувати Proxy',
|
||||
'no-proxy-input-tips': 'Обхід налаштувань проксі для цих хостів та доменів, по одному на рядок',
|
||||
'enable-proxy': 'Застосувати Proxy',
|
||||
'proxy-bypass-input-tips': 'Обхід налаштувань проксі для цих хостів та доменів, по одному на рядок',
|
||||
'proxy-scope-download': 'Завантажити',
|
||||
'proxy-scope-update-app': 'Оновити додаток',
|
||||
'proxy-scope-update-trackers': 'Оновити трекери',
|
||||
'proxy-tips': 'Перегляньте посібник з проксі',
|
||||
'bt-tracker': 'Tracker Сервер',
|
||||
'bt-tracker-input-tips': 'Tracker сервера, один в рядок',
|
||||
@@ -85,6 +88,5 @@ export default {
|
||||
'auto-check-update': 'Автоматично перевіряти оновлення',
|
||||
'last-check-update-time': 'В останнє оновлення перевірялось',
|
||||
'not-saved': 'Налаштування не збережено',
|
||||
'not-saved-confirm': 'Змінені параметри буде втрачено. Ви впевнені, що залишите?',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': 'Змінені параметри буде втрачено. Ви впевнені, що залишите?'
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ export default {
|
||||
'file-completed-size': 'Завершений',
|
||||
'selected-files-sum': 'Обрано: {{selectedFilesCount}} файлів, загальний розмір {{selectedFilesTotalSize}}',
|
||||
'select-at-least-one': 'Виберіть принаймні один файл',
|
||||
'task-gid': 'GID',
|
||||
'task-name': 'Ім\'я завдання',
|
||||
'task-out': 'Перейменувати',
|
||||
'task-out-tips': 'Необов\'язковий',
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': 'Thay đổi Ngôn ngữ',
|
||||
'hide-app-menu': 'Ẩn thanh Menu (Chỉ Windows & Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'use-proxy': 'Bật Proxy',
|
||||
'no-proxy-input-tips': 'Bỏ qua cài đặt proxy cho các Máy chủ và tên miền này, mỗi cái một dòng',
|
||||
'enable-proxy': 'Bật Proxy',
|
||||
'proxy-bypass-input-tips': 'Bỏ qua cài đặt proxy cho các Máy chủ và tên miền này, mỗi cái một dòng',
|
||||
'proxy-scope-download': 'Tải về',
|
||||
'proxy-scope-update-app': 'Cập nhật ứng dụng',
|
||||
'proxy-scope-update-trackers': 'Cập nhật theo dõi',
|
||||
'proxy-tips': 'Xem Proxy Thủ Công',
|
||||
'bt-tracker': 'Máy Chủ Tracker',
|
||||
'bt-tracker-input-tips': 'Máy chủ theo dõi, mỗi thông tin trên một dòng',
|
||||
@@ -86,6 +89,5 @@ export default {
|
||||
'auto-check-update': 'Tự động kiểm tra cập nhật',
|
||||
'last-check-update-time': 'Kiểm tra cập nhật lần cuối',
|
||||
'not-saved': 'Tùy chọn chưa được lưu',
|
||||
'not-saved-confirm': 'Các tùy chọn đã sửa đổi sẽ bị mất, bạn có chắc chắn thoát không?',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': 'Các tùy chọn đã sửa đổi sẽ bị mất, bạn có chắc chắn thoát không?'
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ export default {
|
||||
'file-completed-size': 'Đã hoàn thành',
|
||||
'selected-files-sum': 'Đã chọn: {{selectedFilesCount}} tập tin, tổng kích thước {{selectedFilesTotalSize}}',
|
||||
'select-at-least-one': 'Vui lòng chọn ít nhất một tệp',
|
||||
'task-gid': 'GID',
|
||||
'task-name': 'Tên tác vụ',
|
||||
'task-out': 'Đổi tên',
|
||||
'task-out-tips': 'Không bắt buộc',
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': '切换语言',
|
||||
'hide-app-menu': '隐藏菜单栏(仅支持 Windows 和 Linux)',
|
||||
'proxy': '代理',
|
||||
'use-proxy': '使用代理服务器',
|
||||
'no-proxy-input-tips': '忽略这些主机与域的代理设置,一行一个',
|
||||
'enable-proxy': '使用代理服务器',
|
||||
'proxy-bypass-input-tips': '忽略这些主机与域的代理设置,一行一个',
|
||||
'proxy-scope-download': '下载',
|
||||
'proxy-scope-update-app': '更新应用程序',
|
||||
'proxy-scope-update-trackers': '更新 Tracker 列表',
|
||||
'proxy-tips': '查看代理配置说明',
|
||||
'bt-tracker': 'Tracker 服务器',
|
||||
'bt-tracker-input-tips': 'Tracker 服务器,一行一个',
|
||||
@@ -89,6 +92,5 @@ export default {
|
||||
'follow-metalink': '自动开始下载磁力链接、种子内的文件',
|
||||
'follow-torrent': '种子下载完后自动下载种子内容',
|
||||
'not-saved': '设置未保存',
|
||||
'not-saved-confirm': '已修改的设置将会丢失,确定要离开吗?',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': '已修改的设置将会丢失,确定要离开吗?'
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user