Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| aa0200c296 |
|
Before Width: | Height: | Size: 103 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 451 KiB After Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 530 KiB After Width: | Height: | Size: 59 KiB |
@@ -32,7 +32,7 @@
|
||||
"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",
|
||||
@@ -60,15 +60,15 @@
|
||||
"babel-plugin-component": "^1.1.1",
|
||||
"bittorrent-peerid": "^1.3.6",
|
||||
"blob-util": "^2.0.2",
|
||||
"cfonts": "^3.2.0",
|
||||
"cfonts": "^3.1.1",
|
||||
"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.9",
|
||||
"electron-builder": "^24.4.0",
|
||||
"electron": "^22.3.8",
|
||||
"electron-builder": "^24.3.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.12.0",
|
||||
"eslint-plugin-vue": "^9.11.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.8",
|
||||
"terser-webpack-plugin": "^5.3.7",
|
||||
"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.82.1",
|
||||
"webpack-cli": "^5.1.1",
|
||||
"webpack-dev-server": "^4.15.0",
|
||||
"webpack": "^5.82.0",
|
||||
"webpack-cli": "^5.0.2",
|
||||
"webpack-dev-server": "^4.13.3",
|
||||
"webpack-hot-middleware": "^2.25.3",
|
||||
"webpack-merge": "^5.8.0",
|
||||
"worker-loader": "^3.0.8"
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
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 'node:fs'
|
||||
import { extname, basename } from 'node:path'
|
||||
import { isEmpty, isEqual } from 'lodash'
|
||||
|
||||
import {
|
||||
APP_RUN_MODE,
|
||||
AUTO_SYNC_TRACKER_INTERVAL,
|
||||
AUTO_CHECK_UPDATE_INTERVAL,
|
||||
PROXY_SCOPES
|
||||
AUTO_CHECK_UPDATE_INTERVAL
|
||||
} from '@shared/constants'
|
||||
import { checkIsNeedRun } from '@shared/utils'
|
||||
import {
|
||||
@@ -62,22 +61,22 @@ export default class Application extends EventEmitter {
|
||||
|
||||
this.initEngineClient()
|
||||
|
||||
this.initTouchBarManager()
|
||||
|
||||
this.initThemeManager()
|
||||
|
||||
this.initTrayManager()
|
||||
|
||||
this.initTouchBarManager()
|
||||
|
||||
this.initDockManager()
|
||||
|
||||
this.initAutoLaunchManager()
|
||||
|
||||
this.initEnergyManager()
|
||||
|
||||
this.initProtocolManager()
|
||||
|
||||
this.initUpdaterManager()
|
||||
|
||||
this.initProtocolManager()
|
||||
|
||||
this.handleCommands()
|
||||
|
||||
this.handleEvents()
|
||||
@@ -289,49 +288,6 @@ 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'
|
||||
@@ -439,13 +395,22 @@ export default class Application extends EventEmitter {
|
||||
this.upnp.closeClient()
|
||||
}
|
||||
|
||||
syncTrackers (source, proxy) {
|
||||
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')
|
||||
if (isEmpty(source)) {
|
||||
return
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
fetchBtTrackerFromSource(source, proxy).then((data) => {
|
||||
fetchBtTrackerFromSource(source).then((data) => {
|
||||
logger.warn('[Motrix] auto sync tracker data:', data)
|
||||
if (!data || data.length === 0) {
|
||||
return
|
||||
@@ -467,21 +432,6 @@ 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) {
|
||||
@@ -683,12 +633,9 @@ 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,
|
||||
proxy
|
||||
autoCheck: checkIsNeedRun(enabled, lastTime, AUTO_CHECK_UPDATE_INTERVAL)
|
||||
})
|
||||
this.handleUpdaterEvents()
|
||||
}
|
||||
@@ -748,7 +695,7 @@ export default class Application extends EventEmitter {
|
||||
|
||||
const sessionPath = this.context.get('session-path')
|
||||
setTimeout(() => {
|
||||
unlink(sessionPath, (err) => {
|
||||
unlink(sessionPath, function (err) {
|
||||
logger.info('[Motrix] Removed the download seesion file:', err)
|
||||
})
|
||||
|
||||
@@ -796,7 +743,7 @@ export default class Application extends EventEmitter {
|
||||
|
||||
this.on('application:reset-session', () => this.resetSession())
|
||||
|
||||
this.on('application:factory-reset', () => {
|
||||
this.on('application:reset', () => {
|
||||
this.offConfigListeners()
|
||||
this.configManager.reset()
|
||||
this.relaunch()
|
||||
@@ -923,7 +870,7 @@ export default class Application extends EventEmitter {
|
||||
|
||||
handleEvents () {
|
||||
this.once('application:initialized', () => {
|
||||
this.autoSyncTrackers()
|
||||
this.autoSyncTracker()
|
||||
|
||||
this.autoResumeTask()
|
||||
|
||||
@@ -937,9 +884,6 @@ 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)
|
||||
|
||||
@@ -3,10 +3,9 @@ import is from 'electron-is'
|
||||
import Store from 'electron-store'
|
||||
|
||||
import {
|
||||
getConfigBasePath,
|
||||
getDhtPath,
|
||||
getMaxConnectionPerServer,
|
||||
getUserDownloadsPath
|
||||
getUserDownloadsPath,
|
||||
getMaxConnectionPerServer
|
||||
} from '../utils/index'
|
||||
import {
|
||||
APP_RUN_MODE,
|
||||
@@ -16,9 +15,7 @@ import {
|
||||
IP_VERSION,
|
||||
LOGIN_SETTING_OPTIONS,
|
||||
NGOSANG_TRACKERS_BEST_IP_URL_CDN,
|
||||
NGOSANG_TRACKERS_BEST_URL_CDN,
|
||||
PROXY_SCOPES,
|
||||
PROXY_SCOPE_OPTIONS
|
||||
NGOSANG_TRACKERS_BEST_URL_CDN
|
||||
} from '@shared/constants'
|
||||
import { CHROME_UA } from '@shared/ua'
|
||||
import { separateConfig } from '@shared/utils'
|
||||
@@ -33,8 +30,8 @@ export default class ConfigManager {
|
||||
}
|
||||
|
||||
init () {
|
||||
this.initUserConfig()
|
||||
this.initSystemConfig()
|
||||
this.initUserConfig()
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -46,7 +43,6 @@ export default class ConfigManager {
|
||||
initSystemConfig () {
|
||||
this.systemConfig = new Store({
|
||||
name: 'system',
|
||||
cwd: getConfigBasePath(),
|
||||
/* eslint-disable quote-props */
|
||||
defaults: {
|
||||
'all-proxy': EMPTY_STRING,
|
||||
@@ -76,8 +72,8 @@ export default class ConfigManager {
|
||||
'pause': true,
|
||||
'rpc-listen-port': ENGINE_RPC_PORT,
|
||||
'rpc-secret': EMPTY_STRING,
|
||||
'seed-ratio': 2,
|
||||
'seed-time': 2880,
|
||||
'seed-ratio': 1,
|
||||
'seed-time': 60,
|
||||
'split': getMaxConnectionPerServer(),
|
||||
'user-agent': CHROME_UA
|
||||
}
|
||||
@@ -89,7 +85,6 @@ 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: {
|
||||
@@ -100,6 +95,7 @@ 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,
|
||||
@@ -118,12 +114,6 @@ 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,
|
||||
@@ -136,6 +126,7 @@ 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 */
|
||||
@@ -146,18 +137,13 @@ export default class ConfigManager {
|
||||
fixSystemConfig () {
|
||||
// Remove aria2c unrecognized options
|
||||
const { others } = separateConfig(this.systemConfig.store)
|
||||
if (others && Object.keys(others).length > 0) {
|
||||
Object.keys(others).forEach(key => {
|
||||
this.systemConfig.delete(key)
|
||||
})
|
||||
if (!others) {
|
||||
return
|
||||
}
|
||||
|
||||
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)
|
||||
}
|
||||
Object.keys(others).forEach(key => {
|
||||
this.systemConfig.delete(key)
|
||||
})
|
||||
|
||||
// Fix spawn ENAMETOOLONG on Windows
|
||||
const tracker = reduceTrackerString(this.systemConfig.get('bt-tracker'))
|
||||
|
||||
@@ -3,6 +3,7 @@ import {
|
||||
getEnginePath,
|
||||
getAria2BinPath,
|
||||
getAria2ConfPath,
|
||||
getLogPath,
|
||||
getSessionPath
|
||||
} from '../utils'
|
||||
|
||||
@@ -13,17 +14,12 @@ 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': this.getLogPath(),
|
||||
'log-path': getLogPath(),
|
||||
'session-path': getSessionPath(),
|
||||
'engine-path': getEnginePath(platform, arch),
|
||||
'aria2-bin-path': getAria2BinPath(platform, arch),
|
||||
|
||||
@@ -43,9 +43,9 @@ export default class Engine {
|
||||
const pid = this.instance.pid.toString()
|
||||
this.writePidFile(pidPath, pid)
|
||||
|
||||
this.instance.once('close', () => {
|
||||
this.instance.once('close', function () {
|
||||
try {
|
||||
unlink(pidPath, (err) => {
|
||||
unlink(pidPath, function (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', (data) => {
|
||||
this.instance.stdout.on('data', function (data) {
|
||||
logger.log('[Motrix] engine stdout===>', data.toString())
|
||||
})
|
||||
|
||||
this.instance.stderr.on('data', (data) => {
|
||||
this.instance.stderr.on('data', function (data) {
|
||||
logger.log('[Motrix] engine stderr===>', data.toString())
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,16 +1,7 @@
|
||||
import { join } from 'node:path'
|
||||
import is from 'electron-is'
|
||||
import logger from 'electron-log'
|
||||
|
||||
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.transports.file.level = is.production() ? 'info' : 'silly'
|
||||
logger.info('[Motrix] Logger init')
|
||||
logger.warn('[Motrix] Logger init')
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ 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'
|
||||
|
||||
@@ -23,9 +22,6 @@ 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
|
||||
@@ -33,31 +29,6 @@ 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
|
||||
|
||||
@@ -5,20 +5,20 @@ const localeManager = new LocaleManager({
|
||||
resources
|
||||
})
|
||||
|
||||
export const getLocaleManager = () => {
|
||||
export function getLocaleManager () {
|
||||
return localeManager
|
||||
}
|
||||
|
||||
export const setupLocaleManager = (locale) => {
|
||||
export function setupLocaleManager (locale) {
|
||||
localeManager.changeLanguageByLocale(locale)
|
||||
|
||||
return localeManager
|
||||
}
|
||||
|
||||
export const getI18n = () => {
|
||||
export function getI18n () {
|
||||
return localeManager.getI18n()
|
||||
}
|
||||
|
||||
export const getI18nTranslator = () => {
|
||||
export function getI18nTranslator () {
|
||||
return localeManager.getI18n().t
|
||||
}
|
||||
|
||||
@@ -6,49 +6,42 @@ import is from 'electron-is'
|
||||
import {
|
||||
APP_THEME,
|
||||
ENGINE_MAX_CONNECTION_PER_SERVER,
|
||||
IP_VERSION,
|
||||
IS_PORTABLE,
|
||||
PORTABLE_EXECUTABLE_DIR
|
||||
IP_VERSION
|
||||
} from '@shared/constants'
|
||||
import { engineBinMap, engineArchMap } from '../configs/engine'
|
||||
import logger from '../core/Logger'
|
||||
|
||||
export const getUserDataPath = () => {
|
||||
return IS_PORTABLE ? PORTABLE_EXECUTABLE_DIR : app.getPath('userData')
|
||||
}
|
||||
|
||||
export const getSystemLogPath = () => {
|
||||
export function getLogPath () {
|
||||
return app.getPath('logs')
|
||||
}
|
||||
|
||||
export const getUserDownloadsPath = () => {
|
||||
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 () {
|
||||
return app.getPath('downloads')
|
||||
}
|
||||
|
||||
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) => {
|
||||
export function getEngineBin (platform) {
|
||||
const result = engineBinMap[platform] || ''
|
||||
return result
|
||||
}
|
||||
|
||||
export const getEngineArch = (platform, arch) => {
|
||||
export function getEngineArch (platform, arch) {
|
||||
if (!['darwin', 'win32', 'linux'].includes(platform)) {
|
||||
return ''
|
||||
}
|
||||
@@ -84,7 +77,7 @@ export const getAria2ConfPath = (platform, arch) => {
|
||||
return resolve(base, './aria2.conf')
|
||||
}
|
||||
|
||||
export const transformConfig = (config) => {
|
||||
export function transformConfig (config) {
|
||||
const result = []
|
||||
for (const [k, v] of Object.entries(config)) {
|
||||
if (v !== '') {
|
||||
@@ -94,7 +87,7 @@ export const transformConfig = (config) => {
|
||||
return result
|
||||
}
|
||||
|
||||
export const isRunningInDmg = () => {
|
||||
export function isRunningInDmg () {
|
||||
if (!is.macOS() || is.dev()) {
|
||||
return false
|
||||
}
|
||||
@@ -103,7 +96,7 @@ export const isRunningInDmg = () => {
|
||||
return result
|
||||
}
|
||||
|
||||
export const moveAppToApplicationsFolder = (errorMsg = '') => {
|
||||
export function moveAppToApplicationsFolder (errorMsg = '') {
|
||||
return new Promise((resolve, reject) => {
|
||||
try {
|
||||
const result = app.moveToApplicationsFolder()
|
||||
@@ -118,7 +111,7 @@ export const moveAppToApplicationsFolder = (errorMsg = '') => {
|
||||
})
|
||||
}
|
||||
|
||||
export const splitArgv = (argv) => {
|
||||
export function splitArgv (argv) {
|
||||
const args = []
|
||||
const extra = {}
|
||||
for (const arg of argv) {
|
||||
@@ -134,7 +127,7 @@ export const splitArgv = (argv) => {
|
||||
return { args, extra }
|
||||
}
|
||||
|
||||
export const parseArgvAsUrl = (argv) => {
|
||||
export function parseArgvAsUrl (argv) {
|
||||
const arg = argv[1]
|
||||
if (!arg) {
|
||||
return
|
||||
@@ -145,7 +138,7 @@ export const parseArgvAsUrl = (argv) => {
|
||||
}
|
||||
}
|
||||
|
||||
export const checkIsSupportedSchema = (url = '') => {
|
||||
export function checkIsSupportedSchema (url = '') {
|
||||
const str = url.toLowerCase()
|
||||
if (
|
||||
str.startsWith('ftp:') ||
|
||||
@@ -162,11 +155,11 @@ export const checkIsSupportedSchema = (url = '') => {
|
||||
}
|
||||
}
|
||||
|
||||
export const isDirectory = (path) => {
|
||||
export function isDirectory (path) {
|
||||
return existsSync(path) && lstatSync(path).isDirectory()
|
||||
}
|
||||
|
||||
export const parseArgvAsFile = (argv) => {
|
||||
export function parseArgvAsFile (argv) {
|
||||
let arg = argv[1]
|
||||
if (!arg || isDirectory(arg)) {
|
||||
return
|
||||
@@ -197,7 +190,7 @@ export const convertArrayBufferToBuffer = (arrayBuffer) => {
|
||||
return buffer
|
||||
}
|
||||
|
||||
export const showItemInFolder = (fullPath) => {
|
||||
export function showItemInFolder (fullPath) {
|
||||
if (!fullPath) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { parse } from 'querystring'
|
||||
|
||||
export const concat = (template, submenu, submenuToAdd) => {
|
||||
export function concat (template, submenu, submenuToAdd) {
|
||||
submenuToAdd.forEach(sub => {
|
||||
let relativeItem = null
|
||||
if (sub.position) {
|
||||
@@ -37,7 +37,7 @@ export const concat = (template, submenu, submenuToAdd) => {
|
||||
})
|
||||
}
|
||||
|
||||
export const merge = (template, item) => {
|
||||
export function 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 const translateTemplate = (template, keystrokesByCommand, i18n) => {
|
||||
export function translateTemplate (template, keystrokesByCommand, i18n) {
|
||||
for (const i in template) {
|
||||
const item = template[i]
|
||||
if (item.command) {
|
||||
@@ -101,7 +101,7 @@ export const translateTemplate = (template, keystrokesByCommand, i18n) => {
|
||||
return template
|
||||
}
|
||||
|
||||
export const handleCommand = (item) => {
|
||||
export function handleCommand (item) {
|
||||
handleCommandBefore(item)
|
||||
|
||||
const args = item['command-arg']
|
||||
@@ -158,7 +158,7 @@ function acceleratorForCommand (command, keystrokesByCommand) {
|
||||
return null
|
||||
}
|
||||
|
||||
export const flattenMenuItems = (menu) => {
|
||||
export function flattenMenuItems (menu) {
|
||||
const flattenItems = {}
|
||||
menu.items.forEach(item => {
|
||||
if (item.id) {
|
||||
@@ -171,7 +171,7 @@ export const flattenMenuItems = (menu) => {
|
||||
return flattenItems
|
||||
}
|
||||
|
||||
export const updateStates = (itemsById, visibleStates, enabledStates, checkedStates) => {
|
||||
export function updateStates (itemsById, visibleStates, enabledStates, checkedStates) {
|
||||
if (visibleStates) {
|
||||
for (const command in visibleStates) {
|
||||
const item = itemsById[command]
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
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.proxy.enable"
|
||||
:active-text="$t('preferences.enable-proxy')"
|
||||
@change="onProxyEnableChange"
|
||||
v-model="form.useProxy"
|
||||
:active-text="$t('preferences.use-proxy')"
|
||||
@change="onUseProxyChange"
|
||||
>
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label-width="formLabelWidth"
|
||||
v-if="form.proxy.enable"
|
||||
v-if="form.useProxy"
|
||||
style="margin-top: -16px;"
|
||||
>
|
||||
<el-col
|
||||
@@ -69,8 +69,8 @@
|
||||
>
|
||||
<el-input
|
||||
placeholder="[http://][USER:PASSWORD@]HOST[:PORT]"
|
||||
@change="onProxyServerChange"
|
||||
v-model="form.proxy.server">
|
||||
@change="onAllProxyBackupChange"
|
||||
v-model="form.allProxyBackup">
|
||||
</el-input>
|
||||
</el-col>
|
||||
<el-col
|
||||
@@ -84,30 +84,9 @@
|
||||
type="textarea"
|
||||
rows="2"
|
||||
auto-complete="off"
|
||||
@change="handleProxyBypassChange"
|
||||
:placeholder="`${$t('preferences.proxy-bypass-input-tips')}`"
|
||||
v-model="form.proxy.bypass">
|
||||
:placeholder="`${$t('preferences.no-proxy-input-tips')}`"
|
||||
v-model="form.noProxy">
|
||||
</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') }}
|
||||
@@ -453,10 +432,10 @@
|
||||
EMPTY_STRING,
|
||||
ENGINE_RPC_PORT,
|
||||
LOG_LEVELS,
|
||||
TRACKER_SOURCE_OPTIONS,
|
||||
PROXY_SCOPE_OPTIONS
|
||||
trackerSourceOptions
|
||||
} from '@shared/constants'
|
||||
import {
|
||||
backupConfig,
|
||||
buildRpcUrl,
|
||||
calcFormLabelWidth,
|
||||
changedConfig,
|
||||
@@ -475,6 +454,8 @@
|
||||
|
||||
const initForm = (config) => {
|
||||
const {
|
||||
allProxy,
|
||||
allProxyBackup,
|
||||
autoCheckUpdate,
|
||||
autoSyncTracker,
|
||||
btTracker,
|
||||
@@ -485,8 +466,8 @@
|
||||
lastSyncTrackerTime,
|
||||
listenPort,
|
||||
logLevel,
|
||||
noProxy,
|
||||
protocols,
|
||||
proxy,
|
||||
rpcListenPort,
|
||||
rpcSecret,
|
||||
trackerSource,
|
||||
@@ -494,6 +475,8 @@
|
||||
userAgent
|
||||
} = config
|
||||
const result = {
|
||||
allProxy,
|
||||
allProxyBackup,
|
||||
autoCheckUpdate,
|
||||
autoSyncTracker,
|
||||
btTracker: convertCommaToLine(btTracker),
|
||||
@@ -504,7 +487,7 @@
|
||||
lastSyncTrackerTime,
|
||||
listenPort,
|
||||
logLevel,
|
||||
proxy: cloneDeep(proxy),
|
||||
noProxy: convertCommaToLine(noProxy),
|
||||
protocols: { ...protocols },
|
||||
rpcListenPort,
|
||||
rpcSecret,
|
||||
@@ -532,9 +515,8 @@
|
||||
formLabelWidth: calcFormLabelWidth(locale),
|
||||
formOriginal,
|
||||
hideRpcSecret: true,
|
||||
proxyScopeOptions: PROXY_SCOPE_OPTIONS,
|
||||
rules: {},
|
||||
trackerSourceOptions: TRACKER_SOURCE_OPTIONS,
|
||||
trackerSourceOptions,
|
||||
trackerSyncing: false
|
||||
}
|
||||
},
|
||||
@@ -595,6 +577,8 @@
|
||||
handleLocaleChange (locale) {
|
||||
const lng = getLanguage(locale)
|
||||
getLocaleManager().changeLanguage(lng)
|
||||
this.$electron.ipcRenderer.send('command',
|
||||
'application:change-locale', lng)
|
||||
},
|
||||
onCheckUpdateClick () {
|
||||
this.$electron.ipcRenderer.send('command', 'application:check-for-updates')
|
||||
@@ -626,29 +610,11 @@
|
||||
[protocol]: enabled
|
||||
}
|
||||
},
|
||||
onProxyEnableChange (enable) {
|
||||
this.form.proxy = {
|
||||
...this.form.proxy,
|
||||
enable
|
||||
}
|
||||
onUseProxyChange (flag) {
|
||||
this.form.allProxy = flag ? this.form.allProxyBackup : ''
|
||||
},
|
||||
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]
|
||||
}
|
||||
onAllProxyBackupChange (value) {
|
||||
this.form.allProxy = value
|
||||
},
|
||||
changeUA (type) {
|
||||
const ua = userAgentMap[type]
|
||||
@@ -710,7 +676,7 @@
|
||||
cancelId: 1
|
||||
}).then(({ response }) => {
|
||||
if (response === 0) {
|
||||
this.$electron.ipcRenderer.send('command', 'application:factory-reset')
|
||||
this.$electron.ipcRenderer.send('command', 'application:reset')
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -719,6 +685,10 @@
|
||||
.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) {
|
||||
@@ -734,9 +704,10 @@
|
||||
}
|
||||
|
||||
const {
|
||||
autoHideWindow,
|
||||
btAutoDownloadContent,
|
||||
autoHideWindow,
|
||||
btTracker,
|
||||
noProxy,
|
||||
rpcListenPort
|
||||
} = data
|
||||
|
||||
@@ -750,6 +721,10 @@
|
||||
data.btTracker = reduceTrackerString(convertLineToComma(btTracker))
|
||||
}
|
||||
|
||||
if (noProxy) {
|
||||
data.noProxy = convertLineToComma(noProxy)
|
||||
}
|
||||
|
||||
if (rpcListenPort === EMPTY_STRING) {
|
||||
data.rpcListenPort = this.rpcDefaultPort
|
||||
}
|
||||
@@ -801,8 +776,17 @@
|
||||
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(backupConfig.locale)
|
||||
}
|
||||
changedConfig.basic = {}
|
||||
changedConfig.advanced = {}
|
||||
backupConfig.theme = undefined
|
||||
next()
|
||||
}
|
||||
})
|
||||
@@ -813,9 +797,6 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.proxy-scope {
|
||||
width: 100%;
|
||||
}
|
||||
.bt-tracker {
|
||||
position: relative;
|
||||
.sync-tracker-btn {
|
||||
|
||||
@@ -72,6 +72,7 @@
|
||||
<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"
|
||||
@@ -143,7 +144,8 @@
|
||||
<el-select
|
||||
style="width: 100px;"
|
||||
v-model="uploadUnit"
|
||||
@change="handleUploadChange">
|
||||
@change="handleUploadChange"
|
||||
:placeholder="$t('preferences.speed-units')">
|
||||
<el-option
|
||||
v-for="item in speedUnits"
|
||||
:key="item.value"
|
||||
@@ -165,7 +167,8 @@
|
||||
<el-select
|
||||
style="width: 100px;"
|
||||
v-model="downloadUnit"
|
||||
@change="handleDownloadChange">
|
||||
@change="handleDownloadChange"
|
||||
:placeholder="$t('preferences.speed-units')">
|
||||
<el-option
|
||||
v-for="item in speedUnits"
|
||||
:key="item.value"
|
||||
@@ -305,6 +308,7 @@
|
||||
import { availableLanguages, getLanguage } from '@shared/locales'
|
||||
import { getLocaleManager } from '@/components/Locale'
|
||||
import {
|
||||
backupConfig,
|
||||
calcFormLabelWidth,
|
||||
changedConfig,
|
||||
checkIsNeedRestart,
|
||||
@@ -315,8 +319,7 @@
|
||||
import {
|
||||
APP_RUN_MODE,
|
||||
EMPTY_STRING,
|
||||
ENGINE_MAX_CONCURRENT_DOWNLOADS,
|
||||
ENGINE_RPC_PORT
|
||||
ENGINE_MAX_CONCURRENT_DOWNLOADS
|
||||
} from '@shared/constants'
|
||||
import { reduceTrackerString } from '@shared/utils/tracker'
|
||||
|
||||
@@ -403,6 +406,13 @@
|
||||
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,9 +526,6 @@
|
||||
showHideAppMenuOption () {
|
||||
return is.windows() || is.linux()
|
||||
},
|
||||
rpcDefaultPort () {
|
||||
return ENGINE_RPC_PORT
|
||||
},
|
||||
...mapState('preference', {
|
||||
config: state => state.config
|
||||
})
|
||||
@@ -527,18 +534,22 @@
|
||||
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, 10)
|
||||
const speedLimit = parseInt(this.form.maxOverallDownloadLimit)
|
||||
this.downloadUnit = value
|
||||
const limit = speedLimit > 0 ? `${speedLimit}${value}` : 0
|
||||
this.form.maxOverallDownloadLimit = limit
|
||||
},
|
||||
handleUploadChange (value) {
|
||||
const speedLimit = parseInt(this.form.maxOverallUploadLimit, 10)
|
||||
const speedLimit = parseInt(this.form.maxOverallUploadLimit)
|
||||
this.uploadUnit = value
|
||||
const limit = speedLimit > 0 ? `${speedLimit}${value}` : 0
|
||||
this.form.maxOverallUploadLimit = limit
|
||||
@@ -577,9 +588,10 @@
|
||||
}
|
||||
|
||||
const {
|
||||
autoHideWindow,
|
||||
btAutoDownloadContent,
|
||||
autoHideWindow,
|
||||
btTracker,
|
||||
noProxy,
|
||||
rpcListenPort
|
||||
} = data
|
||||
|
||||
@@ -593,6 +605,10 @@
|
||||
data.btTracker = reduceTrackerString(convertLineToComma(btTracker))
|
||||
}
|
||||
|
||||
if (noProxy) {
|
||||
data.noProxy = convertLineToComma(noProxy)
|
||||
}
|
||||
|
||||
if (rpcListenPort === EMPTY_STRING) {
|
||||
data.rpcListenPort = this.rpcDefaultPort
|
||||
}
|
||||
@@ -625,6 +641,8 @@
|
||||
})
|
||||
},
|
||||
resetForm (formName) {
|
||||
this.$refs.themeSwitcher.currentValue = backupConfig.theme
|
||||
this.handleLocaleChange(this.formOriginal.locale)
|
||||
this.syncFormConfig()
|
||||
}
|
||||
},
|
||||
@@ -644,8 +662,17 @@
|
||||
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,7 +3,6 @@
|
||||
custom-class="tab-title-dialog add-task-dialog"
|
||||
width="67vw"
|
||||
:visible="visible"
|
||||
:top="dialogTop"
|
||||
:show-close="false"
|
||||
:before-close="beforeClose"
|
||||
@open="handleOpen"
|
||||
@@ -245,9 +244,6 @@
|
||||
}),
|
||||
taskType () {
|
||||
return this.type
|
||||
},
|
||||
dialogTop () {
|
||||
return this.showAdvanced ? '8vh' : '15vh'
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
@@ -65,9 +65,6 @@
|
||||
<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
|
||||
@@ -88,7 +85,6 @@
|
||||
import '@/components/Icons/video'
|
||||
import '@/components/Icons/audio'
|
||||
import '@/components/Icons/image'
|
||||
import '@/components/Icons/document'
|
||||
import {
|
||||
NONE_SELECTED_FILES,
|
||||
SELECTED_ALL_FILES
|
||||
@@ -96,10 +92,9 @@
|
||||
import {
|
||||
bytesToSize,
|
||||
calcProgress,
|
||||
filterAudioFiles,
|
||||
filterDocumentFiles,
|
||||
filterImageFiles,
|
||||
filterVideoFiles,
|
||||
filterAudioFiles,
|
||||
filterImageFiles,
|
||||
removeExtensionDot
|
||||
} from '@shared/utils'
|
||||
|
||||
@@ -197,10 +192,6 @@
|
||||
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)
|
||||
},
|
||||
|
||||
@@ -237,11 +237,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
.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;
|
||||
@@ -454,13 +449,4 @@
|
||||
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,8 +21,6 @@
|
||||
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',
|
||||
@@ -80,17 +78,13 @@
|
||||
this.updateRootClassName()
|
||||
},
|
||||
watch: {
|
||||
locale (val) {
|
||||
const lng = getLanguage(val)
|
||||
getLocaleManager().changeLanguage(lng)
|
||||
},
|
||||
themeClass () {
|
||||
themeClass (val, oldVal) {
|
||||
this.updateRootClassName()
|
||||
},
|
||||
i18nClass () {
|
||||
i18nClass (val, oldVal) {
|
||||
this.updateRootClassName()
|
||||
},
|
||||
directionClass () {
|
||||
directionClass (val, oldVal) {
|
||||
this.updateRootClassName()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,12 +22,7 @@ const updateSystemTheme = (payload = {}) => {
|
||||
|
||||
const updateTheme = (payload = {}) => {
|
||||
const { theme } = payload
|
||||
store.dispatch('preference/updateAppTheme', theme)
|
||||
}
|
||||
|
||||
const updateLocale = (payload = {}) => {
|
||||
const { locale } = payload
|
||||
store.dispatch('preference/updateAppLocale', locale)
|
||||
store.dispatch('preference/updateThemeConfig', theme)
|
||||
}
|
||||
|
||||
const updateTrayFocused = (payload = {}) => {
|
||||
@@ -197,5 +192,4 @@ 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,19 +114,14 @@ const actions = {
|
||||
favoriteDirectories: favorite
|
||||
})
|
||||
},
|
||||
updateAppTheme ({ dispatch }, theme) {
|
||||
updateThemeConfig ({ dispatch }, theme) {
|
||||
dispatch('updatePreference', { theme })
|
||||
},
|
||||
updateAppLocale ({ dispatch }, locale) {
|
||||
dispatch('updatePreference', { locale })
|
||||
},
|
||||
updatePreference ({ commit }, config) {
|
||||
commit('UPDATE_PREFERENCE_DATA', config)
|
||||
},
|
||||
fetchBtTracker (_, trackerSource = []) {
|
||||
const { proxy = { enable: false } } = state.config
|
||||
console.log('fetchBtTracker', trackerSource, proxy)
|
||||
return fetchBtTrackerFromSource(trackerSource, proxy)
|
||||
return fetchBtTrackerFromSource(trackerSource)
|
||||
},
|
||||
toggleEngineMode () {
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { shell, nativeTheme } from '@electron/remote'
|
||||
import { access, constants } from 'node:fs'
|
||||
import { resolve } from 'node:path'
|
||||
import { shell, nativeTheme } from '@electron/remote'
|
||||
import { Message } from 'element-ui'
|
||||
|
||||
import {
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
} from '@shared/utils'
|
||||
import { APP_THEME, TASK_STATUS } from '@shared/constants'
|
||||
|
||||
export const showItemInFolder = (fullPath, { errorMsg }) => {
|
||||
export function showItemInFolder (fullPath, { errorMsg }) {
|
||||
if (!fullPath) {
|
||||
return
|
||||
}
|
||||
@@ -35,7 +35,7 @@ export const openItem = async (fullPath) => {
|
||||
return result
|
||||
}
|
||||
|
||||
export const getTaskFullPath = (task) => {
|
||||
export function getTaskFullPath (task) {
|
||||
const { dir, files, bittorrent } = task
|
||||
let result = resolve(dir)
|
||||
|
||||
@@ -109,7 +109,7 @@ export const moveTaskFilesToTrash = (task) => {
|
||||
return deleteResult1 && deleteResult2
|
||||
}
|
||||
|
||||
export const getSystemTheme = () => {
|
||||
export function getSystemTheme () {
|
||||
return nativeTheme.shouldUseDarkColors ? APP_THEME.DARK : APP_THEME.LIGHT
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
const userKeys = [
|
||||
'all-proxy-backup',
|
||||
'auto-check-update',
|
||||
'auto-hide-window',
|
||||
'auto-sync-tracker',
|
||||
@@ -19,14 +20,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'
|
||||
'tray-speedometer',
|
||||
'use-proxy'
|
||||
]
|
||||
|
||||
const systemKeys = [
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
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',
|
||||
@@ -70,10 +68,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://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'
|
||||
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'
|
||||
|
||||
/**
|
||||
* @see https://github.com/XIU2/TrackersListCollection
|
||||
@@ -82,14 +80,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://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'
|
||||
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'
|
||||
|
||||
// For bt-exclude-tracker
|
||||
export const XIU2_TRACKERS_BLACK_URL = 'https://cdn.jsdelivr.net/gh/XIU2/TrackersListCollection/blacklist.txt'
|
||||
export const XIU2_TRACKERS_BLACK_URL = 'https://fastly.jsdelivr.net/gh/XIU2/TrackersListCollection/blacklist.txt'
|
||||
|
||||
export const TRACKER_SOURCE_OPTIONS = [
|
||||
export const trackerSourceOptions = [
|
||||
{
|
||||
label: 'ngosang/trackerslist',
|
||||
options: [
|
||||
@@ -172,18 +170,6 @@ export const TRACKER_SOURCE_OPTIONS = [
|
||||
}
|
||||
]
|
||||
|
||||
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'
|
||||
|
||||
@@ -241,9 +227,7 @@ export const IMAGE_SUFFIXES = [
|
||||
'.ai',
|
||||
'.bmp',
|
||||
'.eps',
|
||||
'.fig',
|
||||
'.gif',
|
||||
'.heic',
|
||||
'.icn',
|
||||
'.ico',
|
||||
'.jpeg',
|
||||
@@ -257,7 +241,6 @@ export const IMAGE_SUFFIXES = [
|
||||
'.webp',
|
||||
'.xd'
|
||||
]
|
||||
|
||||
export const AUDIO_SUFFIXES = [
|
||||
'.aac',
|
||||
'.ape',
|
||||
@@ -269,7 +252,6 @@ export const AUDIO_SUFFIXES = [
|
||||
'.wav',
|
||||
'.wma'
|
||||
]
|
||||
|
||||
export const VIDEO_SUFFIXES = [
|
||||
'.avi',
|
||||
'.m4v',
|
||||
@@ -291,21 +273,3 @@ 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,11 +48,8 @@ export default {
|
||||
'change-language': 'تغيير اللغة',
|
||||
'hide-app-menu': 'إخفاء قائمة التطبيقات (Windows و Linux فقط)',
|
||||
'proxy': 'الخادم الوسيط',
|
||||
'enable-proxy': 'تفعيل الخادم الوسيط',
|
||||
'proxy-bypass-input-tips': 'تخطي إعدادات الخادم الوسيط لهذه المضيفات والمجالات، واحدة لكل سطر',
|
||||
'proxy-scope-download': 'تنزيل',
|
||||
'proxy-scope-update-app': 'تحديث التطبيق',
|
||||
'proxy-scope-update-trackers': 'تحديث المتتبعات',
|
||||
'use-proxy': 'تفعيل الخادم الوسيط',
|
||||
'no-proxy-input-tips': 'تخطي إعدادات الخادم الوسيط لهذه المضيفات والمجالات، واحدة لكل سطر',
|
||||
'proxy-tips': 'عرض دليل الخادم الوسيط',
|
||||
'bt-tracker': 'خوادم التعقب',
|
||||
'bt-tracker-input-tips': 'خوادم التعقب، واحدة لكل سطر',
|
||||
@@ -90,5 +87,6 @@ export default {
|
||||
'auto-check-update': 'تحقق تلقائيًا من التحديث',
|
||||
'last-check-update-time': 'آخر مرة تم التحقق من وجود تحديثات',
|
||||
'not-saved': 'التفضيلات غير محفوظة',
|
||||
'not-saved-confirm': 'ستفقد التفضيلات التي تم تغييرها ، هل أنت متأكد من المغادرة؟'
|
||||
'not-saved-confirm': 'ستفقد التفضيلات التي تم تغييرها ، هل أنت متأكد من المغادرة؟',
|
||||
'speed-units': "Change Units"
|
||||
}
|
||||
|
||||
@@ -47,11 +47,8 @@ export default {
|
||||
'change-language': 'промяна на езика',
|
||||
'hide-app-menu': 'Скриване на менюто на приложението (само за Windows и Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'enable-proxy': 'използване на Proxy',
|
||||
'proxy-bypass-input-tips': 'заобикаляне на настройките на прокси за тези хостове и домейни, един по един на ред',
|
||||
'proxy-scope-download': 'Изтегляне',
|
||||
'proxy-scope-update-app': 'Актуализиране на приложението',
|
||||
'proxy-scope-update-trackers': 'Актуализиране на трекери',
|
||||
'use-proxy': 'използване на Proxy',
|
||||
'no-proxy-input-tips': 'заобикаляне на настройките на прокси за тези хостове и домейни, един по един на ред',
|
||||
'proxy-tips': 'преглед на ръководството за прокси',
|
||||
'bt-tracker':'Tracker сървър',
|
||||
'bt-tracker-input-tips': 'Tracker сървър, един на ред',
|
||||
@@ -86,5 +83,6 @@ export default {
|
||||
'auto-check-update':'автоматична проверка на актуализациите',
|
||||
'last-check-update-time': 'последната актуализация е проверена',
|
||||
'not-saved': 'Предпочитанията не са запазени',
|
||||
'not-saved-confirm': 'Променените предпочитания ще бъдат загубени, сигурни ли сте, че ще напуснете?'
|
||||
'not-saved-confirm': 'Променените предпочитания ще бъдат загубени, сигурни ли сте, че ще напуснете?',
|
||||
'speed-units': "Change Units"
|
||||
}
|
||||
|
||||
@@ -48,11 +48,8 @@ export default {
|
||||
'change-language': 'Cambiar idioma',
|
||||
'hide-app-menu': 'Ocultar el menú (només Windows i Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'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',
|
||||
'use-proxy': 'Activar proxy',
|
||||
'no-proxy-input-tips': 'Eviteu la configuració del servidor intermediari per a aquests amfitrions i dominis, un per línia',
|
||||
'proxy-tips': 'Consulteu el manual del servidor intermediari',
|
||||
'bt-tracker': 'Seguir servidors',
|
||||
'bt-tracker-input-tips': 'Seguir servidors, un per línia',
|
||||
@@ -88,5 +85,6 @@ 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?'
|
||||
'not-saved-confirm': 'Les preferències modificades es perdran, esteu segur que marxareu?',
|
||||
'speed-units': "Change Units"
|
||||
}
|
||||
|
||||
@@ -48,11 +48,8 @@ export default {
|
||||
'change-language': 'Sprache ändern',
|
||||
'hide-app-menu': 'App Menü ausblenden (nur auf Windows & Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'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',
|
||||
'use-proxy': 'Proxy aktivieren',
|
||||
'no-proxy-input-tips': 'Proxy-Einstellungen für diese Hosts und Domänen umgehen, eine pro Zeile',
|
||||
'proxy-tips': 'Proxy-Handbuch anzeigen',
|
||||
'bt-tracker': 'Tracker-Server',
|
||||
'bt-tracker-input-tips': 'Tracker-Server, einer pro Zeile',
|
||||
@@ -90,5 +87,6 @@ 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?'
|
||||
'not-saved-confirm': 'Die geänderten Einstellungen gehen verloren. Möchten Sie wirklich gehen?',
|
||||
'speed-units': "Change Units"
|
||||
}
|
||||
|
||||
@@ -48,11 +48,8 @@ export default {
|
||||
'change-language': 'Αλλαγή Γλώσσας',
|
||||
'hide-app-menu': 'Κρύψε το μενού της εφαρμογής (μόνο για Windows & Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'enable-proxy': 'Χρησιμοίησε Proxy',
|
||||
'proxy-bypass-input-tips': 'Μη χρησιμοποιήσεις ρυθμίσεις proxy για αυτούς τους Hosts και τα Domains, ένα ανά γραμμή',
|
||||
'proxy-scope-download': 'Λήψη',
|
||||
'proxy-scope-update-app': 'Ενημέρωση εφαρμογής',
|
||||
'proxy-scope-update-trackers': 'Ενημέρωση Trackers',
|
||||
'use-proxy': 'Χρησιμοίησε Proxy',
|
||||
'no-proxy-input-tips': 'Μη χρησιμοποιήσεις ρυθμίσεις proxy για αυτούς τους Hosts και τα Domains, ένα ανά γραμμή',
|
||||
'proxy-tips': 'Εμφάνιση εγχειριδίου Proxy',
|
||||
'bt-tracker': 'Tracker Servers',
|
||||
'bt-tracker-input-tips': 'Tracker servers, ένα ανά γραμμή',
|
||||
@@ -88,5 +85,6 @@ export default {
|
||||
'auto-check-update': 'Αυτόματος έλεγχος για ενημερώσεις',
|
||||
'last-check-update-time': 'Τελευταία φορά που έγινε έλεγχος για Ενημερώσεις',
|
||||
'not-saved': 'Οι προτιμήσεις δεν αποθηκεύτηκαν',
|
||||
'not-saved-confirm': 'Οι αλλαγμένες προτιμήσεις θα χαθούν, είστε σίγουροι ότι θα φύγετε;'
|
||||
'not-saved-confirm': 'Οι αλλαγμένες προτιμήσεις θα χαθούν, είστε σίγουροι ότι θα φύγετε;',
|
||||
'speed-units': "Change Units"
|
||||
}
|
||||
|
||||
@@ -43,16 +43,13 @@ 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 progress bar',
|
||||
'show-progress-bar': 'Show download prgress bar',
|
||||
'language': 'Language',
|
||||
'change-language': 'Change language',
|
||||
'hide-app-menu': 'Hide App Menu (Windows & Linux Only)',
|
||||
'proxy': 'Proxy',
|
||||
'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',
|
||||
'use-proxy': 'Enable Proxy',
|
||||
'no-proxy-input-tips': 'Bypass proxy settings for these Hosts and Domains, one per line',
|
||||
'proxy-tips': 'View Proxy Manual',
|
||||
'bt-tracker': 'Tracker Servers',
|
||||
'bt-tracker-input-tips': 'Tracker servers, one per line',
|
||||
@@ -90,5 +87,6 @@ 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?'
|
||||
'not-saved-confirm': 'The modified preferences will be lost, are you sure you want to leave?',
|
||||
'speed-units': "Change Units"
|
||||
}
|
||||
|
||||
@@ -48,11 +48,8 @@ export default {
|
||||
'change-language': 'Cambiar Idioma',
|
||||
'hide-app-menu': 'Ocultar el menú (Solo Windows y Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'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',
|
||||
'use-proxy': 'Activar Proxy',
|
||||
'no-proxy-input-tips': 'Omitir la configuración del proxy para estos hosts y dominios, uno por línea',
|
||||
'proxy-tips': 'Ver manual para Proxy',
|
||||
'bt-tracker': 'Servidores de rastreadores',
|
||||
'bt-tracker-input-tips': 'Servidores de rastreadores, uno por línea',
|
||||
@@ -88,5 +85,6 @@ 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?'
|
||||
'not-saved-confirm': 'Las preferencias cambiadas se perderán, ¿está seguro de irse?',
|
||||
'speed-units': "Change Units"
|
||||
}
|
||||
|
||||
@@ -48,11 +48,8 @@ export default {
|
||||
'change-language': 'تغییر زبان',
|
||||
'hide-app-menu': 'پنهان کردن منوی برنامه (تنها در ویندوز و لینوکس)',
|
||||
'proxy': 'پیشکار',
|
||||
'enable-proxy': 'فعال کردن پیشکار',
|
||||
'proxy-bypass-input-tips': 'تنظیمات پیشکار را برای این میزبانها و دامنهها استفاده نکن، یکی در هر خط',
|
||||
'proxy-scope-download': 'دانلود',
|
||||
'proxy-scope-update-app': 'بهروزرسانی برنامه',
|
||||
'proxy-scope-update-trackers': 'بهروزرسانی پیگیرها',
|
||||
'use-proxy': 'فعال کردن پیشکار',
|
||||
'no-proxy-input-tips': 'تنظیمات پیشکار را برای این میزبانها و دامنهها استفاده نکن، یکی در هر خط',
|
||||
'proxy-tips': 'مشاهده راهنمای پیشکار',
|
||||
'bt-tracker': 'سرورهای ردیاب',
|
||||
'bt-tracker-input-tips': 'سرورهای ردیاب، یکی در هر خط',
|
||||
@@ -90,5 +87,6 @@ export default {
|
||||
'auto-check-update': 'به صورت خودکار برای بهروز رسانی بررسی کن',
|
||||
'last-check-update-time': 'آخرین زمان بررسی برای بهروز رسانی',
|
||||
'not-saved': 'تنظیمات برگزیده ذخیره نشد',
|
||||
'not-saved-confirm': 'تنظیمات برگزیده تغییر یافته از بین خواهند رفت، آیا مطمئن هستید که می روید؟'
|
||||
'not-saved-confirm': 'تنظیمات برگزیده تغییر یافته از بین خواهند رفت، آیا مطمئن هستید که می روید؟',
|
||||
'speed-units': "Change Units"
|
||||
}
|
||||
|
||||
@@ -48,11 +48,8 @@ export default {
|
||||
'change-language': 'Changer la langue',
|
||||
'hide-app-menu': 'Cacher le menu de l\'application (Windows & Linux uniquement)',
|
||||
'proxy': 'Proxy',
|
||||
'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',
|
||||
'use-proxy': 'Activer le Proxy',
|
||||
'no-proxy-input-tips': 'Contourner les paramètres de proxy pour ces hôtes et domaines, un par ligne',
|
||||
'proxy-tips': 'Afficher le manuel du proxy',
|
||||
'bt-tracker': 'Serveurs Tracker',
|
||||
'bt-tracker-input-tips': 'Serveur de suivi, un par ligne',
|
||||
@@ -88,5 +85,6 @@ 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 ?'
|
||||
'not-saved-confirm': 'Les préférences modifiées seront perdues, êtes-vous sûr de partir ?',
|
||||
'speed-units': "Change Units"
|
||||
}
|
||||
|
||||
@@ -48,11 +48,8 @@ export default {
|
||||
'change-language': 'Nyelv váltas',
|
||||
'hide-app-menu': 'Alkalmazás csik elrejtése (csak Windows és Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'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',
|
||||
'use-proxy': 'Proxy engedélyezése',
|
||||
'no-proxy-input-tips': 'Proxy beálitassok elvetése ezek url és domain-nél (/sor)',
|
||||
'proxy-tips': 'Proxy kéziköny megnyitasa',
|
||||
'bt-tracker': 'Lekövetö szerverek',
|
||||
'bt-tracker-input-tips': 'Lekövetö szerverek (/sor)',
|
||||
@@ -88,5 +85,6 @@ 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?'
|
||||
'not-saved-confirm': 'A megváltozott beállítások elvesznek. Biztosan kilép?',
|
||||
'speed-units': "Change Units"
|
||||
}
|
||||
|
||||
@@ -48,11 +48,8 @@ export default {
|
||||
'change-language': 'Ubah Bahasa',
|
||||
'hide-app-menu': 'Sembunyikan Menu Aplikasi (hanya: Windows & Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'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',
|
||||
'use-proxy': 'Aktifkan Proxy',
|
||||
'no-proxy-input-tips': 'Abaikan pengaturan proxy untuk Host dan Domain ini, satu per baris',
|
||||
'proxy-tips': 'Lihat Manual Proxy',
|
||||
'bt-tracker': 'Server Pelacak',
|
||||
'bt-tracker-input-tips': 'Server pelacak, satu per baris',
|
||||
@@ -88,5 +85,6 @@ 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?'
|
||||
'not-saved-confirm': 'Preferensi yang dimodifikasi akan hilang, apakah Anda yakin untuk keluar?',
|
||||
'speed-units': "Change Units"
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ export const availableLanguages = [
|
||||
}
|
||||
]
|
||||
|
||||
const checkLngIsAvailable = (locale) => {
|
||||
function checkLngIsAvailable (locale) {
|
||||
return availableLanguages.some(lng => lng.value === locale)
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ const checkLngIsAvailable = (locale) => {
|
||||
* pt, pt-BR, pt-PT
|
||||
* zh, zh-CN, zh-HK, zh-TW
|
||||
*/
|
||||
export const getLanguage = (locale = 'en-US') => {
|
||||
export function getLanguage (locale = 'en-US') {
|
||||
if (checkLngIsAvailable(locale)) {
|
||||
return locale
|
||||
}
|
||||
|
||||
@@ -48,11 +48,8 @@ export default {
|
||||
'change-language': 'Cambia lingua',
|
||||
'hide-app-menu': 'Nascondi dal menu delle app (Solo Windows & Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'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',
|
||||
'use-proxy': 'Usa Proxy',
|
||||
'no-proxy-input-tips': 'Non usare proxy per questi Host e Domini, uno per linea',
|
||||
'proxy-tips': 'Guida all\'uso dei proxy (In Inglese)',
|
||||
'bt-tracker': 'Server di monitoraggio',
|
||||
'bt-tracker-input-tips': 'Tracker servers, uno per linea',
|
||||
@@ -88,5 +85,6 @@ 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?'
|
||||
'not-saved-confirm': 'Le preferenze modificate andranno perse, sei sicuro di uscire?',
|
||||
'speed-units': "Change Units"
|
||||
}
|
||||
|
||||
@@ -48,11 +48,8 @@ export default {
|
||||
'change-language': '言語を切り替え',
|
||||
'hide-app-menu': 'メニューバーを隠す(Windows と Linux のみサポート)',
|
||||
'proxy': 'プロキシ',
|
||||
'enable-proxy': 'プロキシを使う',
|
||||
'proxy-bypass-input-tips': 'これらのホストおよびドメインのプロキシ設定を1行に1つずつバイパスします',
|
||||
'proxy-scope-download': 'ダウンロード',
|
||||
'proxy-scope-update-app': 'アプリケーションの更新',
|
||||
'proxy-scope-update-trackers': 'トラッカーを更新する',
|
||||
'use-proxy': 'プロキシを使う',
|
||||
'no-proxy-input-tips': 'これらのホストおよびドメインのプロキシ設定を1行に1つずつバイパスします',
|
||||
'proxy-tips': 'プロキシマニュアルを表示',
|
||||
'bt-tracker': 'トラッカーサーバー',
|
||||
'bt-tracker-input-tips': 'トラッカーサーバ、一行に一つ',
|
||||
@@ -88,5 +85,6 @@ export default {
|
||||
'auto-check-update': '更新を自動で確認する',
|
||||
'last-check-update-time': '前回更新確認時間',
|
||||
'not-saved': '設定が保存されていません',
|
||||
'not-saved-confirm': '変更された設定は失われます、よろしいですか?'
|
||||
'not-saved-confirm': '変更された設定は失われます、よろしいですか?',
|
||||
'speed-units': "Change Units"
|
||||
}
|
||||
|
||||
@@ -48,11 +48,8 @@ export default {
|
||||
'change-language': '언어 변경',
|
||||
'hide-app-menu': '앱 메뉴 숨기기 (Windows 및 Linux)',
|
||||
'proxy': '프록시',
|
||||
'enable-proxy': '프록시 사용',
|
||||
'proxy-bypass-input-tips': '프록시 설정을 우회할 호스트 및 도메인 (한 줄에 하나)',
|
||||
'proxy-scope-download': '다운로드',
|
||||
'proxy-scope-update-app': '애플리케이션 업데이트',
|
||||
'proxy-scope-update-trackers': '추적기 업데이트',
|
||||
'use-proxy': '프록시 사용',
|
||||
'no-proxy-input-tips': '프록시 설정을 우회할 호스트 및 도메인 (한 줄에 하나)',
|
||||
'proxy-tips': '프록시 매뉴얼 보기',
|
||||
'bt-tracker': '트래커 서버',
|
||||
'bt-tracker-input-tips': '트래커 서버 (한 줄에 하나)',
|
||||
@@ -90,5 +87,6 @@ export default {
|
||||
'auto-check-update': '자동으로 업데이트 확인',
|
||||
'last-check-update-time': '마지막 업데이트 확인 시간',
|
||||
'not-saved': '설정이 저장되지 않았습니다',
|
||||
'not-saved-confirm': '수정된 설정이 손실됩니다. 나가시겠습니까?'
|
||||
'not-saved-confirm': '수정된 설정이 손실됩니다. 나가시겠습니까?',
|
||||
'speed-units': "Change Units"
|
||||
}
|
||||
|
||||
@@ -48,11 +48,8 @@ export default {
|
||||
'change-language': 'Skifte språk',
|
||||
'hide-app-menu': 'Skjul appmeny (kun Windows og Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'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',
|
||||
'use-proxy': 'Aktiver proxy',
|
||||
'no-proxy-input-tips': 'Omgå proxy-innstillinger for disse vertene og domenene, en per linje',
|
||||
'proxy-tips': 'Se Proxy Manual',
|
||||
'bt-tracker': 'Tracker-servere',
|
||||
'bt-tracker-input-tips': 'Tracker-servere, en per linje',
|
||||
@@ -90,5 +87,6 @@ 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?'
|
||||
'not-saved-confirm': 'De endrede preferansene vil gå tapt, er du sikker på at du vil forlate?',
|
||||
'speed-units': "Change Units"
|
||||
}
|
||||
|
||||
@@ -48,11 +48,8 @@ export default {
|
||||
'change-language': 'Taal veranderen',
|
||||
'hide-app-menu': 'App menu verbergen (alleen Windows & Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'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',
|
||||
'use-proxy': 'Proxy aanzetten',
|
||||
'no-proxy-input-tips': 'Proxy instellingen omzeilen voor deze hosts en domeinen (één per regel)',
|
||||
'proxy-tips': 'Proxy handleiding bekijken',
|
||||
'bt-tracker': 'Tracker Servers',
|
||||
'bt-tracker-input-tips': 'Tracker Servers, één per regel',
|
||||
|
||||
@@ -48,11 +48,8 @@ export default {
|
||||
'change-language': 'Zmień język',
|
||||
'hide-app-menu': 'Schowaj menu aplikacji (Tylko Windows i Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'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',
|
||||
'use-proxy': 'Włącz Proxy',
|
||||
'no-proxy-input-tips': 'Omiń ustawiania proxy dla tych hostów i domen, jeden na linię',
|
||||
'proxy-tips': 'Pokaż instrukcję proxy',
|
||||
'bt-tracker': 'Trackery',
|
||||
'bt-tracker-input-tips': 'Trackery, jeden na linię',
|
||||
@@ -88,5 +85,6 @@ 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ść?'
|
||||
'not-saved-confirm': 'Zmienione preferencje zostaną utracone, czy na pewno chcesz wyjść?',
|
||||
'speed-units': "Change Units"
|
||||
}
|
||||
|
||||
@@ -48,11 +48,8 @@ export default {
|
||||
'change-language': 'Mudar o Idioma',
|
||||
'hide-app-menu': 'Ocultar o Menu do App (Windows & Linux apenas)',
|
||||
'proxy': 'Proxy',
|
||||
'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',
|
||||
'use-proxy': 'Habilitar Proxy',
|
||||
'no-proxy-input-tips': 'Ignorar configurações de proxy para esses hosts e domínios, um por linha',
|
||||
'proxy-tips': 'Exibir manual do proxy',
|
||||
'bt-tracker': 'Rastreadores',
|
||||
'bt-tracker-input-tips': 'servidor rastreador, um por linha',
|
||||
@@ -88,5 +85,6 @@ 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?'
|
||||
'not-saved-confirm': 'As preferências modificadas serão perdidas. Tem certeza de que deseja sair?',
|
||||
'speed-units': "Change Units"
|
||||
}
|
||||
|
||||
@@ -48,11 +48,8 @@ export default {
|
||||
'change-language': 'Schimbă limba',
|
||||
'hide-app-menu': 'Ascundeți meniul aplicației (numai Windows și Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'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',
|
||||
'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',
|
||||
'proxy-tips': 'Vizualizați manualul proxy',
|
||||
'bt-tracker': 'Severe tracker (Torrent Tracker)',
|
||||
'bt-tracker-input-tips': 'Severe tracker, câte unul pe fiecare linie',
|
||||
@@ -88,5 +85,6 @@ 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?'
|
||||
'not-saved-confirm': 'Preferințele modificate se vor pierde, sunteți sigur că plecați?',
|
||||
'speed-units': "Change Units"
|
||||
}
|
||||
|
||||
@@ -48,11 +48,8 @@ export default {
|
||||
'change-language': 'Сменить язык',
|
||||
'hide-app-menu': 'Скрыть меню приложения (только для Windows и Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'enable-proxy': 'Использовать Proxy',
|
||||
'proxy-bypass-input-tips': 'Обойти настройки прокси для этих хостов и доменов, по одному в строке',
|
||||
'proxy-scope-download': 'Скачать',
|
||||
'proxy-scope-update-app': 'Обновить приложение',
|
||||
'proxy-scope-update-trackers': 'Обновить трекеры',
|
||||
'use-proxy': 'Использовать Proxy',
|
||||
'no-proxy-input-tips': 'Обойти настройки прокси для этих хостов и доменов, по одному в строке',
|
||||
'proxy-tips': 'Посмотреть руководство по прокси',
|
||||
'bt-tracker': 'Tracker Сервер',
|
||||
'bt-tracker-input-tips': 'Tracker сервера, один в строку',
|
||||
@@ -88,5 +85,6 @@ export default {
|
||||
'auto-check-update': 'Автоматически проверять обновления',
|
||||
'last-check-update-time': 'Последняя проверка на обновления прошла в',
|
||||
'not-saved': 'Настройки не сохранены',
|
||||
'not-saved-confirm': 'Измененные настройки будут потеряны, вы обязательно уйдете?'
|
||||
'not-saved-confirm': 'Измененные настройки будут потеряны, вы обязательно уйдете?',
|
||||
'speed-units': "Change Units"
|
||||
}
|
||||
|
||||
@@ -48,11 +48,8 @@ export default {
|
||||
'change-language': 'เปลี่ยนภาษา',
|
||||
'hide-app-menu': 'ซ่อนเมนูแอป (Windows & Linux เท่านั้น)',
|
||||
'proxy': 'พร็อกซี่',
|
||||
'enable-proxy': 'เปิดใช้งานพร็อกซี่',
|
||||
'proxy-bypass-input-tips': 'ข้ามการตั้งค่าพร็อกซีสำหรับโฮสต์และโดเมนเหล่านี้ หนึ่งรายการต่อบรรทัด',
|
||||
'proxy-scope-download': 'ดาวน์โหลด',
|
||||
'proxy-scope-update-app': 'อัปเดตแอปพลิเคชัน',
|
||||
'proxy-scope-update-trackers': 'อัปเดตแทร็กเกอร์',
|
||||
'use-proxy': 'เปิดใช้งานพร็อกซี่',
|
||||
'no-proxy-input-tips': 'ข้ามการตั้งค่าพร็อกซีสำหรับโฮสต์และโดเมนเหล่านี้ หนึ่งรายการต่อบรรทัด',
|
||||
'proxy-tips': 'ดูคู่มือพร็อกซี',
|
||||
'bt-tracker': 'เซิร์ฟเวอร์ติดตาม',
|
||||
'bt-tracker-input-tips': 'เซิร์ฟเวอร์ตัวติดตาม หนึ่งตัวต่อบรรทัด',
|
||||
|
||||
@@ -48,11 +48,8 @@ export default {
|
||||
'change-language': 'Dil değiştir',
|
||||
'hide-app-menu': 'Uygulama menüsünü göster (Windows & Linux için)',
|
||||
'proxy': 'Proxy',
|
||||
'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',
|
||||
'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',
|
||||
'proxy-tips': 'Proxy Kılavuzunu Görüntüle',
|
||||
'bt-tracker': 'İzleyici Sunucular',
|
||||
'bt-tracker-input-tips': 'İzleyici sunucusu, her satıra bir tane',
|
||||
@@ -88,5 +85,6 @@ 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?'
|
||||
'not-saved-confirm': 'Değiştirilen tercihler kaybolacak, ayrılacağınızdan emin misiniz?',
|
||||
'speed-units': "Change Units"
|
||||
}
|
||||
|
||||
@@ -48,11 +48,8 @@ export default {
|
||||
'change-language': 'Змінити мову',
|
||||
'hide-app-menu': 'Сховати меню додатка (Тільки для Windows та Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'enable-proxy': 'Застосувати Proxy',
|
||||
'proxy-bypass-input-tips': 'Обхід налаштувань проксі для цих хостів та доменів, по одному на рядок',
|
||||
'proxy-scope-download': 'Завантажити',
|
||||
'proxy-scope-update-app': 'Оновити додаток',
|
||||
'proxy-scope-update-trackers': 'Оновити трекери',
|
||||
'use-proxy': 'Застосувати Proxy',
|
||||
'no-proxy-input-tips': 'Обхід налаштувань проксі для цих хостів та доменів, по одному на рядок',
|
||||
'proxy-tips': 'Перегляньте посібник з проксі',
|
||||
'bt-tracker': 'Tracker Сервер',
|
||||
'bt-tracker-input-tips': 'Tracker сервера, один в рядок',
|
||||
@@ -88,5 +85,6 @@ export default {
|
||||
'auto-check-update': 'Автоматично перевіряти оновлення',
|
||||
'last-check-update-time': 'В останнє оновлення перевірялось',
|
||||
'not-saved': 'Налаштування не збережено',
|
||||
'not-saved-confirm': 'Змінені параметри буде втрачено. Ви впевнені, що залишите?'
|
||||
'not-saved-confirm': 'Змінені параметри буде втрачено. Ви впевнені, що залишите?',
|
||||
'speed-units': "Change Units"
|
||||
}
|
||||
|
||||
@@ -48,11 +48,8 @@ export default {
|
||||
'change-language': 'Thay đổi Ngôn ngữ',
|
||||
'hide-app-menu': 'Ẩn thanh Menu (Chỉ Windows & Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'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',
|
||||
'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',
|
||||
'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',
|
||||
@@ -89,5 +86,6 @@ 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?'
|
||||
'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"
|
||||
}
|
||||
|
||||
@@ -48,11 +48,8 @@ export default {
|
||||
'change-language': '切换语言',
|
||||
'hide-app-menu': '隐藏菜单栏(仅支持 Windows 和 Linux)',
|
||||
'proxy': '代理',
|
||||
'enable-proxy': '使用代理服务器',
|
||||
'proxy-bypass-input-tips': '忽略这些主机与域的代理设置,一行一个',
|
||||
'proxy-scope-download': '下载',
|
||||
'proxy-scope-update-app': '更新应用程序',
|
||||
'proxy-scope-update-trackers': '更新 Tracker 列表',
|
||||
'use-proxy': '使用代理服务器',
|
||||
'no-proxy-input-tips': '忽略这些主机与域的代理设置,一行一个',
|
||||
'proxy-tips': '查看代理配置说明',
|
||||
'bt-tracker': 'Tracker 服务器',
|
||||
'bt-tracker-input-tips': 'Tracker 服务器,一行一个',
|
||||
@@ -92,5 +89,6 @@ export default {
|
||||
'follow-metalink': '自动开始下载磁力链接、种子内的文件',
|
||||
'follow-torrent': '种子下载完后自动下载种子内容',
|
||||
'not-saved': '设置未保存',
|
||||
'not-saved-confirm': '已修改的设置将会丢失,确定要离开吗?'
|
||||
'not-saved-confirm': '已修改的设置将会丢失,确定要离开吗?',
|
||||
'speed-units': "Change Units"
|
||||
}
|
||||
|
||||
@@ -48,11 +48,8 @@ export default {
|
||||
'change-language': '更改語言',
|
||||
'hide-app-menu': '隱藏選單列(僅支援 Windows 和 Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'enable-proxy': '使用 Proxy',
|
||||
'proxy-bypass-input-tips': '忽略這些主機與網域的 Proxy 設定,一列一個',
|
||||
'proxy-scope-download': '下載',
|
||||
'proxy-scope-update-app': '更新應用程式',
|
||||
'proxy-scope-update-trackers': '更新 Tracker 列表',
|
||||
'use-proxy': '使用 Proxy',
|
||||
'no-proxy-input-tips': '忽略這些主機與網域的 Proxy 設定,一列一個',
|
||||
'proxy-tips': '查看 Proxy 配置手冊',
|
||||
'bt-tracker': 'Tracker 伺服器',
|
||||
'bt-tracker-input-tips': 'Tracker 伺服器,一列一個',
|
||||
@@ -90,5 +87,6 @@ export default {
|
||||
'auto-check-update': '自動檢查更新',
|
||||
'last-check-update-time': '上次檢查更新時間',
|
||||
'not-saved': '設定未儲存',
|
||||
'not-saved-confirm': '已修改的設定將會丟失,確定要離開嗎?'
|
||||
'not-saved-confirm': '已修改的設定將會丟失,確定要離開嗎?',
|
||||
'speed-units': "Change Units"
|
||||
}
|
||||
|
||||
@@ -28,11 +28,10 @@ import {
|
||||
SUB_SUFFIXES,
|
||||
UNKNOWN_PEERID,
|
||||
SUPPORT_RTL_LOCALES,
|
||||
UNKNOWN_PEERID_NAME,
|
||||
DOCUMENT_SUFFIXES
|
||||
UNKNOWN_PEERID_NAME
|
||||
} from '@shared/constants'
|
||||
|
||||
export const bytesToSize = (bytes, precision = 1) => {
|
||||
export function bytesToSize (bytes, precision = 1) {
|
||||
const b = parseInt(bytes, 10)
|
||||
const sizes = ['B', 'KB', 'MB', 'GB', 'TB']
|
||||
if (b === 0) { return '0 KB' }
|
||||
@@ -56,7 +55,7 @@ export const extractSpeedUnit = (speed = '') => {
|
||||
return match[2]
|
||||
}
|
||||
|
||||
export const bitfieldToPercent = (text) => {
|
||||
export function bitfieldToPercent (text) {
|
||||
const len = text.length - 1
|
||||
let p
|
||||
let one = 0
|
||||
@@ -70,7 +69,7 @@ export const bitfieldToPercent = (text) => {
|
||||
return Math.floor(one / (4 * len) * 100).toString()
|
||||
}
|
||||
|
||||
export const bitfieldToGraphic = (text) => {
|
||||
export function bitfieldToGraphic (text) {
|
||||
const len = text.length
|
||||
let result = ''
|
||||
for (let i = 0; i < len; i++) {
|
||||
@@ -79,7 +78,7 @@ export const bitfieldToGraphic = (text) => {
|
||||
return result
|
||||
}
|
||||
|
||||
export const peerIdParser = (str) => {
|
||||
export function peerIdParser (str) {
|
||||
if (!str || str === UNKNOWN_PEERID) {
|
||||
return UNKNOWN_PEERID_NAME
|
||||
}
|
||||
@@ -102,7 +101,7 @@ export const peerIdParser = (str) => {
|
||||
return result
|
||||
}
|
||||
|
||||
export const calcProgress = (totalLength, completedLength, decimal = 2) => {
|
||||
export function calcProgress (totalLength, completedLength, decimal = 2) {
|
||||
const total = parseInt(totalLength, 10)
|
||||
const completed = parseInt(completedLength, 10)
|
||||
if (total === 0 || completed === 0) {
|
||||
@@ -113,7 +112,7 @@ export const calcProgress = (totalLength, completedLength, decimal = 2) => {
|
||||
return result
|
||||
}
|
||||
|
||||
export const calcRatio = (totalLength, uploadLength) => {
|
||||
export function calcRatio (totalLength, uploadLength) {
|
||||
const total = parseInt(totalLength, 10)
|
||||
const upload = parseInt(uploadLength, 10)
|
||||
if (total === 0 || upload === 0) {
|
||||
@@ -125,7 +124,7 @@ export const calcRatio = (totalLength, uploadLength) => {
|
||||
return result
|
||||
}
|
||||
|
||||
export const timeRemaining = (totalLength, completedLength, downloadSpeed) => {
|
||||
export function timeRemaining (totalLength, completedLength, downloadSpeed) {
|
||||
const remainingLength = totalLength - completedLength
|
||||
return Math.ceil(remainingLength / downloadSpeed)
|
||||
}
|
||||
@@ -143,7 +142,7 @@ export const timeRemaining = (totalLength, completedLength, downloadSpeed) => {
|
||||
* second: 's'
|
||||
* }
|
||||
*/
|
||||
export const timeFormat = (seconds, { prefix = '', suffix = '', i18n }) => {
|
||||
export function timeFormat (seconds, { prefix = '', suffix = '', i18n }) {
|
||||
let result = ''
|
||||
let hours = ''
|
||||
let minutes = ''
|
||||
@@ -175,7 +174,7 @@ export const timeFormat = (seconds, { prefix = '', suffix = '', i18n }) => {
|
||||
return result ? `${prefix} ${result} ${suffix}` : result
|
||||
}
|
||||
|
||||
export const localeDateTimeFormat = (timestamp, locale) => {
|
||||
export function localeDateTimeFormat (timestamp, locale) {
|
||||
if (!timestamp) {
|
||||
return ''
|
||||
}
|
||||
@@ -194,7 +193,7 @@ export const localeDateTimeFormat = (timestamp, locale) => {
|
||||
})
|
||||
}
|
||||
|
||||
export const ellipsis = (str = '', maxLen = 64) => {
|
||||
export function ellipsis (str = '', maxLen = 64) {
|
||||
const len = str.length
|
||||
let result = str
|
||||
if (len < maxLen) {
|
||||
@@ -208,7 +207,7 @@ export const ellipsis = (str = '', maxLen = 64) => {
|
||||
return result
|
||||
}
|
||||
|
||||
export const getFileSelection = (files = []) => {
|
||||
export function getFileSelection (files = []) {
|
||||
console.log('getFileSelection===>', files)
|
||||
const selectedFiles = files.filter((file) => file.selected)
|
||||
if (files.length === 0 || selectedFiles.length === 0) {
|
||||
@@ -227,7 +226,7 @@ export const getFileSelection = (files = []) => {
|
||||
return result
|
||||
}
|
||||
|
||||
export const getTaskName = (task, options = {}) => {
|
||||
export function getTaskName (task, options = {}) {
|
||||
const o = {
|
||||
defaultName: '',
|
||||
maxLen: 64, // -1: No limit length
|
||||
@@ -252,7 +251,7 @@ export const getTaskName = (task, options = {}) => {
|
||||
return result
|
||||
}
|
||||
|
||||
export const getFileNameFromFile = (file) => {
|
||||
export function getFileNameFromFile (file) {
|
||||
if (!file) {
|
||||
return ''
|
||||
}
|
||||
@@ -271,17 +270,17 @@ export const getFileNameFromFile = (file) => {
|
||||
return path.substring(index + 1)
|
||||
}
|
||||
|
||||
export const isMagnetTask = (task) => {
|
||||
export function isMagnetTask (task) {
|
||||
const { bittorrent } = task
|
||||
return bittorrent && !bittorrent.info
|
||||
}
|
||||
|
||||
export const checkTaskIsSeeder = (task) => {
|
||||
export function checkTaskIsSeeder (task) {
|
||||
const { bittorrent, seeder } = task
|
||||
return !!bittorrent && seeder === 'true'
|
||||
}
|
||||
|
||||
export const getTaskUri = (task, withTracker = false) => {
|
||||
export function getTaskUri (task, withTracker = false) {
|
||||
const { files } = task
|
||||
let result = ''
|
||||
if (checkTaskIsBT(task)) {
|
||||
@@ -297,7 +296,7 @@ export const getTaskUri = (task, withTracker = false) => {
|
||||
return result
|
||||
}
|
||||
|
||||
export const buildMagnetLink = (task, withTracker = false, btTracker = []) => {
|
||||
export function buildMagnetLink (task, withTracker = false, btTracker = []) {
|
||||
const { bittorrent, infoHash } = task
|
||||
const { info } = bittorrent
|
||||
|
||||
@@ -320,7 +319,7 @@ export const buildMagnetLink = (task, withTracker = false, btTracker = []) => {
|
||||
return result
|
||||
}
|
||||
|
||||
export const checkTaskTitleIsEmpty = (task) => {
|
||||
export function checkTaskTitleIsEmpty (task) {
|
||||
const { files, bittorrent } = task
|
||||
const [file] = files
|
||||
const { path } = file
|
||||
@@ -331,17 +330,17 @@ export const checkTaskTitleIsEmpty = (task) => {
|
||||
return result === ''
|
||||
}
|
||||
|
||||
export const checkTaskIsBT = (task = {}) => {
|
||||
export function checkTaskIsBT (task = {}) {
|
||||
const { bittorrent } = task
|
||||
return !!bittorrent
|
||||
}
|
||||
|
||||
export const isTorrent = (file) => {
|
||||
export function isTorrent (file) {
|
||||
const { name, type } = file
|
||||
return name.endsWith('.torrent') || type === 'application/x-bittorrent'
|
||||
}
|
||||
|
||||
export const getAsBase64 = (file, callback) => {
|
||||
export function getAsBase64 (file, callback) {
|
||||
const reader = new FileReader()
|
||||
reader.addEventListener('load', () => {
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/FileReader/readAsDataURL
|
||||
@@ -351,7 +350,7 @@ export const getAsBase64 = (file, callback) => {
|
||||
reader.readAsDataURL(file)
|
||||
}
|
||||
|
||||
export const mergeTaskResult = (response = []) => {
|
||||
export function mergeTaskResult (response = []) {
|
||||
let result = []
|
||||
for (const res of response) {
|
||||
result = result.concat(...res)
|
||||
@@ -359,7 +358,7 @@ export const mergeTaskResult = (response = []) => {
|
||||
return result
|
||||
}
|
||||
|
||||
export const changeKeysCase = (obj, caseConverter) => {
|
||||
export function changeKeysCase (obj, caseConverter) {
|
||||
const result = {}
|
||||
if (isEmpty(obj) || !isFunction(caseConverter)) {
|
||||
return result
|
||||
@@ -373,19 +372,19 @@ export const changeKeysCase = (obj, caseConverter) => {
|
||||
return result
|
||||
}
|
||||
|
||||
export const changeKeysToCamelCase = (obj = {}) => {
|
||||
export function changeKeysToCamelCase (obj = {}) {
|
||||
return changeKeysCase(obj, camelCase)
|
||||
}
|
||||
|
||||
export const changeKeysToKebabCase = (obj = {}) => {
|
||||
export function changeKeysToKebabCase (obj = {}) {
|
||||
return changeKeysCase(obj, kebabCase)
|
||||
}
|
||||
|
||||
export const validateNumber = (n) => {
|
||||
export function validateNumber (n) {
|
||||
return !isNaN(parseFloat(n)) && isFinite(n) && Number(n) === n
|
||||
}
|
||||
|
||||
export const fixValue = (obj = {}) => {
|
||||
export function fixValue (obj = {}) {
|
||||
const result = {}
|
||||
for (const [k, v] of Object.entries(obj)) {
|
||||
if (v === 'true') {
|
||||
@@ -401,7 +400,7 @@ export const fixValue = (obj = {}) => {
|
||||
return result
|
||||
}
|
||||
|
||||
export const separateConfig = (options) => {
|
||||
export function separateConfig (options) {
|
||||
// user
|
||||
const user = {}
|
||||
// system
|
||||
@@ -423,14 +422,13 @@ export const separateConfig = (options) => {
|
||||
}
|
||||
}
|
||||
|
||||
export const compactUndefined = (arr = []) => {
|
||||
export function compactUndefined (arr = []) {
|
||||
return arr.filter((item) => {
|
||||
return item !== undefined
|
||||
})
|
||||
}
|
||||
|
||||
export const splitTextRows = (text = '') => {
|
||||
text = `${text}`
|
||||
export function splitTextRows (text = '') {
|
||||
let result = text
|
||||
.replace(/(?:\\\r\\\n|\\\r|\\\n)/g, ' ')
|
||||
.replace(/(?:\r\n|\r|\n)/g, '\n')
|
||||
@@ -439,45 +437,38 @@ export const splitTextRows = (text = '') => {
|
||||
return result
|
||||
}
|
||||
|
||||
export const convertCommaToLine = (text = '') => {
|
||||
text = `${text}`
|
||||
export function convertCommaToLine (text = '') {
|
||||
let arr = text.split(',')
|
||||
arr = arr.map((row) => row.trim())
|
||||
const result = arr.join('\n').trim()
|
||||
return result
|
||||
}
|
||||
|
||||
export const convertLineToComma = (text = '') => {
|
||||
export function convertLineToComma (text = '') {
|
||||
const result = text.trim().replace(/(?:\r\n|\r|\n)/g, ',')
|
||||
return result
|
||||
}
|
||||
|
||||
export const filterVideoFiles = (files = []) => {
|
||||
export function filterVideoFiles (files = []) {
|
||||
const suffix = [...VIDEO_SUFFIXES, ...SUB_SUFFIXES]
|
||||
return files.filter((item) => {
|
||||
return suffix.includes(item.extension)
|
||||
})
|
||||
}
|
||||
|
||||
export const filterAudioFiles = (files = []) => {
|
||||
export function filterAudioFiles (files = []) {
|
||||
return files.filter((item) => {
|
||||
return AUDIO_SUFFIXES.includes(item.extension)
|
||||
})
|
||||
}
|
||||
|
||||
export const filterImageFiles = (files = []) => {
|
||||
export function filterImageFiles (files = []) {
|
||||
return files.filter((item) => {
|
||||
return IMAGE_SUFFIXES.includes(item.extension)
|
||||
})
|
||||
}
|
||||
|
||||
export const filterDocumentFiles = (files = []) => {
|
||||
return files.filter((item) => {
|
||||
return DOCUMENT_SUFFIXES.includes(item.extension)
|
||||
})
|
||||
}
|
||||
|
||||
export const isAudioOrVideo = (uri = '') => {
|
||||
export function isAudioOrVideo (uri = '') {
|
||||
const suffixs = [...AUDIO_SUFFIXES, ...VIDEO_SUFFIXES]
|
||||
const result = suffixs.some((suffix) => {
|
||||
return uri.includes(suffix)
|
||||
@@ -485,7 +476,7 @@ export const isAudioOrVideo = (uri = '') => {
|
||||
return result
|
||||
}
|
||||
|
||||
export const needCheckCopyright = (links = '') => {
|
||||
export function needCheckCopyright (links = '') {
|
||||
const uris = splitTaskLinks(links)
|
||||
const avs = uris.filter(uri => {
|
||||
return isAudioOrVideo(uri)
|
||||
@@ -495,7 +486,7 @@ export const needCheckCopyright = (links = '') => {
|
||||
return result
|
||||
}
|
||||
|
||||
export const decodeThunderLink = (url = '') => {
|
||||
export function decodeThunderLink (url = '') {
|
||||
if (!url.startsWith('thunder://')) {
|
||||
return url
|
||||
}
|
||||
@@ -507,7 +498,7 @@ export const decodeThunderLink = (url = '') => {
|
||||
return result
|
||||
}
|
||||
|
||||
export const splitTaskLinks = (links = '') => {
|
||||
export function splitTaskLinks (links = '') {
|
||||
const temp = compact(splitTextRows(links))
|
||||
const result = temp.map((item) => {
|
||||
return decodeThunderLink(item)
|
||||
@@ -515,13 +506,13 @@ export const splitTaskLinks = (links = '') => {
|
||||
return result
|
||||
}
|
||||
|
||||
export const detectResource = (content) => {
|
||||
export function detectResource (content) {
|
||||
return RESOURCE_TAGS.some((type) => {
|
||||
return content.includes(type)
|
||||
})
|
||||
}
|
||||
|
||||
export const buildFileList = (rawFile) => {
|
||||
export function buildFileList (rawFile) {
|
||||
rawFile.uid = Date.now()
|
||||
const file = {
|
||||
status: 'ready',
|
||||
@@ -535,15 +526,15 @@ export const buildFileList = (rawFile) => {
|
||||
return fileList
|
||||
}
|
||||
|
||||
export const isRTL = (locale = 'en-US') => {
|
||||
export function isRTL (locale = 'en-US') {
|
||||
return SUPPORT_RTL_LOCALES.includes(locale)
|
||||
}
|
||||
|
||||
export const getLangDirection = (locale = 'en-US') => {
|
||||
export function getLangDirection (locale = 'en-US') {
|
||||
return isRTL(locale) ? 'rtl' : 'ltr'
|
||||
}
|
||||
|
||||
export const listTorrentFiles = (files) => {
|
||||
export function listTorrentFiles (files) {
|
||||
const result = files.map((file, index) => {
|
||||
const extension = getFileExtension(file.path)
|
||||
const item = {
|
||||
@@ -558,20 +549,20 @@ export const listTorrentFiles = (files) => {
|
||||
return result
|
||||
}
|
||||
|
||||
export const getFileName = (fullPath) => {
|
||||
export function getFileName (fullPath) {
|
||||
// eslint-disable-next-line
|
||||
return fullPath.replace(/^.*[\\\/]/, '')
|
||||
}
|
||||
|
||||
export const getFileExtension = (filename) => {
|
||||
export function getFileExtension (filename) {
|
||||
return filename.slice((filename.lastIndexOf('.') - 1 >>> 0) + 2)
|
||||
}
|
||||
|
||||
export const removeExtensionDot = (extension = '') => {
|
||||
export function removeExtensionDot (extension = '') {
|
||||
return extension.replace('.', '')
|
||||
}
|
||||
|
||||
export const diffConfig = (current = {}, next = {}) => {
|
||||
export function diffConfig (current = {}, next = {}) {
|
||||
const curr = pick(current, Object.keys(next))
|
||||
const result = omitBy(next, (val, key) => {
|
||||
if (isArray(val) || isPlainObject(val)) {
|
||||
@@ -579,15 +570,14 @@ export const diffConfig = (current = {}, next = {}) => {
|
||||
}
|
||||
return curr[key] === val
|
||||
})
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
export const calcFormLabelWidth = (locale) => {
|
||||
export function calcFormLabelWidth (locale) {
|
||||
return locale.startsWith('de') ? '28%' : '25%'
|
||||
}
|
||||
|
||||
export const parseHeader = (header = '') => {
|
||||
export function parseHeader (header = '') {
|
||||
header = header.trim()
|
||||
let result = {}
|
||||
if (!header) {
|
||||
@@ -606,7 +596,7 @@ export const parseHeader = (header = '') => {
|
||||
return result
|
||||
}
|
||||
|
||||
export const formatOptionsForEngine = (options = {}) => {
|
||||
export function formatOptionsForEngine (options = {}) {
|
||||
const result = {}
|
||||
|
||||
Object.keys(options).forEach((key) => {
|
||||
@@ -621,7 +611,7 @@ export const formatOptionsForEngine = (options = {}) => {
|
||||
return result
|
||||
}
|
||||
|
||||
export const buildRpcUrl = (options = {}) => {
|
||||
export function buildRpcUrl (options = {}) {
|
||||
const { port, secret } = options
|
||||
let result = `${ENGINE_RPC_HOST}:${port}/jsonrpc`
|
||||
if (secret) {
|
||||
@@ -632,7 +622,7 @@ export const buildRpcUrl = (options = {}) => {
|
||||
return result
|
||||
}
|
||||
|
||||
export const checkIsNeedRestart = (changed = {}) => {
|
||||
export function checkIsNeedRestart (changed = {}) {
|
||||
let result = false
|
||||
|
||||
if (isEmpty(changed)) {
|
||||
|
||||
@@ -1,55 +1,15 @@
|
||||
import { isEmpty } from 'lodash'
|
||||
import axios from 'axios'
|
||||
import { MAX_BT_TRACKER_LENGTH, ONE_SECOND, PROXY_SCOPES } from '@shared/constants'
|
||||
import { MAX_BT_TRACKER_LENGTH } from '@shared/constants'
|
||||
|
||||
export const convertToAxiosProxy = (proxyServer = '') => {
|
||||
if (!proxyServer) {
|
||||
return
|
||||
}
|
||||
|
||||
const url = new URL(proxyServer)
|
||||
const { username, password, protocol = 'http:', hostname, port } = url
|
||||
|
||||
let result = {
|
||||
protocol: protocol.replace(':', ''),
|
||||
host: hostname,
|
||||
port
|
||||
}
|
||||
|
||||
const auth = username || password
|
||||
? {
|
||||
username,
|
||||
password
|
||||
}
|
||||
: undefined
|
||||
|
||||
if (auth) {
|
||||
result = {
|
||||
...result,
|
||||
auth
|
||||
}
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
export const fetchBtTrackerFromSource = async (source, proxyConfig = {}) => {
|
||||
export const fetchBtTrackerFromSource = async (source) => {
|
||||
if (isEmpty(source)) {
|
||||
return []
|
||||
}
|
||||
|
||||
const now = Date.now()
|
||||
const { enable, server, scope = [] } = proxyConfig
|
||||
const proxy = enable && server && scope.includes(PROXY_SCOPES.UPDATE_TRACKERS)
|
||||
? convertToAxiosProxy(server)
|
||||
: undefined
|
||||
|
||||
// Axios's config.proxy is Node.js only
|
||||
const promises = source.map(async (url) => {
|
||||
return axios.get(`${url}?t=${now}`, {
|
||||
timeout: 30 * ONE_SECOND,
|
||||
proxy
|
||||
}).then((value) => value.data)
|
||||
const promises = source.map((url) => {
|
||||
return axios.get(`${url}?t=${now}`).then((value) => value.data)
|
||||
})
|
||||
|
||||
const results = await Promise.allSettled(promises)
|
||||
|
||||
|
Before Width: | Height: | Size: 103 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 257 KiB After Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 105 KiB After Width: | Height: | Size: 9.6 KiB |
|
Before Width: | Height: | Size: 253 KiB After Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 103 KiB After Width: | Height: | Size: 9.9 KiB |
@@ -1440,13 +1440,6 @@
|
||||
dependencies:
|
||||
"@types/node" "*"
|
||||
|
||||
"@types/debug@^4.1.6":
|
||||
version "4.1.7"
|
||||
resolved "https://registry.yarnpkg.com/@types/debug/-/debug-4.1.7.tgz#7cc0ea761509124709b8b2d1090d8f6c17aadb82"
|
||||
integrity sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg==
|
||||
dependencies:
|
||||
"@types/ms" "*"
|
||||
|
||||
"@types/eslint-scope@^3.7.3":
|
||||
version "3.7.4"
|
||||
resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.4.tgz#37fc1223f0786c39627068a12e94d6e6fc61de16"
|
||||
@@ -1487,13 +1480,6 @@
|
||||
"@types/qs" "*"
|
||||
"@types/serve-static" "*"
|
||||
|
||||
"@types/fs-extra@9.0.13", "@types/fs-extra@^9.0.11":
|
||||
version "9.0.13"
|
||||
resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-9.0.13.tgz#7594fbae04fe7f1918ce8b3d213f74ff44ac1f45"
|
||||
integrity sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==
|
||||
dependencies:
|
||||
"@types/node" "*"
|
||||
|
||||
"@types/html-minifier-terser@^6.0.0":
|
||||
version "6.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz#4fc33a00c1d0c16987b1a20cf92d20614c55ac35"
|
||||
@@ -1552,11 +1538,6 @@
|
||||
resolved "https://registry.yarnpkg.com/@types/mime/-/mime-3.0.1.tgz#5f8f2bca0a5863cb69bc0b0acd88c96cb1d4ae10"
|
||||
integrity sha512-Y4XFY5VJAuw0FgAqPNd6NNoV44jbq9Bz2L7Rh/J6jLTiHBSBJa9fxqQIvkIld4GsoDOcCbvzOUAbLPsSKKg+uA==
|
||||
|
||||
"@types/ms@*":
|
||||
version "0.7.31"
|
||||
resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.31.tgz#31b7ca6407128a3d2bbc27fe2d21b345397f6197"
|
||||
integrity sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==
|
||||
|
||||
"@types/node@*":
|
||||
version "18.15.11"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.15.11.tgz#b3b790f09cb1696cffcec605de025b088fa4225f"
|
||||
@@ -1805,20 +1786,20 @@
|
||||
"@webassemblyjs/ast" "1.11.5"
|
||||
"@xtuc/long" "4.2.2"
|
||||
|
||||
"@webpack-cli/configtest@^2.1.0":
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@webpack-cli/configtest/-/configtest-2.1.0.tgz#b59b33377b1b896a9a7357cfc643b39c1524b1e6"
|
||||
integrity sha512-K/vuv72vpfSEZoo5KIU0a2FsEoYdW0DUMtMpB5X3LlUwshetMZRZRxB7sCsVji/lFaSxtQQ3aM9O4eMolXkU9w==
|
||||
"@webpack-cli/configtest@^2.0.1":
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@webpack-cli/configtest/-/configtest-2.0.1.tgz#a69720f6c9bad6aef54a8fa6ba9c3533e7ef4c7f"
|
||||
integrity sha512-njsdJXJSiS2iNbQVS0eT8A/KPnmyH4pv1APj2K0d1wrZcBLw+yppxOy4CGqa0OxDJkzfL/XELDhD8rocnIwB5A==
|
||||
|
||||
"@webpack-cli/info@^2.0.1":
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@webpack-cli/info/-/info-2.0.1.tgz#eed745799c910d20081e06e5177c2b2569f166c0"
|
||||
integrity sha512-fE1UEWTwsAxRhrJNikE7v4EotYflkEhBL7EbajfkPlf6E37/2QshOy/D48Mw8G5XMFlQtS6YV42vtbG9zBpIQA==
|
||||
|
||||
"@webpack-cli/serve@^2.0.4":
|
||||
version "2.0.4"
|
||||
resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-2.0.4.tgz#3982ee6f8b42845437fc4d391e93ac5d9da52f0f"
|
||||
integrity sha512-0xRgjgDLdz6G7+vvDLlaRpFatJaJ69uTalZLRSMX5B3VUrDmXcrVA3+6fXXQgmYz7bY9AAgs348XQdmtLsK41A==
|
||||
"@webpack-cli/serve@^2.0.2":
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-2.0.2.tgz#10aa290e44a182c02e173a89452781b1acbc86d9"
|
||||
integrity sha512-S9h3GmOmzUseyeFW3tYNnWS7gNUuwxZ3mmMq0JyW78Vx1SGKPSkt5bT4pB0rUnVfHjP0EL9gW2bOzmtiTfQt0A==
|
||||
|
||||
"@xtuc/ieee754@^1.2.0":
|
||||
version "1.2.0"
|
||||
@@ -1980,10 +1961,10 @@ app-builder-bin@4.0.0:
|
||||
resolved "https://registry.yarnpkg.com/app-builder-bin/-/app-builder-bin-4.0.0.tgz#1df8e654bd1395e4a319d82545c98667d7eed2f0"
|
||||
integrity sha512-xwdG0FJPQMe0M0UA4Tz0zEB8rBJTRA5a476ZawAqiBkMv16GRK5xpXThOjMaEOFnZ6zabejjG4J3da0SXG63KA==
|
||||
|
||||
app-builder-lib@24.4.0:
|
||||
version "24.4.0"
|
||||
resolved "https://registry.yarnpkg.com/app-builder-lib/-/app-builder-lib-24.4.0.tgz#1606f94e99366eea9e7507228961b8396e40d546"
|
||||
integrity sha512-EcdqtWvg1LAApKCfyRBukcVkmsa94s2e1VKHjZLpvA9/D14QEt8rHhffYeaA+cH/pVeoNVn2ob735KnfJKEEow==
|
||||
app-builder-lib@24.3.0:
|
||||
version "24.3.0"
|
||||
resolved "https://registry.yarnpkg.com/app-builder-lib/-/app-builder-lib-24.3.0.tgz#3dc0244797abb9d37d9b0468481ee20b9ad83a6f"
|
||||
integrity sha512-FcZJAXoES+rZSST76v5Hn7SjAiKyIr25EPl5ECWK2cFYOkBLhav3MpTH9zc2g8VcXA/KbCH6a1Maz0WpfMdXfg==
|
||||
dependencies:
|
||||
"7zip-bin" "~5.1.1"
|
||||
"@develar/schema-utils" "~2.6.5"
|
||||
@@ -1992,15 +1973,14 @@ app-builder-lib@24.4.0:
|
||||
"@electron/rebuild" "^3.2.13"
|
||||
"@electron/universal" "1.3.4"
|
||||
"@malept/flatpak-bundler" "^0.4.0"
|
||||
"@types/fs-extra" "9.0.13"
|
||||
async-exit-hook "^2.0.1"
|
||||
bluebird-lst "^1.0.9"
|
||||
builder-util "24.4.0"
|
||||
builder-util "24.3.0"
|
||||
builder-util-runtime "9.2.1"
|
||||
chromium-pickle-js "^0.2.0"
|
||||
debug "^4.3.4"
|
||||
ejs "^3.1.8"
|
||||
electron-publish "24.4.0"
|
||||
electron-publish "24.3.0"
|
||||
form-data "^4.0.0"
|
||||
fs-extra "^10.1.0"
|
||||
hosted-git-info "^4.1.0"
|
||||
@@ -2391,13 +2371,12 @@ builder-util-runtime@9.2.1:
|
||||
debug "^4.3.4"
|
||||
sax "^1.2.4"
|
||||
|
||||
builder-util@24.4.0:
|
||||
version "24.4.0"
|
||||
resolved "https://registry.yarnpkg.com/builder-util/-/builder-util-24.4.0.tgz#dbb201a118fd573180e6a1070cf4c0be6de80cd7"
|
||||
integrity sha512-tONb/GIK1MKa1BcOPHE1naId3o5nj6gdka5kP7yUJh2DOfF+jMq3laiu+UOZH6A7ZtkMtnGNMYFKFTIv408n/A==
|
||||
builder-util@24.3.0:
|
||||
version "24.3.0"
|
||||
resolved "https://registry.yarnpkg.com/builder-util/-/builder-util-24.3.0.tgz#d1ff177a3021037ff9c53074e569a96e53138d9b"
|
||||
integrity sha512-/X3CYemDwtLO8akeOvEN9oHfpHIjCnNNHC0jktXF7NobKCu1paMRpMd8fQnYRVLxfdPPD7Rg/GUi12QPKbekdA==
|
||||
dependencies:
|
||||
"7zip-bin" "~5.1.1"
|
||||
"@types/debug" "^4.1.6"
|
||||
app-builder-bin "4.0.0"
|
||||
bluebird-lst "^1.0.9"
|
||||
builder-util-runtime "9.2.1"
|
||||
@@ -2501,10 +2480,10 @@ caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001449:
|
||||
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001478.tgz#0ef8a1cf8b16be47a0f9fc4ecfc952232724b32a"
|
||||
integrity sha512-gMhDyXGItTHipJj2ApIvR+iVB5hd0KP3svMWWXDvZOmjzJJassGLMfxRkQCSYgGd2gtdL/ReeiyvMSFD1Ss6Mw==
|
||||
|
||||
cfonts@^3.2.0:
|
||||
version "3.2.0"
|
||||
resolved "https://registry.yarnpkg.com/cfonts/-/cfonts-3.2.0.tgz#3c72b79679e48d19c620614d1134326a1f22cdec"
|
||||
integrity sha512-CFGxRY6aBuOgK85bceCpmMMhuyO6IwcAyyeapB//DtRzm7NbAEsDuuZzBoQxVonz+C2BmZ3swqB/YgcmW+rh3A==
|
||||
cfonts@^3.1.1:
|
||||
version "3.1.1"
|
||||
resolved "https://registry.yarnpkg.com/cfonts/-/cfonts-3.1.1.tgz#81bf9cfce2fcee581046d8912a55bab4366f9cfc"
|
||||
integrity sha512-PFknL/y+QVzoVmnm4X/PLd+t5Bt4aSvFBebpvyjcVUb81jHIVHFKvAopADbTk9tnfLLC2RHFZgdVa9YAwQp1mw==
|
||||
dependencies:
|
||||
supports-color "^8"
|
||||
window-size "^1.1.1"
|
||||
@@ -3156,13 +3135,13 @@ dir-glob@^3.0.1:
|
||||
dependencies:
|
||||
path-type "^4.0.0"
|
||||
|
||||
dmg-builder@24.4.0:
|
||||
version "24.4.0"
|
||||
resolved "https://registry.yarnpkg.com/dmg-builder/-/dmg-builder-24.4.0.tgz#46c80f119465f6a7275766c72b4f3d514cc8013d"
|
||||
integrity sha512-p5z9Cx539GSBYb+b09Z+hMhuBTh/BrI71VRg4rgF6f2xtIRK/YlTGVS/O08k5OojoyhZcpS7JXxDVSmQoWgiiQ==
|
||||
dmg-builder@24.3.0:
|
||||
version "24.3.0"
|
||||
resolved "https://registry.yarnpkg.com/dmg-builder/-/dmg-builder-24.3.0.tgz#c7eb3fe821ac75c678bd3b455f700a9bb398aba0"
|
||||
integrity sha512-U1HdvJG3MJi+BKJxn+g3wbQ9OsLaTFB4Issq0es3eBP1TDDKMxcb3Y6a2xT6IW9F+Iw8nAQopr97CZzFjzwjwg==
|
||||
dependencies:
|
||||
app-builder-lib "24.4.0"
|
||||
builder-util "24.4.0"
|
||||
app-builder-lib "24.3.0"
|
||||
builder-util "24.3.0"
|
||||
builder-util-runtime "9.2.1"
|
||||
fs-extra "^10.1.0"
|
||||
iconv-lite "^0.6.2"
|
||||
@@ -3309,16 +3288,16 @@ ejs@^3.1.8:
|
||||
dependencies:
|
||||
jake "^10.8.5"
|
||||
|
||||
electron-builder@^24.4.0:
|
||||
version "24.4.0"
|
||||
resolved "https://registry.yarnpkg.com/electron-builder/-/electron-builder-24.4.0.tgz#8846efa45bac8f6b9afc181abf71a4e12530f045"
|
||||
integrity sha512-D5INxodxaUIJgEX6p/fqBd8wQNS8XRAToNIJ9SQC+taNS5D73ZsjLuXiRraFGCB0cVk9KeKhEkdEOH5AaVya4g==
|
||||
electron-builder@^24.3.0:
|
||||
version "24.3.0"
|
||||
resolved "https://registry.yarnpkg.com/electron-builder/-/electron-builder-24.3.0.tgz#9eb298b7d27bdfdf12f0278f06b98833cc3f091e"
|
||||
integrity sha512-+MD9hRsoN1c4Fi/fyKredXgy3Bu6IGgd2nbc40FY7Pgi4Vthvnq0e5pql4BgwFUxBrspuvEB+tiH5QU3ZPq0zA==
|
||||
dependencies:
|
||||
app-builder-lib "24.4.0"
|
||||
builder-util "24.4.0"
|
||||
app-builder-lib "24.3.0"
|
||||
builder-util "24.3.0"
|
||||
builder-util-runtime "9.2.1"
|
||||
chalk "^4.1.2"
|
||||
dmg-builder "24.4.0"
|
||||
dmg-builder "24.3.0"
|
||||
fs-extra "^10.1.0"
|
||||
is-ci "^3.0.0"
|
||||
lazy-val "^1.0.5"
|
||||
@@ -3354,13 +3333,12 @@ electron-log@^4.4.8:
|
||||
resolved "https://registry.yarnpkg.com/electron-log/-/electron-log-4.4.8.tgz#fcb9f714dbcaefb6ac7984c4683912c74730248a"
|
||||
integrity sha512-QQ4GvrXO+HkgqqEOYbi+DHL7hj5JM+nHi/j+qrN9zeeXVKy8ZABgbu4CnG+BBqDZ2+tbeq9tUC4DZfIWFU5AZA==
|
||||
|
||||
electron-publish@24.4.0:
|
||||
version "24.4.0"
|
||||
resolved "https://registry.yarnpkg.com/electron-publish/-/electron-publish-24.4.0.tgz#a58f49ecd727620f65372881788ebb1a9b853284"
|
||||
integrity sha512-U3mnVSxIfNrLW7ZnwiedFhcLf6ExPFXgAsx89WpfQFsV4gFAt/LG+H74p0m9NSvsLXiZuF82yXoxi7Ou8GHq4Q==
|
||||
electron-publish@24.3.0:
|
||||
version "24.3.0"
|
||||
resolved "https://registry.yarnpkg.com/electron-publish/-/electron-publish-24.3.0.tgz#9ad740e8a00ae97aca2210a3d7fa603d0db81140"
|
||||
integrity sha512-CSo37CNsJL4Vvy8naQMCI6unXxHF8fhx89p0JEy0EOnaWmDdlSZ21kqcJHUSP6pSXJsqKq1DW72pZYU6B6Bpqw==
|
||||
dependencies:
|
||||
"@types/fs-extra" "^9.0.11"
|
||||
builder-util "24.4.0"
|
||||
builder-util "24.3.0"
|
||||
builder-util-runtime "9.2.1"
|
||||
chalk "^4.1.2"
|
||||
fs-extra "^10.1.0"
|
||||
@@ -3394,10 +3372,10 @@ electron-updater@^6.1.0:
|
||||
semver "^7.3.8"
|
||||
typed-emitter "^2.1.0"
|
||||
|
||||
electron@^22.3.9:
|
||||
version "22.3.9"
|
||||
resolved "https://registry.yarnpkg.com/electron/-/electron-22.3.9.tgz#8b4551f9bcea436a0110e5680ba23df56819a4e2"
|
||||
integrity sha512-C+ws4LnGxd+BQGVbKRgR9L1hfslk1L6FHYBm3a7dWL6xcobVm4dLyqShT/5N8lNRXlN1BhIYsWmrAisdd537Tw==
|
||||
electron@^22.3.8:
|
||||
version "22.3.8"
|
||||
resolved "https://registry.yarnpkg.com/electron/-/electron-22.3.8.tgz#bd637381825d8007b3629aba165a89ba5c0f499b"
|
||||
integrity sha512-h2SWCog2tXnNgBtwIIfT8pq3HR5TUqnSSnCk8/o4Yn6Nmh9x79kcPiRtj1ZY8QcVShxAY3lK9U/gdBNV47FK7g==
|
||||
dependencies:
|
||||
"@electron/get" "^2.0.0"
|
||||
"@types/node" "^16.11.26"
|
||||
@@ -3453,10 +3431,10 @@ enhanced-resolve@^0.9.1:
|
||||
memory-fs "^0.2.0"
|
||||
tapable "^0.1.8"
|
||||
|
||||
enhanced-resolve@^5.14.0:
|
||||
version "5.14.0"
|
||||
resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.14.0.tgz#0b6c676c8a3266c99fa281e4433a706f5c0c61c4"
|
||||
integrity sha512-+DCows0XNwLDcUhbFJPdlQEVnT2zXlCv7hPxemTz86/O+B/hCQ+mb7ydkPKiflpVraqLPCAfu7lDy+hBXueojw==
|
||||
enhanced-resolve@^5.13.0:
|
||||
version "5.13.0"
|
||||
resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.13.0.tgz#26d1ecc448c02de997133217b5c1053f34a0a275"
|
||||
integrity sha512-eyV8f0y1+bzyfh8xAwW/WTSZpLbjhqc4ne9eGSH4Zo2ejdyiNG9pU6mf9DG8a7+Auk6MFTlNOT4Y2y/9k8GKVg==
|
||||
dependencies:
|
||||
graceful-fs "^4.2.4"
|
||||
tapable "^2.2.0"
|
||||
@@ -3684,10 +3662,10 @@ eslint-plugin-promise@^6.1.1:
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-6.1.1.tgz#269a3e2772f62875661220631bd4dafcb4083816"
|
||||
integrity sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig==
|
||||
|
||||
eslint-plugin-vue@^9.12.0:
|
||||
version "9.12.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-vue/-/eslint-plugin-vue-9.12.0.tgz#3174eaaedc143bf7b392b3defa3f18889606bb73"
|
||||
integrity sha512-xH8PgpDW2WwmFSmRfs/3iWogef1CJzQqX264I65zz77jDuxF2yLy7+GA2diUM8ZNATuSl1+UehMQkb5YEyau5w==
|
||||
eslint-plugin-vue@^9.11.0:
|
||||
version "9.11.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-vue/-/eslint-plugin-vue-9.11.0.tgz#99a247455c02181f24d9240d422380fd16dd630c"
|
||||
integrity sha512-bBCJAZnkBV7ATH4Z1E7CvN3nmtS4H7QUU3UBxPdo8WohRU+yHjnQRALpTbxMVcz0e4Mx3IyxIdP5HYODMxK9cQ==
|
||||
dependencies:
|
||||
"@eslint-community/eslint-utils" "^4.3.0"
|
||||
natural-compare "^1.4.0"
|
||||
@@ -7242,17 +7220,6 @@ terser-webpack-plugin@^5.3.7:
|
||||
serialize-javascript "^6.0.1"
|
||||
terser "^5.16.5"
|
||||
|
||||
terser-webpack-plugin@^5.3.8:
|
||||
version "5.3.8"
|
||||
resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.8.tgz#415e03d2508f7de63d59eca85c5d102838f06610"
|
||||
integrity sha512-WiHL3ElchZMsK27P8uIUh4604IgJyAW47LVXGbEoB21DbQcZ+OuMpGjVYnEUaqcWM6dO8uS2qUbA7LSCWqvsbg==
|
||||
dependencies:
|
||||
"@jridgewell/trace-mapping" "^0.3.17"
|
||||
jest-worker "^27.4.5"
|
||||
schema-utils "^3.1.1"
|
||||
serialize-javascript "^6.0.1"
|
||||
terser "^5.16.8"
|
||||
|
||||
terser@^5.10.0, terser@^5.16.5:
|
||||
version "5.16.9"
|
||||
resolved "https://registry.yarnpkg.com/terser/-/terser-5.16.9.tgz#7a28cb178e330c484369886f2afd623d9847495f"
|
||||
@@ -7263,16 +7230,6 @@ terser@^5.10.0, terser@^5.16.5:
|
||||
commander "^2.20.0"
|
||||
source-map-support "~0.5.20"
|
||||
|
||||
terser@^5.16.8:
|
||||
version "5.17.3"
|
||||
resolved "https://registry.yarnpkg.com/terser/-/terser-5.17.3.tgz#7f908f16b3cdf3f6c0f8338e6c1c674837f90d25"
|
||||
integrity sha512-AudpAZKmZHkG9jueayypz4duuCFJMMNGRMwaPvQKWfxKedh8Z2x3OCoDqIIi1xx5+iwx1u6Au8XQcc9Lke65Yg==
|
||||
dependencies:
|
||||
"@jridgewell/source-map" "^0.3.2"
|
||||
acorn "^8.5.0"
|
||||
commander "^2.20.0"
|
||||
source-map-support "~0.5.20"
|
||||
|
||||
text-table@^0.2.0:
|
||||
version "0.2.0"
|
||||
resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"
|
||||
@@ -7652,15 +7609,15 @@ webidl-conversions@^3.0.0:
|
||||
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871"
|
||||
integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==
|
||||
|
||||
webpack-cli@^5.1.1:
|
||||
version "5.1.1"
|
||||
resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-5.1.1.tgz#c211ac6d911e77c512978f7132f0d735d4a97ace"
|
||||
integrity sha512-OLJwVMoXnXYH2ncNGU8gxVpUtm3ybvdioiTvHgUyBuyMLKiVvWy+QObzBsMtp5pH7qQoEuWgeEUQ/sU3ZJFzAw==
|
||||
webpack-cli@^5.0.2:
|
||||
version "5.0.2"
|
||||
resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-5.0.2.tgz#2954c10ecb61c5d4dad6f68ee2d77f051741946c"
|
||||
integrity sha512-4y3W5Dawri5+8dXm3+diW6Mn1Ya+Dei6eEVAdIduAmYNLzv1koKVAqsfgrrc9P2mhrYHQphx5htnGkcNwtubyQ==
|
||||
dependencies:
|
||||
"@discoveryjs/json-ext" "^0.5.0"
|
||||
"@webpack-cli/configtest" "^2.1.0"
|
||||
"@webpack-cli/configtest" "^2.0.1"
|
||||
"@webpack-cli/info" "^2.0.1"
|
||||
"@webpack-cli/serve" "^2.0.4"
|
||||
"@webpack-cli/serve" "^2.0.2"
|
||||
colorette "^2.0.14"
|
||||
commander "^10.0.1"
|
||||
cross-spawn "^7.0.3"
|
||||
@@ -7682,10 +7639,10 @@ webpack-dev-middleware@^5.3.1:
|
||||
range-parser "^1.2.1"
|
||||
schema-utils "^4.0.0"
|
||||
|
||||
webpack-dev-server@^4.15.0:
|
||||
version "4.15.0"
|
||||
resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-4.15.0.tgz#87ba9006eca53c551607ea0d663f4ae88be7af21"
|
||||
integrity sha512-HmNB5QeSl1KpulTBQ8UT4FPrByYyaLxpJoQ0+s7EvUrMc16m0ZS1sgb1XGqzmgCPk0c9y+aaXxn11tbLzuM7NQ==
|
||||
webpack-dev-server@^4.13.3:
|
||||
version "4.13.3"
|
||||
resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-4.13.3.tgz#9feb740b8b56b886260bae1360286818a221bae8"
|
||||
integrity sha512-KqqzrzMRSRy5ePz10VhjyL27K2dxqwXQLP5rAKwRJBPUahe7Z2bBWzHw37jeb8GCPKxZRO79ZdQUAPesMh/Nug==
|
||||
dependencies:
|
||||
"@types/bonjour" "^3.5.9"
|
||||
"@types/connect-history-api-fallback" "^1.3.5"
|
||||
@@ -7740,10 +7697,10 @@ webpack-sources@^3.2.3:
|
||||
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde"
|
||||
integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==
|
||||
|
||||
webpack@^5.82.1:
|
||||
version "5.82.1"
|
||||
resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.82.1.tgz#8f38c78e53467556e8a89054ebd3ef6e9f67dbab"
|
||||
integrity sha512-C6uiGQJ+Gt4RyHXXYt+v9f+SN1v83x68URwgxNQ98cvH8kxiuywWGP4XeNZ1paOzZ63aY3cTciCEQJNFUljlLw==
|
||||
webpack@^5.82.0:
|
||||
version "5.82.0"
|
||||
resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.82.0.tgz#3c0d074dec79401db026b4ba0fb23d6333f88e7d"
|
||||
integrity sha512-iGNA2fHhnDcV1bONdUu554eZx+XeldsaeQ8T67H6KKHl2nUSwX8Zm7cmzOA46ox/X1ARxf7Bjv8wQ/HsB5fxBg==
|
||||
dependencies:
|
||||
"@types/eslint-scope" "^3.7.3"
|
||||
"@types/estree" "^1.0.0"
|
||||
@@ -7754,7 +7711,7 @@ webpack@^5.82.1:
|
||||
acorn-import-assertions "^1.7.6"
|
||||
browserslist "^4.14.5"
|
||||
chrome-trace-event "^1.0.2"
|
||||
enhanced-resolve "^5.14.0"
|
||||
enhanced-resolve "^5.13.0"
|
||||
es-module-lexer "^1.2.1"
|
||||
eslint-scope "5.1.1"
|
||||
events "^3.2.0"
|
||||
|
||||