Compare commits
94 Commits
fix-dep
...
renovate_n
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bc6f732cec | ||
|
|
0a2ea1e09d | ||
|
|
be77363515 | ||
|
|
b1a1c5c01b | ||
|
|
6b60360ce1 | ||
|
|
56e92101b0 | ||
|
|
2a5c67f9e3 | ||
|
|
ef39f41e96 | ||
|
|
d317ea3ff8 | ||
|
|
787e4c441b | ||
|
|
ef116d01b7 | ||
|
|
0a5be1f166 | ||
|
|
4a35518da7 | ||
|
|
8f3301cd1e | ||
|
|
97b10558f6 | ||
|
|
e61501f13f | ||
|
|
b1d1778479 | ||
|
|
9cca2d39c3 | ||
|
|
fcee4017d7 | ||
|
|
2890419d6d | ||
|
|
0fe3dd977f | ||
|
|
9ba088f76f | ||
|
|
1a7404ee8a | ||
|
|
f1de7606a5 | ||
|
|
d4b493cebe | ||
|
|
1df3d025bd | ||
|
|
61b7681fd1 | ||
|
|
ac7f16e71c | ||
|
|
b363dca77f | ||
|
|
16cabd19ff | ||
|
|
390b4ad7ec | ||
|
|
b3dc3292b7 | ||
|
|
244a242bdc | ||
|
|
241f3cb9a3 | ||
|
|
aa4fb3d08e | ||
|
|
ebaf9cf848 | ||
|
|
df05db5583 | ||
|
|
1ccfa404d2 | ||
|
|
bc19caf8ee | ||
|
|
36c24a4940 | ||
|
|
1cefcff3da | ||
|
|
1eb61201d6 | ||
|
|
3e514f9cf6 | ||
|
|
b8f1d950f2 | ||
|
|
a85effc8ec | ||
|
|
cf846979b0 | ||
|
|
9f630c9bfb | ||
|
|
1d66b6d069 | ||
|
|
6b83ed34b9 | ||
|
|
a0aeae7e91 | ||
|
|
99e3058676 | ||
|
|
20d1d8a224 | ||
|
|
0b34ff1148 | ||
|
|
4120fcf4af | ||
|
|
7ea277ccf6 | ||
|
|
77a981178b | ||
|
|
ea19545ec6 | ||
|
|
6f6ccb029c | ||
|
|
43b2d28fb5 | ||
|
|
f20d24ac3c | ||
|
|
b1332ee76b | ||
|
|
34b8f3fb64 | ||
|
|
b4f98e91ff | ||
|
|
ebb8d23ef3 | ||
|
|
e5bf6745bf | ||
|
|
686f63b35f | ||
|
|
4ed5f3ff5f | ||
|
|
af8379012a | ||
|
|
1c53102e12 | ||
|
|
1a074b65e6 | ||
|
|
2052adde7d | ||
|
|
eed9eebd45 | ||
|
|
e36eacd05a | ||
|
|
9c7cffa1a3 | ||
|
|
94d2bd7807 | ||
|
|
5efbf7e5c9 | ||
|
|
fce078defe | ||
|
|
10f355ba0f | ||
|
|
9d8293b970 | ||
|
|
73b8b54ae8 | ||
|
|
bc49dbc41d | ||
|
|
69b1ff58d0 | ||
|
|
cf48311fcb | ||
|
|
c919af1fd9 | ||
|
|
cdc5ac6538 | ||
|
|
05881478b5 | ||
|
|
fb279010d0 | ||
|
|
e54f61c480 | ||
|
|
ab9468f84f | ||
|
|
0f20c0acd1 | ||
|
|
a4ef6cb562 | ||
|
|
21c260dc13 | ||
|
|
0df520c5ba | ||
|
|
707461a264 |
@@ -13,7 +13,7 @@
|
||||
|
||||
<p align="center">
|
||||
<a href="https://discord.gg/cnXkm4Z"><img src="https://img.shields.io/discord/612575111718895616" alt="discord"></a>
|
||||
<a href="https://travis-ci.org/webtorrent/webtorrent-desktop"><img src="https://img.shields.io/travis/webtorrent/webtorrent-desktop/master.svg" alt="travis"></a>
|
||||
<a href="https://github.com/webtorrent/webtorrent-desktop/actions/workflows/ci.yml"><img src="https://github.com/webtorrent/webtorrent-desktop/actions/workflows/ci.yml/badge.svg" alt="GitHub CI action"></a>
|
||||
<a href="https://github.com/webtorrent/webtorrent-desktop/releases"><img src="https://img.shields.io/github/release/webtorrent/webtorrent-desktop.svg" alt="github release version"></a>
|
||||
<a href="https://github.com/webtorrent/webtorrent-desktop/releases"><img src="https://img.shields.io/github/downloads/webtorrent/webtorrent-desktop/total.svg" alt="github release downloads"></a>
|
||||
<a href="https://standardjs.com"><img src="https://img.shields.io/badge/code_style-standard-brightgreen.svg" alt="Standard - JavaScript Style Guide"></a>
|
||||
|
||||
17582
package-lock.json
generated
17582
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
54
package.json
54
package.json
@@ -21,8 +21,7 @@
|
||||
"url": "https://github.com/webtorrent/webtorrent-desktop/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"@electron/remote": "2.0.8",
|
||||
"@material-ui/core": "4.12.4",
|
||||
"@electron/remote": "2.1.3",
|
||||
"airplayer": "github:webtorrent/airplayer#fix-security",
|
||||
"application-config": "2.0.0",
|
||||
"arch": "2.2.0",
|
||||
@@ -31,7 +30,7 @@
|
||||
"capture-frame": "4.0.0",
|
||||
"chokidar": "3.5.3",
|
||||
"chromecasts": "1.10.2",
|
||||
"create-torrent": "5.0.6",
|
||||
"create-torrent": "5.0.9",
|
||||
"debounce": "1.2.1",
|
||||
"dlnacasts": "0.1.0",
|
||||
"drag-drop": "7.2.0",
|
||||
@@ -40,49 +39,50 @@
|
||||
"iso-639-1": "2.1.15",
|
||||
"languagedetect": "2.0.0",
|
||||
"location-history": "1.1.2",
|
||||
"music-metadata": "7.13.0",
|
||||
"material-ui": "0.20.2",
|
||||
"music-metadata": "7.14.0",
|
||||
"network-address": "1.1.2",
|
||||
"parse-torrent": "9.1.5",
|
||||
"prettier-bytes": "1.0.4",
|
||||
"prop-types": "15.8.1",
|
||||
"react": "17.0.2",
|
||||
"react-dom": "17.0.2",
|
||||
"rimraf": "3.0.2",
|
||||
"rimraf": "4.4.0",
|
||||
"run-parallel": "1.2.0",
|
||||
"semver": "7.3.8",
|
||||
"simple-concat": "1.0.1",
|
||||
"simple-get": "4.0.1",
|
||||
"srt-to-vtt": "1.1.3",
|
||||
"vlc-command": "1.2.0",
|
||||
"webtorrent": "1.8.32",
|
||||
"webtorrent": "1.9.7",
|
||||
"winreg": "1.2.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/cli": "7.19.3",
|
||||
"@babel/core": "7.19.3",
|
||||
"@babel/eslint-parser": "7.19.1",
|
||||
"@babel/plugin-transform-react-jsx": "7.19.0",
|
||||
"@babel/cli": "7.28.6",
|
||||
"@babel/core": "7.29.0",
|
||||
"@babel/eslint-parser": "7.28.6",
|
||||
"@babel/plugin-transform-react-jsx": "7.28.6",
|
||||
"cross-zip": "4.0.0",
|
||||
"depcheck": "1.4.3",
|
||||
"electron": "15.5.7",
|
||||
"electron-notarize": "1.2.1",
|
||||
"depcheck": "1.4.7",
|
||||
"electron": "35.7.5",
|
||||
"electron-notarize": "1.2.2",
|
||||
"electron-osx-sign": "0.6.0",
|
||||
"electron-packager": "15.5.2",
|
||||
"electron-winstaller": "5.0.0",
|
||||
"gh-release": "6.0.4",
|
||||
"minimist": "1.2.6",
|
||||
"nodemon": "2.0.20",
|
||||
"open": "8.4.0",
|
||||
"plist": "3.0.6",
|
||||
"pngjs": "6.0.0",
|
||||
"electron-packager": "17.1.2",
|
||||
"electron-winstaller": "5.4.0",
|
||||
"gh-release": "7.0.2",
|
||||
"minimist": "1.2.8",
|
||||
"nodemon": "2.0.22",
|
||||
"open": "8.4.2",
|
||||
"plist": "3.1.0",
|
||||
"pngjs": "7.0.0",
|
||||
"run-series": "1.1.9",
|
||||
"spectron": "19.0.0",
|
||||
"standard": "17.0.0",
|
||||
"tape": "5.6.1"
|
||||
"tape": "5.9.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^16.0.0 || ^18.0.0",
|
||||
"npm": "^7.10.0 || ^8.0.0"
|
||||
"npm": "^7.10.0 || ^8.0.0 || ^9.0.0 || ^10.0.0"
|
||||
},
|
||||
"homepage": "https://webtorrent.io",
|
||||
"keywords": [
|
||||
@@ -99,8 +99,8 @@
|
||||
"main": "index.js",
|
||||
"optionalDependencies": {
|
||||
"appdmg": "^0.6.0",
|
||||
"electron-installer-debian": "^3.1.0",
|
||||
"electron-installer-redhat": "^3.3.0"
|
||||
"electron-installer-debian": "^3.2.0",
|
||||
"electron-installer-redhat": "^3.4.0"
|
||||
},
|
||||
"private": true,
|
||||
"productName": "WebTorrent",
|
||||
@@ -113,12 +113,10 @@
|
||||
"clean": "node ./bin/clean.js",
|
||||
"gh-release": "gh-release",
|
||||
"install-system-deps": "brew install fakeroot dpkg rpm",
|
||||
"lint": "standard",
|
||||
"lint:fix": "standard --fix",
|
||||
"open-config": "node ./bin/open-config.js",
|
||||
"package": "node ./bin/package.js",
|
||||
"start": "npm run build && electron --no-sandbox .",
|
||||
"test": "npm run lint && depcheck --ignores=standard,@babel/eslint-parser --ignore-dirs=build,dist",
|
||||
"test": "standard && depcheck --ignores=standard,@babel/eslint-parser --ignore-dirs=build,dist",
|
||||
"test-integration": "npm run build && node ./test",
|
||||
"update-authors": "./bin/update-authors.sh",
|
||||
"watch": "nodemon --exec \"npm run start\" --ext js,css --ignore build/ --ignore dist/"
|
||||
|
||||
@@ -91,11 +91,11 @@ function init (state, options) {
|
||||
})
|
||||
|
||||
win.on('move', debounce(e => {
|
||||
send('windowBoundsChanged', e.sender.getBounds())
|
||||
send('windowBoundsChanged', main.win.getBounds())
|
||||
}, 1000))
|
||||
|
||||
win.on('resize', debounce(e => {
|
||||
send('windowBoundsChanged', e.sender.getBounds())
|
||||
send('windowBoundsChanged', main.win.getBounds())
|
||||
}, 1000))
|
||||
|
||||
win.on('close', e => {
|
||||
|
||||
@@ -16,7 +16,6 @@ module.exports = class DeleteAllTorrentsModal extends React.Component {
|
||||
<p><strong>{message}</strong></p>
|
||||
<ModalOKCancel
|
||||
cancelText='CANCEL'
|
||||
color='secondary'
|
||||
onCancel={dispatcher('exitModal')}
|
||||
okText={buttonText}
|
||||
onOK={handleRemove}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
const React = require('react')
|
||||
const PropTypes = require('prop-types')
|
||||
|
||||
const grey = require('@material-ui/core/colors/grey').default
|
||||
const colors = require('material-ui/styles/colors')
|
||||
|
||||
class Heading extends React.Component {
|
||||
static get propTypes () {
|
||||
@@ -19,7 +19,7 @@ class Heading extends React.Component {
|
||||
render () {
|
||||
const HeadingTag = 'h' + this.props.level
|
||||
const style = {
|
||||
color: grey['100'],
|
||||
color: colors.grey100,
|
||||
fontSize: 20,
|
||||
marginBottom: 15,
|
||||
marginTop: 30
|
||||
|
||||
@@ -1,28 +1,26 @@
|
||||
const React = require('react')
|
||||
const Button = require('@material-ui/core/Button').default
|
||||
const FlatButton = require('material-ui/FlatButton').default
|
||||
const RaisedButton = require('material-ui/RaisedButton').default
|
||||
|
||||
module.exports = class ModalOKCancel extends React.Component {
|
||||
render () {
|
||||
const cancelStyle = { marginRight: 10, color: 'black' }
|
||||
const { cancelText, color = 'primary', onCancel, okText, onOK } = this.props
|
||||
const { cancelText, onCancel, okText, onOK } = this.props
|
||||
return (
|
||||
<div className='float-right'>
|
||||
<Button
|
||||
<FlatButton
|
||||
className='control cancel'
|
||||
onClick={onCancel}
|
||||
style={cancelStyle}
|
||||
>
|
||||
{cancelText}
|
||||
</Button>
|
||||
<Button
|
||||
autoFocus
|
||||
label={cancelText}
|
||||
onClick={onCancel}
|
||||
/>
|
||||
<RaisedButton
|
||||
className='control ok'
|
||||
primary
|
||||
label={okText}
|
||||
onClick={onOK}
|
||||
color={color}
|
||||
variant='contained'
|
||||
>
|
||||
{okText}
|
||||
</Button>
|
||||
autoFocus
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const React = require('react')
|
||||
const TextField = require('@material-ui/core/TextField').default
|
||||
const TextField = require('material-ui/TextField').default
|
||||
const { clipboard } = require('electron')
|
||||
|
||||
const ModalOKCancel = require('./modal-ok-cancel')
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
const path = require('path')
|
||||
|
||||
const colors = require('material-ui/styles/colors')
|
||||
const remote = require('@electron/remote')
|
||||
const React = require('react')
|
||||
const PropTypes = require('prop-types')
|
||||
|
||||
const Button = require('@material-ui/core/Button').default
|
||||
const TextField = require('@material-ui/core/TextField').default
|
||||
const grey = require('@material-ui/core/colors/grey').default
|
||||
const RaisedButton = require('material-ui/RaisedButton').default
|
||||
const TextField = require('material-ui/TextField').default
|
||||
|
||||
// Lets you pick a file or directory.
|
||||
// Uses the system Open File dialog.
|
||||
@@ -53,8 +53,10 @@ class PathSelector extends React.Component {
|
||||
textOverflow: 'ellipsis',
|
||||
whiteSpace: 'nowrap'
|
||||
}
|
||||
const textareaStyle = {
|
||||
color: colors.grey50
|
||||
}
|
||||
const textFieldStyle = {
|
||||
color: grey['50'],
|
||||
flex: '1'
|
||||
}
|
||||
const text = this.props.value || ''
|
||||
@@ -68,20 +70,13 @@ class PathSelector extends React.Component {
|
||||
{this.props.title}:
|
||||
</div>
|
||||
<TextField
|
||||
className='control'
|
||||
disabled
|
||||
id={id}
|
||||
style={textFieldStyle}
|
||||
value={text}
|
||||
className='control' disabled id={id} value={text}
|
||||
inputStyle={textareaStyle} style={textFieldStyle}
|
||||
/>
|
||||
<Button
|
||||
className='control'
|
||||
onClick={this.handleClick}
|
||||
<RaisedButton
|
||||
className='control' label='Change' onClick={this.handleClick}
|
||||
style={buttonStyle}
|
||||
variant='contained'
|
||||
>
|
||||
Change
|
||||
</Button>
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -16,7 +16,6 @@ module.exports = class RemoveTorrentModal extends React.Component {
|
||||
<p><strong>{message}</strong></p>
|
||||
<ModalOKCancel
|
||||
cancelText='CANCEL'
|
||||
color='secondary'
|
||||
onCancel={dispatcher('exitModal')}
|
||||
okText={buttonText}
|
||||
onOK={handleRemove}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
const React = require('react')
|
||||
const PropTypes = require('prop-types')
|
||||
|
||||
const Button = require('@material-ui/core/Button').default
|
||||
const RaisedButton = require('material-ui/RaisedButton').default
|
||||
|
||||
class ShowMore extends React.Component {
|
||||
static get propTypes () {
|
||||
@@ -42,13 +42,11 @@ class ShowMore extends React.Component {
|
||||
return (
|
||||
<div className='show-more' style={this.props.style}>
|
||||
{this.state.expanded ? this.props.children : null}
|
||||
<Button
|
||||
<RaisedButton
|
||||
className='control'
|
||||
onClick={this.handleClick}
|
||||
variant='contained'
|
||||
>
|
||||
{label}
|
||||
</Button>
|
||||
label={label}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
const colors = require('material-ui/styles/colors')
|
||||
const createGetter = require('fn-getter')
|
||||
const React = require('react')
|
||||
|
||||
const { ThemeProvider, createTheme } = require('@material-ui/core/styles')
|
||||
const grey = require('@material-ui/core/colors/grey').default
|
||||
const red = require('@material-ui/core/colors/red').default
|
||||
const darkBaseTheme = require('material-ui/styles/baseThemes/darkBaseTheme').default
|
||||
const getMuiTheme = require('material-ui/styles/getMuiTheme').default
|
||||
const MuiThemeProvider = require('material-ui/styles/MuiThemeProvider').default
|
||||
|
||||
const Header = require('../components/header')
|
||||
|
||||
@@ -32,8 +33,17 @@ const fontFamily = process.platform === 'win32'
|
||||
? '"Segoe UI", sans-serif'
|
||||
: 'BlinkMacSystemFont, "Helvetica Neue", Helvetica, sans-serif'
|
||||
|
||||
let darkTheme
|
||||
let lightTheme
|
||||
darkBaseTheme.fontFamily = fontFamily
|
||||
darkBaseTheme.userAgent = false
|
||||
darkBaseTheme.palette.primary1Color = colors.grey50
|
||||
darkBaseTheme.palette.primary2Color = colors.grey50
|
||||
darkBaseTheme.palette.primary3Color = colors.grey600
|
||||
darkBaseTheme.palette.accent1Color = colors.redA200
|
||||
darkBaseTheme.palette.accent2Color = colors.redA400
|
||||
darkBaseTheme.palette.accent3Color = colors.redA100
|
||||
|
||||
let darkMuiTheme
|
||||
let lightMuiTheme
|
||||
|
||||
class App extends React.Component {
|
||||
render () {
|
||||
@@ -54,66 +64,19 @@ class App extends React.Component {
|
||||
if (state.window.isFocused) cls.push('is-focused')
|
||||
if (hideControls) cls.push('hide-video-controls')
|
||||
|
||||
if (!darkTheme) {
|
||||
darkTheme = createTheme({
|
||||
overrides: {
|
||||
MuiButton: {
|
||||
contained: {
|
||||
backgroundColor: '#303030',
|
||||
color: 'white',
|
||||
'&:hover': {
|
||||
backgroundColor: '#414141',
|
||||
// Reset on touch devices, it doesn't add specificity
|
||||
'@media (hover: none)': {
|
||||
backgroundColor: '#303030',
|
||||
color: 'white'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
MuiCheckbox: {
|
||||
root: {
|
||||
padding: '0px',
|
||||
marginRight: '16px'
|
||||
}
|
||||
},
|
||||
MuiFormControlLabel: {
|
||||
label: {
|
||||
color: 'white',
|
||||
fontSize: '0.875rem'
|
||||
},
|
||||
root: {
|
||||
marginLeft: '0px',
|
||||
marginRight: '0px'
|
||||
}
|
||||
}
|
||||
},
|
||||
palette: {
|
||||
primary: {
|
||||
main: grey['50']
|
||||
},
|
||||
secondary: {
|
||||
main: grey['50']
|
||||
},
|
||||
type: 'dark'
|
||||
},
|
||||
typography: {
|
||||
fontFamily
|
||||
}
|
||||
}, {
|
||||
userAgent: false
|
||||
})
|
||||
if (!darkMuiTheme) {
|
||||
darkMuiTheme = getMuiTheme(darkBaseTheme)
|
||||
}
|
||||
|
||||
return (
|
||||
<ThemeProvider theme={darkTheme}>
|
||||
<MuiThemeProvider muiTheme={darkMuiTheme}>
|
||||
<div className={'app ' + cls.join(' ')}>
|
||||
<Header state={state} />
|
||||
{this.getErrorPopover()}
|
||||
<div key='content' className='content'>{this.getView()}</div>
|
||||
{this.getModal()}
|
||||
</div>
|
||||
</ThemeProvider>
|
||||
</MuiThemeProvider>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -139,32 +102,23 @@ class App extends React.Component {
|
||||
const state = this.props.state
|
||||
if (!state.modal) return
|
||||
|
||||
if (!lightTheme) {
|
||||
lightTheme = createTheme({
|
||||
palette: {
|
||||
secondary: {
|
||||
main: red.A200
|
||||
},
|
||||
type: 'light'
|
||||
},
|
||||
typography: {
|
||||
fontFamily
|
||||
}
|
||||
}, {
|
||||
userAgent: false
|
||||
})
|
||||
if (!lightMuiTheme) {
|
||||
const lightBaseTheme = require('material-ui/styles/baseThemes/lightBaseTheme').default
|
||||
lightBaseTheme.fontFamily = fontFamily
|
||||
lightBaseTheme.userAgent = false
|
||||
lightMuiTheme = getMuiTheme(lightBaseTheme)
|
||||
}
|
||||
|
||||
const ModalContents = Modals[state.modal.id]()
|
||||
return (
|
||||
<ThemeProvider theme={lightTheme}>
|
||||
<MuiThemeProvider muiTheme={lightMuiTheme}>
|
||||
<div key='modal' className='modal'>
|
||||
<div key='modal-background' className='modal-background' />
|
||||
<div key='modal-content' className='modal-content'>
|
||||
<ModalContents state={state} />
|
||||
</div>
|
||||
</div>
|
||||
</ThemeProvider>
|
||||
</MuiThemeProvider>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -3,16 +3,17 @@ const path = require('path')
|
||||
const prettyBytes = require('prettier-bytes')
|
||||
const React = require('react')
|
||||
|
||||
const Button = require('@material-ui/core/Button').default
|
||||
const TextField = require('@material-ui/core/TextField').default
|
||||
const Checkbox = require('@material-ui/core/Checkbox').default
|
||||
const { dispatch, dispatcher } = require('../lib/dispatcher')
|
||||
|
||||
const FlatButton = require('material-ui/FlatButton').default
|
||||
const RaisedButton = require('material-ui/RaisedButton').default
|
||||
const TextField = require('material-ui/TextField').default
|
||||
const Checkbox = require('material-ui/Checkbox').default
|
||||
|
||||
const CreateTorrentErrorPage = require('../components/create-torrent-error-page')
|
||||
const Heading = require('../components/heading')
|
||||
const ShowMore = require('../components/show-more')
|
||||
|
||||
const { dispatch, dispatcher } = require('../lib/dispatcher')
|
||||
|
||||
// Shows a basic UI to create a torrent, from an already-selected file or folder.
|
||||
// Includes a "Show Advanced..." button and more advanced UI.
|
||||
class CreateTorrentPage extends React.Component {
|
||||
@@ -98,23 +99,20 @@ class CreateTorrentPage extends React.Component {
|
||||
{this.renderAdvanced()}
|
||||
</ShowMore>
|
||||
<div className='float-right'>
|
||||
<Button
|
||||
<FlatButton
|
||||
className='control cancel'
|
||||
onClick={dispatcher('cancel')}
|
||||
label='Cancel'
|
||||
style={{
|
||||
marginRight: 10
|
||||
}}
|
||||
>
|
||||
Cancel
|
||||
</Button>
|
||||
<Button
|
||||
onClick={dispatcher('cancel')}
|
||||
/>
|
||||
<RaisedButton
|
||||
className='control create-torrent-button'
|
||||
label='Create Torrent'
|
||||
primary
|
||||
onClick={this.handleSubmit}
|
||||
color='primary'
|
||||
variant='contained'
|
||||
>
|
||||
Create Torrent
|
||||
</Button>
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
@@ -136,6 +134,10 @@ class CreateTorrentPage extends React.Component {
|
||||
fileElems.push(<div key='more'>+ {files.length - maxFileElems} more</div>)
|
||||
}
|
||||
|
||||
// Align the text fields
|
||||
const textFieldStyle = { width: '' }
|
||||
const textareaStyle = { margin: 0 }
|
||||
|
||||
return (
|
||||
<div key='advanced' className='create-torrent-advanced'>
|
||||
<div key='private' className='torrent-attribute'>
|
||||
@@ -144,32 +146,34 @@ class CreateTorrentPage extends React.Component {
|
||||
className='torrent-is-private control'
|
||||
style={{ display: '' }}
|
||||
checked={this.state.isPrivate}
|
||||
onChange={this.handleSetIsPrivate}
|
||||
onCheck={this.handleSetIsPrivate}
|
||||
/>
|
||||
</div>
|
||||
<div key='trackers' className='torrent-attribute'>
|
||||
<label>Trackers:</label>
|
||||
<TextField
|
||||
className='torrent-trackers control'
|
||||
fullWidth
|
||||
maxRows={10}
|
||||
minRows={2}
|
||||
multiline
|
||||
onChange={this.handleSetTrackers}
|
||||
style={textFieldStyle}
|
||||
textareaStyle={textareaStyle}
|
||||
multiLine
|
||||
rows={2}
|
||||
rowsMax={10}
|
||||
value={this.state.trackers}
|
||||
onChange={this.handleSetTrackers}
|
||||
/>
|
||||
</div>
|
||||
<div key='comment' className='torrent-attribute'>
|
||||
<label>Comment:</label>
|
||||
<TextField
|
||||
className='torrent-comment control'
|
||||
fullWidth
|
||||
maxRows={10}
|
||||
minRows={2}
|
||||
multiline
|
||||
onChange={this.handleSetComment}
|
||||
placeholder='Optionally describe your torrent...'
|
||||
style={textFieldStyle}
|
||||
textareaStyle={textareaStyle}
|
||||
hintText='Optionally describe your torrent...'
|
||||
multiLine
|
||||
rows={2}
|
||||
rowsMax={10}
|
||||
value={this.state.comment}
|
||||
onChange={this.handleSetComment}
|
||||
/>
|
||||
</div>
|
||||
<div key='files' className='torrent-attribute'>
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
const React = require('react')
|
||||
const PropTypes = require('prop-types')
|
||||
|
||||
const Button = require('@material-ui/core/Button').default
|
||||
const Checkbox = require('@material-ui/core/Checkbox').default
|
||||
const FormControlLabel = require('@material-ui/core/FormControlLabel').default
|
||||
const TextField = require('@material-ui/core/TextField').default
|
||||
const grey = require('@material-ui/core/colors/grey').default
|
||||
|
||||
const colors = require('material-ui/styles/colors')
|
||||
const Checkbox = require('material-ui/Checkbox').default
|
||||
const RaisedButton = require('material-ui/RaisedButton').default
|
||||
const TextField = require('material-ui/TextField').default
|
||||
const Heading = require('../components/heading')
|
||||
const PathSelector = require('../components/path-selector')
|
||||
|
||||
@@ -65,15 +63,11 @@ class PreferencesPage extends React.Component {
|
||||
openExternalPlayerCheckbox () {
|
||||
return (
|
||||
<Preference>
|
||||
<FormControlLabel
|
||||
control={
|
||||
<Checkbox
|
||||
className='control'
|
||||
checked={!this.props.state.saved.prefs.openExternalPlayer}
|
||||
onChange={this.handleOpenExternalPlayerChange}
|
||||
/>
|
||||
}
|
||||
<Checkbox
|
||||
className='control'
|
||||
checked={!this.props.state.saved.prefs.openExternalPlayer}
|
||||
label='Play torrent media files using WebTorrent'
|
||||
onCheck={this.handleOpenExternalPlayerChange}
|
||||
/>
|
||||
</Preference>
|
||||
)
|
||||
@@ -86,15 +80,11 @@ class PreferencesPage extends React.Component {
|
||||
highestPlaybackPriorityCheckbox () {
|
||||
return (
|
||||
<Preference>
|
||||
<FormControlLabel
|
||||
control={
|
||||
<Checkbox
|
||||
className='control'
|
||||
checked={this.props.state.saved.prefs.highestPlaybackPriority}
|
||||
onChange={this.handleHighestPlaybackPriorityChange}
|
||||
/>
|
||||
}
|
||||
<Checkbox
|
||||
className='control'
|
||||
checked={this.props.state.saved.prefs.highestPlaybackPriority}
|
||||
label='Highest Playback Priority'
|
||||
onCheck={this.handleHighestPlaybackPriorityChange}
|
||||
/>
|
||||
<p>Pauses all active torrents to allow playback to use all of the available bandwidth.</p>
|
||||
</Preference>
|
||||
@@ -136,15 +126,11 @@ class PreferencesPage extends React.Component {
|
||||
autoAddTorrentsCheckbox () {
|
||||
return (
|
||||
<Preference>
|
||||
<FormControlLabel
|
||||
control={
|
||||
<Checkbox
|
||||
className='control'
|
||||
checked={this.props.state.saved.prefs.autoAddTorrents}
|
||||
onChange={(e, value) => { this.handleAutoAddTorrentsChange(e, value) }}
|
||||
/>
|
||||
}
|
||||
<Checkbox
|
||||
className='control'
|
||||
checked={this.props.state.saved.prefs.autoAddTorrents}
|
||||
label='Watch for new .torrent files and add them immediately'
|
||||
onCheck={(e, value) => { this.handleAutoAddTorrentsChange(e, value) }}
|
||||
/>
|
||||
</Preference>
|
||||
)
|
||||
@@ -202,13 +188,11 @@ class PreferencesPage extends React.Component {
|
||||
return (
|
||||
<Preference>
|
||||
<p>WebTorrent is not currently the default torrent app.</p>
|
||||
<Button
|
||||
<RaisedButton
|
||||
className='control'
|
||||
onClick={this.handleSetDefaultApp}
|
||||
variant='contained'
|
||||
>
|
||||
Make WebTorrent the default
|
||||
</Button>
|
||||
label='Make WebTorrent the default'
|
||||
/>
|
||||
</Preference>
|
||||
)
|
||||
}
|
||||
@@ -224,15 +208,11 @@ class PreferencesPage extends React.Component {
|
||||
|
||||
return (
|
||||
<Preference>
|
||||
<FormControlLabel
|
||||
control={
|
||||
<Checkbox
|
||||
className='control'
|
||||
checked={this.props.state.saved.prefs.startup}
|
||||
onChange={this.handleStartupChange}
|
||||
/>
|
||||
}
|
||||
<Checkbox
|
||||
className='control'
|
||||
checked={this.props.state.saved.prefs.startup}
|
||||
label='Open WebTorrent on startup'
|
||||
onCheck={this.handleStartupChange}
|
||||
/>
|
||||
</Preference>
|
||||
)
|
||||
@@ -241,15 +221,11 @@ class PreferencesPage extends React.Component {
|
||||
soundNotificationsCheckbox () {
|
||||
return (
|
||||
<Preference>
|
||||
<FormControlLabel
|
||||
control={
|
||||
<Checkbox
|
||||
className='control'
|
||||
checked={this.props.state.saved.prefs.soundNotifications}
|
||||
onChange={this.handleSoundNotificationsChange}
|
||||
/>
|
||||
}
|
||||
<Checkbox
|
||||
className='control'
|
||||
checked={this.props.state.saved.prefs.soundNotifications}
|
||||
label='Enable sounds'
|
||||
onCheck={this.handleSoundNotificationsChange}
|
||||
/>
|
||||
</Preference>
|
||||
)
|
||||
@@ -264,16 +240,21 @@ class PreferencesPage extends React.Component {
|
||||
}
|
||||
|
||||
setGlobalTrackers () {
|
||||
// Align the text fields
|
||||
const textFieldStyle = { width: '100%' }
|
||||
const textareaStyle = { margin: 0 }
|
||||
|
||||
return (
|
||||
<Preference>
|
||||
<TextField
|
||||
className='torrent-trackers control'
|
||||
fullWidth
|
||||
maxRows={10}
|
||||
minRows={2}
|
||||
multiline
|
||||
onChange={this.handleSetGlobalTrackers}
|
||||
style={textFieldStyle}
|
||||
textareaStyle={textareaStyle}
|
||||
multiLine
|
||||
rows={2}
|
||||
rowsMax={10}
|
||||
value={this.state.globalTrackers}
|
||||
onChange={this.handleSetGlobalTrackers}
|
||||
/>
|
||||
</Preference>
|
||||
)
|
||||
@@ -293,7 +274,7 @@ class PreferencesPage extends React.Component {
|
||||
|
||||
render () {
|
||||
const style = {
|
||||
color: grey['400'],
|
||||
color: colors.grey400,
|
||||
marginLeft: 25,
|
||||
marginRight: 25
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
const React = require('react')
|
||||
const prettyBytes = require('prettier-bytes')
|
||||
|
||||
const Checkbox = require('@material-ui/core/Checkbox').default
|
||||
const LinearProgress = require('@material-ui/core/LinearProgress').default
|
||||
const Checkbox = require('material-ui/Checkbox').default
|
||||
const LinearProgress = require('material-ui/LinearProgress').default
|
||||
|
||||
const TorrentSummary = require('../lib/torrent-summary')
|
||||
const TorrentPlayer = require('../lib/torrent-player')
|
||||
@@ -124,19 +124,19 @@ module.exports = class TorrentList extends React.Component {
|
||||
const isActive = ['downloading', 'seeding'].includes(torrentSummary.status)
|
||||
return (
|
||||
<Checkbox
|
||||
checked={isActive}
|
||||
className={'control download ' + torrentSummary.status}
|
||||
key='download-button'
|
||||
onChange={dispatcher('toggleTorrent', infoHash)}
|
||||
onClick={stopPropagation}
|
||||
className={'control download ' + torrentSummary.status}
|
||||
style={{
|
||||
display: 'inline-block',
|
||||
marginRight: '12px',
|
||||
'& .MuiSvgIconRoot': {
|
||||
width: '20px',
|
||||
height: '20px'
|
||||
}
|
||||
width: 32
|
||||
}}
|
||||
iconStyle={{
|
||||
width: 20,
|
||||
height: 20
|
||||
}}
|
||||
checked={isActive}
|
||||
onClick={stopPropagation}
|
||||
onCheck={dispatcher('toggleTorrent', infoHash)}
|
||||
/>
|
||||
)
|
||||
}
|
||||
@@ -155,7 +155,7 @@ module.exports = class TorrentList extends React.Component {
|
||||
}
|
||||
return (
|
||||
<div key='progress-bar' style={styles.wrapper}>
|
||||
<LinearProgress style={styles.progress} value={progress} variant='determinate' />
|
||||
<LinearProgress style={styles.progress} mode='determinate' value={progress} />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -71,7 +71,6 @@ table {
|
||||
|
||||
.app {
|
||||
-webkit-user-select: none;
|
||||
-webkit-app-region: drag;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
@@ -143,6 +142,7 @@ table {
|
||||
*/
|
||||
|
||||
.header {
|
||||
-webkit-app-region: drag;
|
||||
background: rgb(40, 40, 40);
|
||||
border-bottom: 1px solid rgb(30, 30, 30);
|
||||
height: 38px; /* vertically center OS menu buttons (OS X) */
|
||||
@@ -354,7 +354,7 @@ textarea,
|
||||
text-shadow: rgba(0, 0, 0, 0.5) 0 0 4px;
|
||||
}
|
||||
|
||||
.torrent .metadata .ellipsis > span:not(:last-child):not(.control)::after {
|
||||
.torrent .metadata span:not(:last-child)::after {
|
||||
content: ' • ';
|
||||
opacity: 0.7;
|
||||
padding-left: 4px;
|
||||
|
||||
Reference in New Issue
Block a user