about summary refs log tree commit diff
path: root/app/javascript
diff options
context:
space:
mode:
Diffstat (limited to 'app/javascript')
-rw-r--r--app/javascript/mastodon/api.js2
-rw-r--r--app/javascript/mastodon/features/introduction/index.js4
-rw-r--r--app/javascript/mastodon/features/ui/containers/columns_area_container.js2
-rw-r--r--app/javascript/mastodon/features/ui/containers/loading_bar_container.js4
-rw-r--r--app/javascript/mastodon/features/ui/index.js2
-rw-r--r--app/javascript/mastodon/link_header.js33
-rw-r--r--app/javascript/mastodon/store/configureStore.js2
7 files changed, 8 insertions, 41 deletions
diff --git a/app/javascript/mastodon/api.js b/app/javascript/mastodon/api.js
index 0be08d7fd..4be3eadb0 100644
--- a/app/javascript/mastodon/api.js
+++ b/app/javascript/mastodon/api.js
@@ -1,6 +1,6 @@
 import axios from 'axios';
+import LinkHeader from 'http-link-header';
 import ready from './ready';
-import LinkHeader from './link_header';
 
 export const getLinks = response => {
   const value = response.headers.link;
diff --git a/app/javascript/mastodon/features/introduction/index.js b/app/javascript/mastodon/features/introduction/index.js
index 6e0617f72..e712b2f7d 100644
--- a/app/javascript/mastodon/features/introduction/index.js
+++ b/app/javascript/mastodon/features/introduction/index.js
@@ -98,8 +98,8 @@ FrameInteractions.propTypes = {
   onNext: PropTypes.func.isRequired,
 };
 
-@connect(state => ({ domain: state.getIn(['meta', 'domain']) }))
-export default class Introduction extends React.PureComponent {
+export default @connect(state => ({ domain: state.getIn(['meta', 'domain']) }))
+class Introduction extends React.PureComponent {
 
   static propTypes = {
     domain: PropTypes.string.isRequired,
diff --git a/app/javascript/mastodon/features/ui/containers/columns_area_container.js b/app/javascript/mastodon/features/ui/containers/columns_area_container.js
index f3e82a8ac..42b9e4824 100644
--- a/app/javascript/mastodon/features/ui/containers/columns_area_container.js
+++ b/app/javascript/mastodon/features/ui/containers/columns_area_container.js
@@ -6,4 +6,4 @@ const mapStateToProps = state => ({
   isModalOpen: !!state.get('modal').modalType,
 });
 
-export default connect(mapStateToProps, null, null, { withRef: true })(ColumnsArea);
+export default connect(mapStateToProps, null, null, { forwardRef: true })(ColumnsArea);
diff --git a/app/javascript/mastodon/features/ui/containers/loading_bar_container.js b/app/javascript/mastodon/features/ui/containers/loading_bar_container.js
index 4bb90fb68..63e994f92 100644
--- a/app/javascript/mastodon/features/ui/containers/loading_bar_container.js
+++ b/app/javascript/mastodon/features/ui/containers/loading_bar_container.js
@@ -1,8 +1,8 @@
 import { connect }    from 'react-redux';
 import LoadingBar from 'react-redux-loading-bar';
 
-const mapStateToProps = (state) => ({
-  loading: state.get('loadingBar'),
+const mapStateToProps = (state, ownProps) => ({
+  loading: state.get('loadingBar')[ownProps.scope || 'default'],
 });
 
 export default connect(mapStateToProps)(LoadingBar.WrappedComponent);
diff --git a/app/javascript/mastodon/features/ui/index.js b/app/javascript/mastodon/features/ui/index.js
index cc192fe10..cb88e538a 100644
--- a/app/javascript/mastodon/features/ui/index.js
+++ b/app/javascript/mastodon/features/ui/index.js
@@ -134,7 +134,7 @@ class SwitchingColumnsArea extends React.PureComponent {
   });
 
   setRef = c => {
-    this.node = c.getWrappedInstance().getWrappedInstance();
+    this.node = c.getWrappedInstance();
   }
 
   render () {
diff --git a/app/javascript/mastodon/link_header.js b/app/javascript/mastodon/link_header.js
deleted file mode 100644
index a3e7ccf1c..000000000
--- a/app/javascript/mastodon/link_header.js
+++ /dev/null
@@ -1,33 +0,0 @@
-import Link from 'http-link-header';
-import querystring from 'querystring';
-
-Link.parseAttrs = (link, parts) => {
-  let match = null;
-  let attr  = '';
-  let value = '';
-  let attrs = '';
-
-  let uriAttrs = /<(.*)>;\s*(.*)/gi.exec(parts);
-
-  if(uriAttrs) {
-    attrs = uriAttrs[2];
-    link  = Link.parseParams(link, uriAttrs[1]);
-  }
-
-  while(match = Link.attrPattern.exec(attrs)) { // eslint-disable-line no-cond-assign
-    attr  = match[1].toLowerCase();
-    value = match[4] || match[3] || match[2];
-
-    if( /\*$/.test(attr)) {
-      Link.setAttr(link, attr, Link.parseExtendedValue(value));
-    } else if(/%/.test(value)) {
-      Link.setAttr(link, attr, querystring.decode(value));
-    } else {
-      Link.setAttr(link, attr, value);
-    }
-  }
-
-  return link;
-};
-
-export default Link;
diff --git a/app/javascript/mastodon/store/configureStore.js b/app/javascript/mastodon/store/configureStore.js
index 1376d4cba..7e7472841 100644
--- a/app/javascript/mastodon/store/configureStore.js
+++ b/app/javascript/mastodon/store/configureStore.js
@@ -11,5 +11,5 @@ export default function configureStore() {
     loadingBarMiddleware({ promiseTypeSuffixes: ['REQUEST', 'SUCCESS', 'FAIL'] }),
     errorsMiddleware(),
     soundsMiddleware()
-  ), window.devToolsExtension ? window.devToolsExtension() : f => f));
+  ), window.__REDUX_DEVTOOLS_EXTENSION__ ? window.__REDUX_DEVTOOLS_EXTENSION__() : f => f));
 };