Basic UI and addition of SortableJS
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -38,7 +38,7 @@
|
||||
|
||||
// Release details
|
||||
// These are automatically injected to built HTML
|
||||
var build = "1513798726";
|
||||
var build = "1513886354";
|
||||
var version = "3.9.0";
|
||||
|
||||
// Construct the script tag
|
||||
|
||||
98
package.json
98
package.json
@ -1,50 +1,52 @@
|
||||
{
|
||||
"name": "mopidy-iris",
|
||||
"version": "3.9.0",
|
||||
"description": "Mopidy HTTP interface",
|
||||
"repository": "https://github.com/jaedb/iris",
|
||||
"author": "James Barnsley <james@barnsley.nz>",
|
||||
"license": "ISC",
|
||||
"bugs": {
|
||||
"url": "https://github.com/jaedb/Iris/issues"
|
||||
},
|
||||
"main": "app.js",
|
||||
"dependencies": {
|
||||
"babel-core": "^6.26.0",
|
||||
"babel-loader": "^7.1.2",
|
||||
"babel-preset-es2015": "^6.22.0",
|
||||
"babel-preset-react": "^6.22.0",
|
||||
"babel-preset-stage-0": "^6.24.1",
|
||||
"babel-preset-stage-2": "^6.22.0",
|
||||
"copy-dir": "^0.3.0",
|
||||
"css-loader": "^0.28.7",
|
||||
"expose-loader": "0.7.3",
|
||||
"extract-text-webpack-plugin": "3.0.0",
|
||||
"file-loader": "^0.11.2",
|
||||
"flux": "^3.1.3",
|
||||
"jquery": "^3.2.1",
|
||||
"mopidy": "^0.5.0",
|
||||
"node-sass": "^4.5.3",
|
||||
"react": "^15.6.2",
|
||||
"react-dom": "^15.6.2",
|
||||
"react-fontawesome": "*",
|
||||
"react-ga": "^2.3.4",
|
||||
"react-lazyload": "2.2.7",
|
||||
"react-redux": "^5.0.6",
|
||||
"react-router": "^3.2.0",
|
||||
"redux": "3.7.2",
|
||||
"redux-devtools": "3.4.0",
|
||||
"redux-thunk": "2.2.0",
|
||||
"sass-loader": "^6.0.6",
|
||||
"style-loader": "^0.13.2",
|
||||
"url-loader": "^0.5.9",
|
||||
"webpack": "^3.6.0",
|
||||
"webpack-strip": "0.1.0"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "node build_tools/build.js",
|
||||
"dev": "node build_tools/build.js && NODE_ENV=development webpack --watch",
|
||||
"prod": "node build_tools/build.js && NODE_ENV=development webpack && NODE_ENV=production webpack --watch",
|
||||
"release": "node build_tools/build.js && NODE_ENV=production webpack && NODE_ENV=development webpack && python setup.py sdist upload -r pypi && build_tools/release.sh"
|
||||
}
|
||||
"name": "mopidy-iris",
|
||||
"version": "3.9.0",
|
||||
"description": "Mopidy HTTP interface",
|
||||
"repository": "https://github.com/jaedb/iris",
|
||||
"author": "James Barnsley <james@barnsley.nz>",
|
||||
"license": "ISC",
|
||||
"bugs": {
|
||||
"url": "https://github.com/jaedb/Iris/issues"
|
||||
},
|
||||
"main": "app.js",
|
||||
"dependencies": {
|
||||
"babel-core": "^6.26.0",
|
||||
"babel-loader": "^7.1.2",
|
||||
"babel-preset-es2015": "^6.22.0",
|
||||
"babel-preset-react": "^6.22.0",
|
||||
"babel-preset-stage-0": "^6.24.1",
|
||||
"babel-preset-stage-2": "^6.22.0",
|
||||
"copy-dir": "^0.3.0",
|
||||
"css-loader": "^0.28.7",
|
||||
"expose-loader": "0.7.3",
|
||||
"extract-text-webpack-plugin": "3.0.0",
|
||||
"file-loader": "^0.11.2",
|
||||
"flux": "^3.1.3",
|
||||
"jquery": "^3.2.1",
|
||||
"mopidy": "^0.5.0",
|
||||
"node-sass": "^4.5.3",
|
||||
"react": "^15.6.2",
|
||||
"react-dom": "^15.6.2",
|
||||
"react-fontawesome": "*",
|
||||
"react-ga": "^2.3.4",
|
||||
"react-lazyload": "2.2.7",
|
||||
"react-redux": "^5.0.6",
|
||||
"react-router": "^3.2.0",
|
||||
"react-sortablejs": "^1.3.6",
|
||||
"redux": "3.7.2",
|
||||
"redux-devtools": "3.4.0",
|
||||
"redux-thunk": "2.2.0",
|
||||
"sass-loader": "^6.0.6",
|
||||
"sortablejs": "^1.7.0",
|
||||
"style-loader": "^0.13.2",
|
||||
"url-loader": "^0.5.9",
|
||||
"webpack": "^3.6.0",
|
||||
"webpack-strip": "0.1.0"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "node build_tools/build.js",
|
||||
"dev": "node build_tools/build.js && NODE_ENV=development webpack --watch",
|
||||
"prod": "node build_tools/build.js && NODE_ENV=development webpack && NODE_ENV=production webpack --watch",
|
||||
"release": "node build_tools/build.js && NODE_ENV=production webpack && NODE_ENV=development webpack && python setup.py sdist upload -r pypi && build_tools/release.sh"
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
|
||||
import React, { PropTypes } from 'react'
|
||||
import FontAwesome from 'react-fontawesome'
|
||||
import Sortable from 'react-sortablejs';
|
||||
|
||||
import Icon from '../Icon'
|
||||
import * as helpers from '../../helpers'
|
||||
@ -10,7 +11,8 @@ export default class SearchURISchemesModal extends React.Component{
|
||||
constructor(props){
|
||||
super(props)
|
||||
this.state = {
|
||||
schemes: []
|
||||
schemes: [],
|
||||
available_schemes: this.props.available_uri_schemes
|
||||
}
|
||||
}
|
||||
|
||||
@ -43,24 +45,31 @@ export default class SearchURISchemesModal extends React.Component{
|
||||
<h2 className="grey-text bottom-padding">Customise the providers used when searching. Reduce the number of providers to speed up your searches. Please note that not all backends support searching by artist, album or playlist.</h2>
|
||||
|
||||
<form onSubmit={e => this.handleSubmit(e)}>
|
||||
<div className="list small">
|
||||
{
|
||||
this.props.available_uri_schemes.map(scheme => {
|
||||
return (
|
||||
<div className="list-item field checkbox white" key={scheme}>
|
||||
<label>
|
||||
<input
|
||||
type="checkbox"
|
||||
name={scheme}
|
||||
checked={this.state.schemes.indexOf(scheme) > -1}
|
||||
onChange={ e => this.handleToggle(scheme)} />
|
||||
<span className="label">{scheme.replace(':','')} <FontAwesome className="grey-text" name={helpers.sourceIcon(scheme)} /></span>
|
||||
</label>
|
||||
</div>
|
||||
)
|
||||
})
|
||||
}
|
||||
</div>
|
||||
<Sortable
|
||||
className="list"
|
||||
onChange={(order, sortable, e) => {
|
||||
this.setState({schemes: order})
|
||||
}}>
|
||||
{
|
||||
this.state.schemes.map(scheme => {
|
||||
return (
|
||||
<div
|
||||
className="list-item field checkbox white"
|
||||
key={scheme}
|
||||
data-id={scheme}>
|
||||
<label>
|
||||
<input
|
||||
type="checkbox"
|
||||
name={scheme}
|
||||
checked={this.state.schemes.indexOf(scheme) > -1}
|
||||
onChange={ e => this.handleToggle(scheme)} />
|
||||
<span className="label">{scheme.replace(':','')} <FontAwesome className="grey-text" name={helpers.sourceIcon(scheme)} /></span>
|
||||
</label>
|
||||
</div>
|
||||
)
|
||||
})
|
||||
}
|
||||
</Sortable>
|
||||
|
||||
<div className="actions centered-text">
|
||||
<button type="submit" className="primary wide">Save</button>
|
||||
|
||||
Reference in New Issue
Block a user