diff --git a/appveyor.yml b/appveyor.yml
index 8413b8ff6..00cb791ce 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -56,4 +56,5 @@ only_commits:
- appveyor.yml
- build.sh
- test.sh
+ - package.json
- appveyor-package.sh
diff --git a/frontend/gulp/webpack.js b/frontend/gulp/webpack.js
index 5faec4c87..50aefcc1a 100644
--- a/frontend/gulp/webpack.js
+++ b/frontend/gulp/webpack.js
@@ -5,6 +5,7 @@ const path = require('path');
const webpack = require('webpack');
const errorHandler = require('./helpers/errorHandler');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
+const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
const uiFolder = 'UI';
const root = path.join(__dirname, '..', 'src');
@@ -27,19 +28,49 @@ const extractCSSPlugin = new ExtractTextPlugin({
ignoreOrder: true
});
+const plugins = [
+ extractCSSPlugin,
+
+ new webpack.optimize.CommonsChunkPlugin({
+ name: 'vendor'
+ }),
+
+ new webpack.DefinePlugin({
+ __DEV__: !isProduction,
+ 'process.env.NODE_ENV': isProduction ? JSON.stringify('production') : JSON.stringify('development')
+ })
+];
+
+if (isProduction) {
+ plugins.push(new UglifyJSPlugin({
+ sourceMap: true,
+ uglifyOptions: {
+ mangle: false,
+ output: {
+ comments: false,
+ beautify: true
+ }
+ }
+ }));
+}
+
const config = {
devtool: '#source-map',
+
stats: {
children: false
},
+
watchOptions: {
ignored: /node_modules/
},
+
entry: {
preload: 'preload.js',
vendor: 'vendor.js',
index: 'index.js'
},
+
resolve: {
modules: [
root,
@@ -50,35 +81,21 @@ const config = {
jquery: 'jquery/src/jquery'
}
},
+
output: {
filename: path.join('_output', uiFolder, '[name].js'),
sourceMapFilename: '[file].map'
},
- plugins: [
- extractCSSPlugin,
- new webpack.optimize.CommonsChunkPlugin({
- name: 'vendor'
- }),
-
- new webpack.DefinePlugin({
- __DEV__: !isProduction,
- 'process.env': {
- NODE_ENV: isProduction ? JSON.stringify('production') : JSON.stringify('development')
- }
- })
- ],
+
+ plugins,
+
resolveLoader: {
modules: [
'node_modules',
'frontend/gulp/webpack/'
]
},
- // TODO: Do we need this loader?
- // eslint: {
- // formatter: function(results) {
- // return JSON.stringify(results);
- // }
- // },
+
module: {
rules: [
{
diff --git a/frontend/src/Activity/Blacklist/BlacklistRow.css b/frontend/src/Activity/Blacklist/BlacklistRow.css
index 030dfe98a..b62d1e750 100644
--- a/frontend/src/Activity/Blacklist/BlacklistRow.css
+++ b/frontend/src/Activity/Blacklist/BlacklistRow.css
@@ -11,8 +11,8 @@
width: 80px;
}
-.details {
+.actions {
composes: cell from 'Components/Table/Cells/TableRowCell.css';
- width: 30px;
+ width: 70px;
}
diff --git a/frontend/src/Activity/Blacklist/BlacklistRow.js b/frontend/src/Activity/Blacklist/BlacklistRow.js
index f67e69723..f766ca1ad 100644
--- a/frontend/src/Activity/Blacklist/BlacklistRow.js
+++ b/frontend/src/Activity/Blacklist/BlacklistRow.js
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import React, { Component } from 'react';
-import { icons } from 'Helpers/Props';
+import { icons, kinds } from 'Helpers/Props';
import IconButton from 'Components/Link/IconButton';
import RelativeDateCellConnector from 'Components/Table/Cells/RelativeDateCellConnector';
import TableRow from 'Components/Table/TableRow';
@@ -48,7 +48,8 @@ class BlacklistRow extends Component {
protocol,
indexer,
message,
- columns
+ columns,
+ onRemovePress
} = this.props;
return (
@@ -129,16 +130,21 @@ class BlacklistRow extends Component {
);
}
- if (name === 'details') {
+ if (name === 'actions') {
return (
+
);
}
@@ -171,7 +177,8 @@ BlacklistRow.propTypes = {
protocol: PropTypes.string.isRequired,
indexer: PropTypes.string,
message: PropTypes.string,
- columns: PropTypes.arrayOf(PropTypes.object).isRequired
+ columns: PropTypes.arrayOf(PropTypes.object).isRequired,
+ onRemovePress: PropTypes.func.isRequired
};
export default BlacklistRow;
diff --git a/frontend/src/Activity/Blacklist/BlacklistRowConnector.js b/frontend/src/Activity/Blacklist/BlacklistRowConnector.js
index f4f9217bf..a85f1f78b 100644
--- a/frontend/src/Activity/Blacklist/BlacklistRowConnector.js
+++ b/frontend/src/Activity/Blacklist/BlacklistRowConnector.js
@@ -1,6 +1,7 @@
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import createArtistSelector from 'Store/Selectors/createArtistSelector';
+import { removeFromBlacklist } from 'Store/Actions/blacklistActions';
import BlacklistRow from './BlacklistRow';
function createMapStateToProps() {
@@ -14,4 +15,12 @@ function createMapStateToProps() {
);
}
-export default connect(createMapStateToProps)(BlacklistRow);
+function createMapDispatchToProps(dispatch, props) {
+ return {
+ onRemovePress() {
+ dispatch(removeFromBlacklist({ id: props.id }));
+ }
+ };
+}
+
+export default connect(createMapStateToProps, createMapDispatchToProps)(BlacklistRow);
diff --git a/frontend/src/AddArtist/ImportArtist/SelectFolder/ImportArtistSelectFolder.js b/frontend/src/AddArtist/ImportArtist/SelectFolder/ImportArtistSelectFolder.js
index 19cbe682c..c186469e8 100644
--- a/frontend/src/AddArtist/ImportArtist/SelectFolder/ImportArtistSelectFolder.js
+++ b/frontend/src/AddArtist/ImportArtist/SelectFolder/ImportArtistSelectFolder.js
@@ -106,9 +106,7 @@ class ImportArtistSelectFolder extends Component {
{
items.length > 0 ?
-