about summary refs log tree commit diff
path: root/app/javascript
diff options
context:
space:
mode:
authorSurinna Curtis <ekiru.0@gmail.com>2017-07-03 00:07:18 -0500
committerGô Shoemake <marrus-sh@users.noreply.github.com>2017-07-04 21:33:53 -0700
commit6b67b91eb12b3a1529bc603a29f5732367e056a2 (patch)
tree5bb547e78d5eb50970c817f8cae091acf31f3010 /app/javascript
parent6b7742466013696e6a548c8948958c3a6bc26869 (diff)
satisfy eslint
Diffstat (limited to 'app/javascript')
-rw-r--r--app/javascript/mastodon/features/compose/components/advanced_options_dropdown.js20
-rw-r--r--app/javascript/mastodon/reducers/compose.js4
2 files changed, 14 insertions, 10 deletions
diff --git a/app/javascript/mastodon/features/compose/components/advanced_options_dropdown.js b/app/javascript/mastodon/features/compose/components/advanced_options_dropdown.js
index 0bde41877..c077f3172 100644
--- a/app/javascript/mastodon/features/compose/components/advanced_options_dropdown.js
+++ b/app/javascript/mastodon/features/compose/components/advanced_options_dropdown.js
@@ -6,7 +6,7 @@ import Toggle from 'react-toggle';
 import { injectIntl, defineMessages } from 'react-intl';
 
 const messages = defineMessages({
-  local_only_short: { id: 'advanced-options.local-only.short', defaultMessage: 'Local-only'},
+  local_only_short: { id: 'advanced-options.local-only.short', defaultMessage: 'Local-only' },
   local_only_long: { id: 'advanced-options.local-only.long', defaultMessage: 'bla' },
   advanced_options_icon_title: { id: 'advanced_options.icon_title', defaultMessage: 'Advanced options' },
 });
@@ -18,6 +18,7 @@ const iconStyle = {
 
 @injectIntl
 export default class AdvancedOptionsDropdown extends React.PureComponent {
+
   static propTypes = {
     values: ImmutablePropTypes.contains({
       do_not_federate: PropTypes.bool.isRequired,
@@ -27,7 +28,7 @@ export default class AdvancedOptionsDropdown extends React.PureComponent {
   };
 
   onToggleDropdown = () => {
-      this.setState({ open: !this.state.open });
+    this.setState({ open: !this.state.open });
   };
 
   onGlobalClick = (e) => {
@@ -72,11 +73,11 @@ export default class AdvancedOptionsDropdown extends React.PureComponent {
       { icon: 'wifi', shortText: messages.local_only_short,  longText: messages.local_only_long, key: 'do_not_federate' },
     ];
 
-    const anyEnabled = values.some((enabled) => enabled); 
+    const anyEnabled = values.some((enabled) => enabled);
     const optionElems = options.map((option) => {
       const active = values.get(option.key) ? 'active' : '';
       return (
-        <div role='button' className={`advanced-options-dropdown__option`} key={option.key} >
+        <div role='button' className='advanced-options-dropdown__option' key={option.key} >
           <div className='advanced-options-dropdown__option__toggle'>
             <Toggle checked={active} onChange={this.toggleHandler(option.key)} />
           </div>
@@ -88,18 +89,21 @@ export default class AdvancedOptionsDropdown extends React.PureComponent {
       );
     });
 
-    return <div ref={this.setRef} className={`advanced-options-dropdown ${open ?  'open' : ''} ${anyEnabled ? 'active' : ''} `}>
+    return (<div ref={this.setRef} className={`advanced-options-dropdown ${open ?  'open' : ''} ${anyEnabled ? 'active' : ''} `}>
       <div className='advanced-options-dropdown__value'>
-        <IconButton className='advanced-options-dropdown__value'
+        <IconButton
+          className='advanced-options-dropdown__value'
           title={intl.formatMessage(messages.advanced_options_icon_title)}
           icon='ellipsis-h' active={open || anyEnabled}
           size={18}
           style={iconStyle}
-          onClick={this.onToggleDropdown} />
+          onClick={this.onToggleDropdown}
+        />
       </div>
       <div className='advanced-options-dropdown__dropdown'>
         {optionElems}
       </div>
-    </div>;
+    </div>);
   }
+
 }
\ No newline at end of file
diff --git a/app/javascript/mastodon/reducers/compose.js b/app/javascript/mastodon/reducers/compose.js
index ca22f5fbe..a83df62dc 100644
--- a/app/javascript/mastodon/reducers/compose.js
+++ b/app/javascript/mastodon/reducers/compose.js
@@ -31,7 +31,7 @@ import uuid from '../uuid';
 const initialState = Immutable.Map({
   mounted: false,
   advanced_options: Immutable.Map({
-    do_not_federate: false
+    do_not_federate: false,
   }),
   sensitive: false,
   spoiler: false,
@@ -49,7 +49,7 @@ const initialState = Immutable.Map({
   suggestions: Immutable.List(),
   me: null,
   default_advanced_options: Immutable.Map({
-    do_not_federate: false
+    do_not_federate: false,
   }),
   default_privacy: 'public',
   resetFileKey: Math.floor((Math.random() * 0x10000)),