Compare commits
1 Commits
renovate_n
...
fix-dep
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9749b43cfa |
13170
package-lock.json
generated
13170
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -22,6 +22,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@electron/remote": "2.0.8",
|
||||
"@material-ui/core": "4.12.4",
|
||||
"airplayer": "github:webtorrent/airplayer#fix-security",
|
||||
"application-config": "2.0.0",
|
||||
"arch": "2.2.0",
|
||||
@@ -39,7 +40,6 @@
|
||||
"iso-639-1": "2.1.15",
|
||||
"languagedetect": "2.0.0",
|
||||
"location-history": "1.1.2",
|
||||
"material-ui": "0.20.2",
|
||||
"music-metadata": "7.13.0",
|
||||
"network-address": "1.1.2",
|
||||
"parse-torrent": "9.1.5",
|
||||
@@ -81,7 +81,7 @@
|
||||
"tape": "5.6.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^16.0.0",
|
||||
"node": "^16.0.0 || ^18.0.0",
|
||||
"npm": "^7.10.0 || ^8.0.0"
|
||||
},
|
||||
"homepage": "https://webtorrent.io",
|
||||
@@ -113,10 +113,12 @@
|
||||
"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": "standard && depcheck --ignores=standard,@babel/eslint-parser --ignore-dirs=build,dist",
|
||||
"test": "npm run lint && 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/"
|
||||
|
||||
@@ -16,6 +16,7 @@ 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 colors = require('material-ui/styles/colors')
|
||||
const grey = require('@material-ui/core/colors/grey').default
|
||||
|
||||
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: colors.grey100,
|
||||
color: grey['100'],
|
||||
fontSize: 20,
|
||||
marginBottom: 15,
|
||||
marginTop: 30
|
||||
|
||||
@@ -1,26 +1,28 @@
|
||||
const React = require('react')
|
||||
const FlatButton = require('material-ui/FlatButton').default
|
||||
const RaisedButton = require('material-ui/RaisedButton').default
|
||||
const Button = require('@material-ui/core/Button').default
|
||||
|
||||
module.exports = class ModalOKCancel extends React.Component {
|
||||
render () {
|
||||
const cancelStyle = { marginRight: 10, color: 'black' }
|
||||
const { cancelText, onCancel, okText, onOK } = this.props
|
||||
const { cancelText, color = 'primary', onCancel, okText, onOK } = this.props
|
||||
return (
|
||||
<div className='float-right'>
|
||||
<FlatButton
|
||||
<Button
|
||||
className='control cancel'
|
||||
style={cancelStyle}
|
||||
label={cancelText}
|
||||
onClick={onCancel}
|
||||
/>
|
||||
<RaisedButton
|
||||
className='control ok'
|
||||
primary
|
||||
label={okText}
|
||||
onClick={onOK}
|
||||
style={cancelStyle}
|
||||
>
|
||||
{cancelText}
|
||||
</Button>
|
||||
<Button
|
||||
autoFocus
|
||||
/>
|
||||
className='control ok'
|
||||
onClick={onOK}
|
||||
color={color}
|
||||
variant='contained'
|
||||
>
|
||||
{okText}
|
||||
</Button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const React = require('react')
|
||||
const TextField = require('material-ui/TextField').default
|
||||
const TextField = require('@material-ui/core/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 RaisedButton = require('material-ui/RaisedButton').default
|
||||
const TextField = require('material-ui/TextField').default
|
||||
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
|
||||
|
||||
// Lets you pick a file or directory.
|
||||
// Uses the system Open File dialog.
|
||||
@@ -53,10 +53,8 @@ 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 || ''
|
||||
@@ -70,13 +68,20 @@ class PathSelector extends React.Component {
|
||||
{this.props.title}:
|
||||
</div>
|
||||
<TextField
|
||||
className='control' disabled id={id} value={text}
|
||||
inputStyle={textareaStyle} style={textFieldStyle}
|
||||
className='control'
|
||||
disabled
|
||||
id={id}
|
||||
style={textFieldStyle}
|
||||
value={text}
|
||||
/>
|
||||
<RaisedButton
|
||||
className='control' label='Change' onClick={this.handleClick}
|
||||
<Button
|
||||
className='control'
|
||||
onClick={this.handleClick}
|
||||
style={buttonStyle}
|
||||
/>
|
||||
variant='contained'
|
||||
>
|
||||
Change
|
||||
</Button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ 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 RaisedButton = require('material-ui/RaisedButton').default
|
||||
const Button = require('@material-ui/core/Button').default
|
||||
|
||||
class ShowMore extends React.Component {
|
||||
static get propTypes () {
|
||||
@@ -42,11 +42,13 @@ class ShowMore extends React.Component {
|
||||
return (
|
||||
<div className='show-more' style={this.props.style}>
|
||||
{this.state.expanded ? this.props.children : null}
|
||||
<RaisedButton
|
||||
<Button
|
||||
className='control'
|
||||
onClick={this.handleClick}
|
||||
label={label}
|
||||
/>
|
||||
variant='contained'
|
||||
>
|
||||
{label}
|
||||
</Button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
const colors = require('material-ui/styles/colors')
|
||||
const createGetter = require('fn-getter')
|
||||
const React = require('react')
|
||||
|
||||
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 { 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 Header = require('../components/header')
|
||||
|
||||
@@ -33,17 +32,8 @@ const fontFamily = process.platform === 'win32'
|
||||
? '"Segoe UI", sans-serif'
|
||||
: 'BlinkMacSystemFont, "Helvetica Neue", Helvetica, sans-serif'
|
||||
|
||||
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
|
||||
let darkTheme
|
||||
let lightTheme
|
||||
|
||||
class App extends React.Component {
|
||||
render () {
|
||||
@@ -64,19 +54,66 @@ class App extends React.Component {
|
||||
if (state.window.isFocused) cls.push('is-focused')
|
||||
if (hideControls) cls.push('hide-video-controls')
|
||||
|
||||
if (!darkMuiTheme) {
|
||||
darkMuiTheme = getMuiTheme(darkBaseTheme)
|
||||
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
|
||||
})
|
||||
}
|
||||
|
||||
return (
|
||||
<MuiThemeProvider muiTheme={darkMuiTheme}>
|
||||
<ThemeProvider theme={darkTheme}>
|
||||
<div className={'app ' + cls.join(' ')}>
|
||||
<Header state={state} />
|
||||
{this.getErrorPopover()}
|
||||
<div key='content' className='content'>{this.getView()}</div>
|
||||
{this.getModal()}
|
||||
</div>
|
||||
</MuiThemeProvider>
|
||||
</ThemeProvider>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -102,23 +139,32 @@ class App extends React.Component {
|
||||
const state = this.props.state
|
||||
if (!state.modal) return
|
||||
|
||||
if (!lightMuiTheme) {
|
||||
const lightBaseTheme = require('material-ui/styles/baseThemes/lightBaseTheme').default
|
||||
lightBaseTheme.fontFamily = fontFamily
|
||||
lightBaseTheme.userAgent = false
|
||||
lightMuiTheme = getMuiTheme(lightBaseTheme)
|
||||
if (!lightTheme) {
|
||||
lightTheme = createTheme({
|
||||
palette: {
|
||||
secondary: {
|
||||
main: red.A200
|
||||
},
|
||||
type: 'light'
|
||||
},
|
||||
typography: {
|
||||
fontFamily
|
||||
}
|
||||
}, {
|
||||
userAgent: false
|
||||
})
|
||||
}
|
||||
|
||||
const ModalContents = Modals[state.modal.id]()
|
||||
return (
|
||||
<MuiThemeProvider muiTheme={lightMuiTheme}>
|
||||
<ThemeProvider theme={lightTheme}>
|
||||
<div key='modal' className='modal'>
|
||||
<div key='modal-background' className='modal-background' />
|
||||
<div key='modal-content' className='modal-content'>
|
||||
<ModalContents state={state} />
|
||||
</div>
|
||||
</div>
|
||||
</MuiThemeProvider>
|
||||
</ThemeProvider>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -3,17 +3,16 @@ const path = require('path')
|
||||
const prettyBytes = require('prettier-bytes')
|
||||
const React = require('react')
|
||||
|
||||
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 Button = require('@material-ui/core/Button').default
|
||||
const TextField = require('@material-ui/core/TextField').default
|
||||
const Checkbox = require('@material-ui/core/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 {
|
||||
@@ -99,20 +98,23 @@ class CreateTorrentPage extends React.Component {
|
||||
{this.renderAdvanced()}
|
||||
</ShowMore>
|
||||
<div className='float-right'>
|
||||
<FlatButton
|
||||
<Button
|
||||
className='control cancel'
|
||||
label='Cancel'
|
||||
onClick={dispatcher('cancel')}
|
||||
style={{
|
||||
marginRight: 10
|
||||
}}
|
||||
onClick={dispatcher('cancel')}
|
||||
/>
|
||||
<RaisedButton
|
||||
>
|
||||
Cancel
|
||||
</Button>
|
||||
<Button
|
||||
className='control create-torrent-button'
|
||||
label='Create Torrent'
|
||||
primary
|
||||
onClick={this.handleSubmit}
|
||||
/>
|
||||
color='primary'
|
||||
variant='contained'
|
||||
>
|
||||
Create Torrent
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
@@ -134,10 +136,6 @@ 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'>
|
||||
@@ -146,34 +144,32 @@ class CreateTorrentPage extends React.Component {
|
||||
className='torrent-is-private control'
|
||||
style={{ display: '' }}
|
||||
checked={this.state.isPrivate}
|
||||
onCheck={this.handleSetIsPrivate}
|
||||
onChange={this.handleSetIsPrivate}
|
||||
/>
|
||||
</div>
|
||||
<div key='trackers' className='torrent-attribute'>
|
||||
<label>Trackers:</label>
|
||||
<TextField
|
||||
className='torrent-trackers control'
|
||||
style={textFieldStyle}
|
||||
textareaStyle={textareaStyle}
|
||||
multiLine
|
||||
rows={2}
|
||||
rowsMax={10}
|
||||
value={this.state.trackers}
|
||||
fullWidth
|
||||
maxRows={10}
|
||||
minRows={2}
|
||||
multiline
|
||||
onChange={this.handleSetTrackers}
|
||||
value={this.state.trackers}
|
||||
/>
|
||||
</div>
|
||||
<div key='comment' className='torrent-attribute'>
|
||||
<label>Comment:</label>
|
||||
<TextField
|
||||
className='torrent-comment control'
|
||||
style={textFieldStyle}
|
||||
textareaStyle={textareaStyle}
|
||||
hintText='Optionally describe your torrent...'
|
||||
multiLine
|
||||
rows={2}
|
||||
rowsMax={10}
|
||||
value={this.state.comment}
|
||||
fullWidth
|
||||
maxRows={10}
|
||||
minRows={2}
|
||||
multiline
|
||||
onChange={this.handleSetComment}
|
||||
placeholder='Optionally describe your torrent...'
|
||||
value={this.state.comment}
|
||||
/>
|
||||
</div>
|
||||
<div key='files' className='torrent-attribute'>
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
const React = require('react')
|
||||
const PropTypes = require('prop-types')
|
||||
|
||||
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 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 Heading = require('../components/heading')
|
||||
const PathSelector = require('../components/path-selector')
|
||||
|
||||
@@ -63,11 +65,15 @@ class PreferencesPage extends React.Component {
|
||||
openExternalPlayerCheckbox () {
|
||||
return (
|
||||
<Preference>
|
||||
<Checkbox
|
||||
className='control'
|
||||
checked={!this.props.state.saved.prefs.openExternalPlayer}
|
||||
<FormControlLabel
|
||||
control={
|
||||
<Checkbox
|
||||
className='control'
|
||||
checked={!this.props.state.saved.prefs.openExternalPlayer}
|
||||
onChange={this.handleOpenExternalPlayerChange}
|
||||
/>
|
||||
}
|
||||
label='Play torrent media files using WebTorrent'
|
||||
onCheck={this.handleOpenExternalPlayerChange}
|
||||
/>
|
||||
</Preference>
|
||||
)
|
||||
@@ -80,11 +86,15 @@ class PreferencesPage extends React.Component {
|
||||
highestPlaybackPriorityCheckbox () {
|
||||
return (
|
||||
<Preference>
|
||||
<Checkbox
|
||||
className='control'
|
||||
checked={this.props.state.saved.prefs.highestPlaybackPriority}
|
||||
<FormControlLabel
|
||||
control={
|
||||
<Checkbox
|
||||
className='control'
|
||||
checked={this.props.state.saved.prefs.highestPlaybackPriority}
|
||||
onChange={this.handleHighestPlaybackPriorityChange}
|
||||
/>
|
||||
}
|
||||
label='Highest Playback Priority'
|
||||
onCheck={this.handleHighestPlaybackPriorityChange}
|
||||
/>
|
||||
<p>Pauses all active torrents to allow playback to use all of the available bandwidth.</p>
|
||||
</Preference>
|
||||
@@ -126,11 +136,15 @@ class PreferencesPage extends React.Component {
|
||||
autoAddTorrentsCheckbox () {
|
||||
return (
|
||||
<Preference>
|
||||
<Checkbox
|
||||
className='control'
|
||||
checked={this.props.state.saved.prefs.autoAddTorrents}
|
||||
<FormControlLabel
|
||||
control={
|
||||
<Checkbox
|
||||
className='control'
|
||||
checked={this.props.state.saved.prefs.autoAddTorrents}
|
||||
onChange={(e, value) => { this.handleAutoAddTorrentsChange(e, value) }}
|
||||
/>
|
||||
}
|
||||
label='Watch for new .torrent files and add them immediately'
|
||||
onCheck={(e, value) => { this.handleAutoAddTorrentsChange(e, value) }}
|
||||
/>
|
||||
</Preference>
|
||||
)
|
||||
@@ -188,11 +202,13 @@ class PreferencesPage extends React.Component {
|
||||
return (
|
||||
<Preference>
|
||||
<p>WebTorrent is not currently the default torrent app.</p>
|
||||
<RaisedButton
|
||||
<Button
|
||||
className='control'
|
||||
onClick={this.handleSetDefaultApp}
|
||||
label='Make WebTorrent the default'
|
||||
/>
|
||||
variant='contained'
|
||||
>
|
||||
Make WebTorrent the default
|
||||
</Button>
|
||||
</Preference>
|
||||
)
|
||||
}
|
||||
@@ -208,11 +224,15 @@ class PreferencesPage extends React.Component {
|
||||
|
||||
return (
|
||||
<Preference>
|
||||
<Checkbox
|
||||
className='control'
|
||||
checked={this.props.state.saved.prefs.startup}
|
||||
<FormControlLabel
|
||||
control={
|
||||
<Checkbox
|
||||
className='control'
|
||||
checked={this.props.state.saved.prefs.startup}
|
||||
onChange={this.handleStartupChange}
|
||||
/>
|
||||
}
|
||||
label='Open WebTorrent on startup'
|
||||
onCheck={this.handleStartupChange}
|
||||
/>
|
||||
</Preference>
|
||||
)
|
||||
@@ -221,11 +241,15 @@ class PreferencesPage extends React.Component {
|
||||
soundNotificationsCheckbox () {
|
||||
return (
|
||||
<Preference>
|
||||
<Checkbox
|
||||
className='control'
|
||||
checked={this.props.state.saved.prefs.soundNotifications}
|
||||
<FormControlLabel
|
||||
control={
|
||||
<Checkbox
|
||||
className='control'
|
||||
checked={this.props.state.saved.prefs.soundNotifications}
|
||||
onChange={this.handleSoundNotificationsChange}
|
||||
/>
|
||||
}
|
||||
label='Enable sounds'
|
||||
onCheck={this.handleSoundNotificationsChange}
|
||||
/>
|
||||
</Preference>
|
||||
)
|
||||
@@ -240,21 +264,16 @@ 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'
|
||||
style={textFieldStyle}
|
||||
textareaStyle={textareaStyle}
|
||||
multiLine
|
||||
rows={2}
|
||||
rowsMax={10}
|
||||
value={this.state.globalTrackers}
|
||||
fullWidth
|
||||
maxRows={10}
|
||||
minRows={2}
|
||||
multiline
|
||||
onChange={this.handleSetGlobalTrackers}
|
||||
value={this.state.globalTrackers}
|
||||
/>
|
||||
</Preference>
|
||||
)
|
||||
@@ -274,7 +293,7 @@ class PreferencesPage extends React.Component {
|
||||
|
||||
render () {
|
||||
const style = {
|
||||
color: colors.grey400,
|
||||
color: grey['400'],
|
||||
marginLeft: 25,
|
||||
marginRight: 25
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
const React = require('react')
|
||||
const prettyBytes = require('prettier-bytes')
|
||||
|
||||
const Checkbox = require('material-ui/Checkbox').default
|
||||
const LinearProgress = require('material-ui/LinearProgress').default
|
||||
const Checkbox = require('@material-ui/core/Checkbox').default
|
||||
const LinearProgress = require('@material-ui/core/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
|
||||
key='download-button'
|
||||
checked={isActive}
|
||||
className={'control download ' + torrentSummary.status}
|
||||
key='download-button'
|
||||
onChange={dispatcher('toggleTorrent', infoHash)}
|
||||
onClick={stopPropagation}
|
||||
style={{
|
||||
display: 'inline-block',
|
||||
width: 32
|
||||
marginRight: '12px',
|
||||
'& .MuiSvgIconRoot': {
|
||||
width: '20px',
|
||||
height: '20px'
|
||||
}
|
||||
}}
|
||||
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} mode='determinate' value={progress} />
|
||||
<LinearProgress style={styles.progress} value={progress} variant='determinate' />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -354,7 +354,7 @@ textarea,
|
||||
text-shadow: rgba(0, 0, 0, 0.5) 0 0 4px;
|
||||
}
|
||||
|
||||
.torrent .metadata span:not(:last-child)::after {
|
||||
.torrent .metadata .ellipsis > span:not(:last-child):not(.control)::after {
|
||||
content: ' • ';
|
||||
opacity: 0.7;
|
||||
padding-left: 4px;
|
||||
|
||||
Reference in New Issue
Block a user