diff --git a/.env b/.env
deleted file mode 100644
index 1d6c8381fb..0000000000
--- a/.env
+++ /dev/null
@@ -1,6 +0,0 @@
-
-STEEMCONNECT_CLIENT_ID=ulogs.app
-STEEMCONNECT_REDIRECT_URL=https://ulogs.org/callback
-STEEMJS_URL=https://api.steemit.com
-SIGNUP_URL=https://signup.steemit.com/?ref=ulogs
-WITNESS_VOTE=https://steemconnect.com/sign/account-witness-vote?witness=steemgigs&approve=true
diff --git a/.gitignore b/.gitignore
index a183f02e40..b3f98e6d41 100644
--- a/.gitignore
+++ b/.gitignore
@@ -38,5 +38,6 @@ build/Release
node_modules
.tern-port
.envrc
+.env
build/
diff --git a/package.json b/package.json
index 2b2ee6ac91..5016e44e4c 100644
--- a/package.json
+++ b/package.json
@@ -56,6 +56,7 @@
"cross-env": "^5.0.5",
"debug": "^4.1.1",
"diff-match-patch": "^1.0.0",
+ "dotenv": "^7.0.0",
"embedjs": "^0.0.11",
"express": "^4.15.4",
"filesize": "^3.5.11",
diff --git a/src/client/Wrapper.js b/src/client/Wrapper.js
index a636ac7a80..81aca8c68e 100644
--- a/src/client/Wrapper.js
+++ b/src/client/Wrapper.js
@@ -5,7 +5,7 @@ import { connect } from 'react-redux';
import { IntlProvider } from 'react-intl';
import { withRouter, Link } from 'react-router-dom';
import { renderRoutes } from 'react-router-config';
-import { Alert, LocaleProvider, Layout } from 'antd';
+import { message, Alert, LocaleProvider, Layout } from 'antd';
import enUS from 'antd/lib/locale-provider/en_US';
import Cookie from 'js-cookie';
import { findLanguage, getRequestLocale, getBrowserLocale, loadLanguage } from './translations';
@@ -188,6 +188,13 @@ export default class Wrapper extends React.PureComponent {
this.props.setUsedLocale(lang);
}
+ /*
+ * Display a coming soon message when user clicks on any "Click Here" button
+ */
+ messageComingSoon = () => {
+ message.success('Coming soon!', 3);
+ }
+
handleMenuItemClick(key) {
switch (key) {
case 'logout':
@@ -238,7 +245,7 @@ export default class Wrapper extends React.PureComponent {
case 'merchandise':
case 'exchange':
case 'teardrop-smt':
- alert("Coming soon!")
+ this.messageComingSoon();
break;
default:
break;
diff --git a/src/client/components/Editor/Editor.js b/src/client/components/Editor/Editor.js
index 059251b1fa..5768c183f3 100644
--- a/src/client/components/Editor/Editor.js
+++ b/src/client/components/Editor/Editor.js
@@ -2,12 +2,11 @@ import React from 'react';
import PropTypes from 'prop-types';
import Helmet from 'react-helmet';
import ReactDOM from 'react-dom';
-import { withRouter, Link } from 'react-router-dom';
import classNames from 'classnames';
import { injectIntl, FormattedMessage } from 'react-intl';
import _ from 'lodash';
import readingTime from 'reading-time';
-import { Checkbox, Form, Input, Select, Button, Collapse, Menu, Dropdown, Icon } from 'antd';
+import { Checkbox, Form, Input, Select, Button, Collapse } from 'antd';
import { rewardsValues } from '../../../common/constants/rewards';
import Action from '../Button/Action';
import requiresLogin from '../../auth/requiresLogin';
diff --git a/src/client/components/Editor/EditorBeLikeTerry.js b/src/client/components/Editor/EditorBeLikeTerry.js
index fe6c4b6555..3e3e0f5a06 100644
--- a/src/client/components/Editor/EditorBeLikeTerry.js
+++ b/src/client/components/Editor/EditorBeLikeTerry.js
@@ -2,12 +2,11 @@ import React from 'react';
import PropTypes from 'prop-types';
import Helmet from 'react-helmet';
import ReactDOM from 'react-dom';
-import { withRouter, Link } from 'react-router-dom';
import classNames from 'classnames';
import { injectIntl, FormattedMessage } from 'react-intl';
import _ from 'lodash';
import readingTime from 'reading-time';
-import { Checkbox, Form, Input, Select, Button, Collapse, Menu, Dropdown, Icon } from 'antd';
+import { Checkbox, Form, Input, Select, Button, Collapse } from 'antd';
import { rewardsValues } from '../../../common/constants/rewards';
import Action from '../Button/Action';
import requiresLogin from '../../auth/requiresLogin';
@@ -41,6 +40,7 @@ class EditorBeLikeTerry extends React.Component {
onError: PropTypes.func,
onImageUpload: PropTypes.func,
onImageInvalid: PropTypes.func,
+ handleExtraMonetization: PropTypes.func,
};
static defaultProps = {
@@ -61,6 +61,7 @@ class EditorBeLikeTerry extends React.Component {
onError: () => {},
onImageUpload: () => {},
onImageInvalid: () => {},
+ handleExtraMonetization: () => {},
};
constructor(props) {
@@ -72,7 +73,6 @@ class EditorBeLikeTerry extends React.Component {
};
this.onUpdate = this.onUpdate.bind(this);
- this.onHashtagUpdate = this.onHashtagUpdate.bind(this)
this.setValues = this.setValues.bind(this);
this.setBodyAndRender = this.setBodyAndRender.bind(this);
this.throttledUpdate = this.throttledUpdate.bind(this);
@@ -116,10 +116,6 @@ class EditorBeLikeTerry extends React.Component {
_.throttle(this.throttledUpdate, 200, { leading: false, trailing: true })();
}
- onHashtagUpdate(value) {
- console.log(value);
- }
-
setValues(post) {
// NOTE: Used to rollback damaged drafts - https://github.com/busyorg/busy/issues/1412
// Might be deleted after a while.
@@ -379,6 +375,9 @@ class EditorBeLikeTerry extends React.Component {
,
)}
+
+
+
diff --git a/src/client/components/Editor/EditorMain.js b/src/client/components/Editor/EditorMain.js
index 4c85893e32..5ae0a92e59 100644
--- a/src/client/components/Editor/EditorMain.js
+++ b/src/client/components/Editor/EditorMain.js
@@ -6,7 +6,7 @@ import classNames from 'classnames';
import { injectIntl, FormattedMessage } from 'react-intl';
import _ from 'lodash';
import readingTime from 'reading-time';
-import { message, Checkbox, Form, Input, Select, Button, Collapse } from 'antd';
+import { Checkbox, Form, Input, Select, Button, Collapse } from 'antd';
import { rewardsValues } from '../../../common/constants/rewards';
import Action from '../Button/Action';
import requiresLogin from '../../auth/requiresLogin';
@@ -40,6 +40,7 @@ class EditorMain extends React.Component {
onError: PropTypes.func,
onImageUpload: PropTypes.func,
onImageInvalid: PropTypes.func,
+ handleExtraMonetization: PropTypes.func,
};
static defaultProps = {
@@ -60,6 +61,7 @@ class EditorMain extends React.Component {
onError: () => {},
onImageUpload: () => {},
onImageInvalid: () => {},
+ handleExtraMonetization: () => {},
};
constructor(props) {
@@ -71,13 +73,11 @@ class EditorMain extends React.Component {
};
this.onUpdate = this.onUpdate.bind(this);
- this.onHashtagUpdate = this.onHashtagUpdate.bind(this)
this.setValues = this.setValues.bind(this);
this.setBodyAndRender = this.setBodyAndRender.bind(this);
this.throttledUpdate = this.throttledUpdate.bind(this);
this.handleDelete = this.handleDelete.bind(this);
this.handleSubmit = this.handleSubmit.bind(this);
- this.displayComingSoon = this.displayComingSoon.bind(this);
}
componentDidMount() {
@@ -116,10 +116,6 @@ class EditorMain extends React.Component {
_.throttle(this.throttledUpdate, 200, { leading: false, trailing: true })();
}
- onHashtagUpdate(value) {
- console.log(value);
- }
-
setValues(post) {
// NOTE: Used to rollback damaged drafts - https://github.com/busyorg/busy/issues/1412
// Might be deleted after a while.
@@ -215,13 +211,6 @@ class EditorMain extends React.Component {
this.props.onDelete();
}
- /*
- * Display a coming soon message when user clicks on any "Click Here" button
- */
- displayComingSoon = () => {
- message.success('Coming soon!', 3);
- }
-
render() {
const { intl, form, loading, isUpdating, saving, draftId } = this.props;
const { getFieldDecorator } = form;
@@ -415,8 +404,8 @@ Want to "mine the human" some more, you can also try one of our specialized edit
,
)}
-
-
+
+
diff --git a/src/client/components/Editor/EditorSurpassingGoogle.js b/src/client/components/Editor/EditorSurpassingGoogle.js
index cc228a0ed6..950c3d10ae 100644
--- a/src/client/components/Editor/EditorSurpassingGoogle.js
+++ b/src/client/components/Editor/EditorSurpassingGoogle.js
@@ -2,12 +2,11 @@ import React from 'react';
import PropTypes from 'prop-types';
import Helmet from 'react-helmet';
import ReactDOM from 'react-dom';
-import { withRouter, Link } from 'react-router-dom';
import classNames from 'classnames';
import { injectIntl, FormattedMessage } from 'react-intl';
import _ from 'lodash';
import readingTime from 'reading-time';
-import { Checkbox, Form, Input, Select, Button, Collapse, Menu, Dropdown, Icon } from 'antd';
+import { Checkbox, Form, Input, Select, Button, Collapse } from 'antd';
import { rewardsValues } from '../../../common/constants/rewards';
import Action from '../Button/Action';
import requiresLogin from '../../auth/requiresLogin';
@@ -41,6 +40,7 @@ class EditorSurpassingGoogle extends React.Component {
onError: PropTypes.func,
onImageUpload: PropTypes.func,
onImageInvalid: PropTypes.func,
+ handleExtraMonetization: PropTypes.func,
};
static defaultProps = {
@@ -61,6 +61,7 @@ class EditorSurpassingGoogle extends React.Component {
onError: () => {},
onImageUpload: () => {},
onImageInvalid: () => {},
+ handleExtraMonetization: () => {},
};
constructor(props) {
@@ -72,7 +73,6 @@ class EditorSurpassingGoogle extends React.Component {
};
this.onUpdate = this.onUpdate.bind(this);
- this.onHashtagUpdate = this.onHashtagUpdate.bind(this)
this.setValues = this.setValues.bind(this);
this.setBodyAndRender = this.setBodyAndRender.bind(this);
this.throttledUpdate = this.throttledUpdate.bind(this);
@@ -116,10 +116,6 @@ class EditorSurpassingGoogle extends React.Component {
_.throttle(this.throttledUpdate, 200, { leading: false, trailing: true })();
}
- onHashtagUpdate(value) {
- console.log(value);
- }
-
setValues(post) {
// NOTE: Used to rollback damaged drafts - https://github.com/busyorg/busy/issues/1412
// Might be deleted after a while.
@@ -388,6 +384,9 @@ class EditorSurpassingGoogle extends React.Component {
,
)}
+
+
+
diff --git a/src/client/components/Editor/EditorTeardrop.js b/src/client/components/Editor/EditorTeardrop.js
index bc3973757a..72fc710429 100644
--- a/src/client/components/Editor/EditorTeardrop.js
+++ b/src/client/components/Editor/EditorTeardrop.js
@@ -2,18 +2,16 @@ import React from 'react';
import PropTypes from 'prop-types';
import Helmet from 'react-helmet';
import ReactDOM from 'react-dom';
-import { withRouter, Link } from 'react-router-dom';
import classNames from 'classnames';
import { injectIntl, FormattedMessage } from 'react-intl';
import _ from 'lodash';
import readingTime from 'reading-time';
-import { Checkbox, Form, Input, Select, Button, Collapse, Menu, Dropdown, Icon } from 'antd';
+import { Checkbox, Form, Input, Select, Button, Collapse } from 'antd';
import { rewardsValues } from '../../../common/constants/rewards';
import Action from '../Button/Action';
import requiresLogin from '../../auth/requiresLogin';
import withEditor from './withEditor';
import EditorInput from './EditorInput';
-import UlogDropdown from './UlogDropdown';
import { remarkable } from '../Story/Body';
import BodyContainer from '../../containers/Story/BodyContainer';
import './Editor.less';
@@ -41,6 +39,7 @@ class EditorTeardrop extends React.Component {
onError: PropTypes.func,
onImageUpload: PropTypes.func,
onImageInvalid: PropTypes.func,
+ handleExtraMonetization: PropTypes.func,
};
static defaultProps = {
@@ -61,6 +60,7 @@ class EditorTeardrop extends React.Component {
onError: () => {},
onImageUpload: () => {},
onImageInvalid: () => {},
+ handleExtraMonetization: () => {},
};
constructor(props) {
@@ -72,7 +72,6 @@ class EditorTeardrop extends React.Component {
};
this.onUpdate = this.onUpdate.bind(this);
- this.onHashtagUpdate = this.onHashtagUpdate.bind(this)
this.setValues = this.setValues.bind(this);
this.setBodyAndRender = this.setBodyAndRender.bind(this);
this.throttledUpdate = this.throttledUpdate.bind(this);
@@ -116,10 +115,6 @@ class EditorTeardrop extends React.Component {
_.throttle(this.throttledUpdate, 200, { leading: false, trailing: true })();
}
- onHashtagUpdate(value) {
- console.log(value);
- }
-
setValues(post) {
// NOTE: Used to rollback damaged drafts - https://github.com/busyorg/busy/issues/1412
// Might be deleted after a while.
@@ -383,6 +378,9 @@ Ulogs.org allows you to enjoy the entire steem ecosystem. So, incase you change
,
)}
+
+
+
diff --git a/src/client/components/Editor/EditorUlogDIY.js b/src/client/components/Editor/EditorUlogDIY.js
index 09c021edfe..78a214ec1d 100644
--- a/src/client/components/Editor/EditorUlogDIY.js
+++ b/src/client/components/Editor/EditorUlogDIY.js
@@ -2,12 +2,11 @@ import React from 'react';
import PropTypes from 'prop-types';
import Helmet from 'react-helmet';
import ReactDOM from 'react-dom';
-import { withRouter, Link } from 'react-router-dom';
import classNames from 'classnames';
import { injectIntl, FormattedMessage } from 'react-intl';
import _ from 'lodash';
import readingTime from 'reading-time';
-import { Checkbox, Form, Input, Select, Button, Collapse, Menu, Dropdown, Icon } from 'antd';
+import { Checkbox, Form, Input, Select, Button, Collapse } from 'antd';
import { rewardsValues } from '../../../common/constants/rewards';
import Action from '../Button/Action';
import requiresLogin from '../../auth/requiresLogin';
@@ -41,6 +40,7 @@ class EditorUlogDIY extends React.Component {
onError: PropTypes.func,
onImageUpload: PropTypes.func,
onImageInvalid: PropTypes.func,
+ handleExtraMonetization: PropTypes.func,
};
static defaultProps = {
@@ -61,6 +61,7 @@ class EditorUlogDIY extends React.Component {
onError: () => {},
onImageUpload: () => {},
onImageInvalid: () => {},
+ handleExtraMonetization: () => {},
};
constructor(props) {
@@ -72,7 +73,6 @@ class EditorUlogDIY extends React.Component {
};
this.onUpdate = this.onUpdate.bind(this);
- this.onHashtagUpdate = this.onHashtagUpdate.bind(this)
this.setValues = this.setValues.bind(this);
this.setBodyAndRender = this.setBodyAndRender.bind(this);
this.throttledUpdate = this.throttledUpdate.bind(this);
@@ -116,10 +116,6 @@ class EditorUlogDIY extends React.Component {
_.throttle(this.throttledUpdate, 200, { leading: false, trailing: true })();
}
- onHashtagUpdate(value) {
- console.log(value);
- }
-
setValues(post) {
// NOTE: Used to rollback damaged drafts - https://github.com/busyorg/busy/issues/1412
// Might be deleted after a while.
@@ -219,26 +215,9 @@ class EditorUlogDIY extends React.Component {
const { intl, form, loading, isUpdating, saving, draftId } = this.props;
const { getFieldDecorator } = form;
const { body, bodyHTML } = this.state;
-
const { words, minutes } = readingTime(bodyHTML);
-
- const menu = (
-
- );
-
const Panel = Collapse.Panel;
-
return (
@@ -437,6 +416,9 @@ class EditorUlogDIY extends React.Component {
,
)}
+
+
+
diff --git a/src/client/components/Editor/EditorUlogHowto.js b/src/client/components/Editor/EditorUlogHowto.js
index 398f4b450e..83412515bc 100644
--- a/src/client/components/Editor/EditorUlogHowto.js
+++ b/src/client/components/Editor/EditorUlogHowto.js
@@ -2,18 +2,16 @@ import React from 'react';
import PropTypes from 'prop-types';
import Helmet from 'react-helmet';
import ReactDOM from 'react-dom';
-import { withRouter, Link } from 'react-router-dom';
import classNames from 'classnames';
import { injectIntl, FormattedMessage } from 'react-intl';
import _ from 'lodash';
import readingTime from 'reading-time';
-import { Checkbox, Form, Input, Select, Button, Collapse, Menu, Dropdown, Icon } from 'antd';
+import { Checkbox, Form, Input, Select, Button, Collapse } from 'antd';
import { rewardsValues } from '../../../common/constants/rewards';
import Action from '../Button/Action';
import requiresLogin from '../../auth/requiresLogin';
import withEditor from './withEditor';
import EditorInput from './EditorInput';
-import UlogDropdown from './UlogDropdown';
import { remarkable } from '../Story/Body';
import BodyContainer from '../../containers/Story/BodyContainer';
import './Editor.less';
@@ -41,6 +39,7 @@ class EditorUlogHowto extends React.Component {
onError: PropTypes.func,
onImageUpload: PropTypes.func,
onImageInvalid: PropTypes.func,
+ handleExtraMonetization: PropTypes.func,
};
static defaultProps = {
@@ -61,6 +60,7 @@ class EditorUlogHowto extends React.Component {
onError: () => {},
onImageUpload: () => {},
onImageInvalid: () => {},
+ handleExtraMonetization: () => {},
};
constructor(props) {
@@ -72,7 +72,6 @@ class EditorUlogHowto extends React.Component {
};
this.onUpdate = this.onUpdate.bind(this);
- this.onHashtagUpdate = this.onHashtagUpdate.bind(this)
this.setValues = this.setValues.bind(this);
this.setBodyAndRender = this.setBodyAndRender.bind(this);
this.throttledUpdate = this.throttledUpdate.bind(this);
@@ -116,10 +115,6 @@ class EditorUlogHowto extends React.Component {
_.throttle(this.throttledUpdate, 200, { leading: false, trailing: true })();
}
- onHashtagUpdate(value) {
- console.log(value);
- }
-
setValues(post) {
// NOTE: Used to rollback damaged drafts - https://github.com/busyorg/busy/issues/1412
// Might be deleted after a while.
@@ -423,6 +418,9 @@ class EditorUlogHowto extends React.Component {
,
)}
+
+
+
diff --git a/src/client/components/Editor/EditorUlogNed.js b/src/client/components/Editor/EditorUlogNed.js
index bd7622a3f1..2fc181fd29 100644
--- a/src/client/components/Editor/EditorUlogNed.js
+++ b/src/client/components/Editor/EditorUlogNed.js
@@ -2,12 +2,11 @@ import React from 'react';
import PropTypes from 'prop-types';
import Helmet from 'react-helmet';
import ReactDOM from 'react-dom';
-import { withRouter, Link } from 'react-router-dom';
import classNames from 'classnames';
import { injectIntl, FormattedMessage } from 'react-intl';
import _ from 'lodash';
import readingTime from 'reading-time';
-import { Checkbox, Form, Input, Select, Button, Collapse, Menu, Dropdown, Icon } from 'antd';
+import { Checkbox, Form, Input, Select, Button, Collapse } from 'antd';
import { rewardsValues } from '../../../common/constants/rewards';
import Action from '../Button/Action';
import requiresLogin from '../../auth/requiresLogin';
@@ -41,6 +40,7 @@ class EditorUlogNed extends React.Component {
onError: PropTypes.func,
onImageUpload: PropTypes.func,
onImageInvalid: PropTypes.func,
+ handleExtraMonetization: PropTypes.func,
};
static defaultProps = {
@@ -61,6 +61,7 @@ class EditorUlogNed extends React.Component {
onError: () => {},
onImageUpload: () => {},
onImageInvalid: () => {},
+ handleExtraMonetization: () => {},
};
constructor(props) {
@@ -72,7 +73,6 @@ class EditorUlogNed extends React.Component {
};
this.onUpdate = this.onUpdate.bind(this);
- this.onHashtagUpdate = this.onHashtagUpdate.bind(this)
this.setValues = this.setValues.bind(this);
this.setBodyAndRender = this.setBodyAndRender.bind(this);
this.throttledUpdate = this.throttledUpdate.bind(this);
@@ -116,10 +116,6 @@ class EditorUlogNed extends React.Component {
_.throttle(this.throttledUpdate, 200, { leading: false, trailing: true })();
}
- onHashtagUpdate(value) {
- console.log(value);
- }
-
setValues(post) {
// NOTE: Used to rollback damaged drafts - https://github.com/busyorg/busy/issues/1412
// Might be deleted after a while.
@@ -419,6 +415,9 @@ He sustains the steem blockchain; he is birthing S
,
)}
+
+
+
diff --git a/src/client/components/Editor/EditorUlogQuotes.js b/src/client/components/Editor/EditorUlogQuotes.js
index 543d4820ee..721c678291 100644
--- a/src/client/components/Editor/EditorUlogQuotes.js
+++ b/src/client/components/Editor/EditorUlogQuotes.js
@@ -2,18 +2,16 @@ import React from 'react';
import PropTypes from 'prop-types';
import Helmet from 'react-helmet';
import ReactDOM from 'react-dom';
-import { withRouter, Link } from 'react-router-dom';
import classNames from 'classnames';
import { injectIntl, FormattedMessage } from 'react-intl';
import _ from 'lodash';
import readingTime from 'reading-time';
-import { Checkbox, Form, Input, Select, Button, Collapse, Menu, Dropdown, Icon } from 'antd';
+import { Checkbox, Form, Input, Select, Button, Collapse } from 'antd';
import { rewardsValues } from '../../../common/constants/rewards';
import Action from '../Button/Action';
import requiresLogin from '../../auth/requiresLogin';
import withEditor from './withEditor';
import EditorInput from './EditorInput';
-import UlogDropdown from './UlogDropdown';
import { remarkable } from '../Story/Body';
import BodyContainer from '../../containers/Story/BodyContainer';
import './Editor.less';
@@ -41,6 +39,7 @@ class EditorUlogQuotes extends React.Component {
onError: PropTypes.func,
onImageUpload: PropTypes.func,
onImageInvalid: PropTypes.func,
+ handleExtraMonetization: PropTypes.func,
};
static defaultProps = {
@@ -61,6 +60,7 @@ class EditorUlogQuotes extends React.Component {
onError: () => {},
onImageUpload: () => {},
onImageInvalid: () => {},
+ handleExtraMonetization: () => {},
};
constructor(props) {
@@ -72,7 +72,6 @@ class EditorUlogQuotes extends React.Component {
};
this.onUpdate = this.onUpdate.bind(this);
- this.onHashtagUpdate = this.onHashtagUpdate.bind(this)
this.setValues = this.setValues.bind(this);
this.setBodyAndRender = this.setBodyAndRender.bind(this);
this.throttledUpdate = this.throttledUpdate.bind(this);
@@ -116,10 +115,6 @@ class EditorUlogQuotes extends React.Component {
_.throttle(this.throttledUpdate, 200, { leading: false, trailing: true })();
}
- onHashtagUpdate(value) {
- console.log(value);
- }
-
setValues(post) {
// NOTE: Used to rollback damaged drafts - https://github.com/busyorg/busy/issues/1412
// Might be deleted after a while.
@@ -439,6 +434,9 @@ class EditorUlogQuotes extends React.Component {
,
)}
+
+
+
diff --git a/src/client/components/Editor/EditorUlogSurpassingGoogle.js b/src/client/components/Editor/EditorUlogSurpassingGoogle.js
index a6294f84c5..621a38f6ac 100644
--- a/src/client/components/Editor/EditorUlogSurpassingGoogle.js
+++ b/src/client/components/Editor/EditorUlogSurpassingGoogle.js
@@ -2,12 +2,11 @@ import React from 'react';
import PropTypes from 'prop-types';
import Helmet from 'react-helmet';
import ReactDOM from 'react-dom';
-import { withRouter, Link } from 'react-router-dom';
import classNames from 'classnames';
import { injectIntl, FormattedMessage } from 'react-intl';
import _ from 'lodash';
import readingTime from 'reading-time';
-import { Checkbox, Form, Input, Select, Button, Collapse, Menu, Dropdown, Icon } from 'antd';
+import { Checkbox, Form, Input, Select, Button, Collapse } from 'antd';
import { rewardsValues } from '../../../common/constants/rewards';
import Action from '../Button/Action';
import requiresLogin from '../../auth/requiresLogin';
@@ -40,6 +39,7 @@ class EditorUlogSurpassingGoogle extends React.Component {
onError: PropTypes.func,
onImageUpload: PropTypes.func,
onImageInvalid: PropTypes.func,
+ handleExtraMonetization: PropTypes.func,
};
static defaultProps = {
@@ -60,6 +60,7 @@ class EditorUlogSurpassingGoogle extends React.Component {
onError: () => {},
onImageUpload: () => {},
onImageInvalid: () => {},
+ handleExtraMonetization: () => {},
};
constructor(props) {
@@ -71,7 +72,6 @@ class EditorUlogSurpassingGoogle extends React.Component {
};
this.onUpdate = this.onUpdate.bind(this);
- this.onHashtagUpdate = this.onHashtagUpdate.bind(this)
this.setValues = this.setValues.bind(this);
this.setBodyAndRender = this.setBodyAndRender.bind(this);
this.throttledUpdate = this.throttledUpdate.bind(this);
@@ -115,10 +115,6 @@ class EditorUlogSurpassingGoogle extends React.Component {
_.throttle(this.throttledUpdate, 200, { leading: false, trailing: true })();
}
- onHashtagUpdate(value) {
- console.log(value);
- }
-
setValues(post) {
// NOTE: Used to rollback damaged drafts - https://github.com/busyorg/busy/issues/1412
// Might be deleted after a while.
@@ -428,6 +424,9 @@ class EditorUlogSurpassingGoogle extends React.Component {
,
)}
+
+
+
diff --git a/src/client/components/Editor/EditorUntalented.js b/src/client/components/Editor/EditorUntalented.js
index 4bd847fc2e..bc5f1deea1 100644
--- a/src/client/components/Editor/EditorUntalented.js
+++ b/src/client/components/Editor/EditorUntalented.js
@@ -2,12 +2,11 @@ import React from 'react';
import PropTypes from 'prop-types';
import Helmet from 'react-helmet';
import ReactDOM from 'react-dom';
-import { withRouter, Link } from 'react-router-dom';
import classNames from 'classnames';
import { injectIntl, FormattedMessage } from 'react-intl';
import _ from 'lodash';
import readingTime from 'reading-time';
-import { Checkbox, Form, Input, Select, Button, Collapse, Menu, Dropdown, Icon } from 'antd';
+import { Checkbox, Form, Input, Select, Button, Collapse } from 'antd';
import { rewardsValues } from '../../../common/constants/rewards';
import Action from '../Button/Action';
import requiresLogin from '../../auth/requiresLogin';
@@ -40,6 +39,7 @@ class EditorUntalented extends React.Component {
onError: PropTypes.func,
onImageUpload: PropTypes.func,
onImageInvalid: PropTypes.func,
+ handleExtraMonetization: PropTypes.func,
};
static defaultProps = {
@@ -60,6 +60,7 @@ class EditorUntalented extends React.Component {
onError: () => {},
onImageUpload: () => {},
onImageInvalid: () => {},
+ handleExtraMonetization: () => {},
};
constructor(props) {
@@ -71,7 +72,6 @@ class EditorUntalented extends React.Component {
};
this.onUpdate = this.onUpdate.bind(this);
- this.onHashtagUpdate = this.onHashtagUpdate.bind(this)
this.setValues = this.setValues.bind(this);
this.setBodyAndRender = this.setBodyAndRender.bind(this);
this.throttledUpdate = this.throttledUpdate.bind(this);
@@ -115,10 +115,6 @@ class EditorUntalented extends React.Component {
_.throttle(this.throttledUpdate, 200, { leading: false, trailing: true })();
}
- onHashtagUpdate(value) {
- console.log(value);
- }
-
setValues(post) {
// NOTE: Used to rollback damaged drafts - https://github.com/busyorg/busy/issues/1412
// Might be deleted after a while.
@@ -385,6 +381,9 @@ Want to "mine the human" some more, you can also try one of our specialized edit
,
)}
+
+
+
diff --git a/src/client/components/Navigation/Topnav.js b/src/client/components/Navigation/Topnav.js
index d9bfb48f4e..5b18fb15f3 100644
--- a/src/client/components/Navigation/Topnav.js
+++ b/src/client/components/Navigation/Topnav.js
@@ -4,7 +4,7 @@ import _ from 'lodash';
import { injectIntl, FormattedMessage } from 'react-intl';
import { withRouter, Link } from 'react-router-dom';
import { connect } from 'react-redux';
-import { Menu, Input, AutoComplete, Dropdown, Icon, Tooltip, Alert } from 'antd';
+import { Menu, Input, AutoComplete, } from 'antd';
import classNames from 'classnames';
import { searchAutoComplete } from '../../search/searchActions';
import { getUpdatedSCUserMetadata } from '../../auth/authActions';
@@ -164,11 +164,6 @@ class Topnav extends React.Component {
const displayBadge = notificationsCount > 0;
const notificationsCountDisplay = notificationsCount > 99 ? '99+' : notificationsCount;
- const SubMenu = Menu.SubMenu;
- const MenuItemGroup = Menu.ItemGroup;
-
-
-
return (
{},
notify: () => {},
replace: () => {},
+ isFetchingFollowingList: () => {},
};
constructor(props) {
@@ -96,7 +100,10 @@ class Write extends React.Component {
initialUpdatedDate: Date.now(),
isUpdating: false,
showModalDelete: false,
+ certifiedUloggers: [],
};
+
+ this.getCertifiedUloggers = this.getCertifiedUloggers.bind(this);
}
componentDidMount() {
@@ -135,6 +142,10 @@ class Write extends React.Component {
} else {
this.draftId = uuidv4();
}
+
+ if (!this.props.isFetchingFollowingList) {
+ this.getCertifiedUloggers();
+ }
}
componentWillReceiveProps(nextProps) {
@@ -165,6 +176,10 @@ class Write extends React.Component {
initialTopics,
});
}
+
+ if (!nextProps.isFetchingFollowingList) {
+ this.getCertifiedUloggers();
+ }
}
componentDidUpdate(prevProps) {
@@ -219,6 +234,22 @@ class Write extends React.Component {
return data;
};
+ getCertifiedUloggers() {
+ steemAPI
+ .sendAsync('call', ['condenser_api', 'get_following', ['uloggers', '', 'blog', 100]])
+ .then(result => {
+ const certifiedUloggers = _.sortBy(result, 'following')
+ .map(user => {
+ let name = _.get(user, 0);
+ if (_.isEmpty(name)) {
+ name = _.get(user, 'following');
+ }
+ return name;
+ });
+ this.setState({ certifiedUloggers });
+ });
+ }
+
handleCancelDeleteDraft = () => this.setState({ showModalDelete: false });
saveDraft = _.debounce(form => {
@@ -235,9 +266,22 @@ class Write extends React.Component {
const redirect = id !== this.draftId;
const editorUrl = this.props.location.pathname.split('/')[1];
- this.props.saveDraft({ postData: data, id: this.draftId, editorUrl: editorUrl }, redirect, this.props.intl);
+ this.props.saveDraft({ postData: data, id: this.draftId, editorUrl }, redirect, this.props.intl);
}, 2000);
+ /*
+ * Display a coming soon message when user clicks on any "Click Here" button
+ */
+ handleExtraMonetization = () => {
+ const { user } = this.props
+
+ if (this.state.certifiedUloggers.indexOf(user.name) >= 0) {
+ message.success('Coming soon!', 3);
+ } else {
+ message.success("This feature is only available to 'certified uloggers'. Click here to get certified!!", 3);
+ }
+ }
+
render() {
const { initialTitle, initialTopics, initialBody, initialReward, initialUpvote } = this.state;
const { loading, saving, draftId } = this.props;
@@ -292,6 +336,7 @@ class Write extends React.Component {
onUpdate={this.saveDraft}
onSubmit={this.onSubmit}
onDelete={this.onDelete}
+ handleExtraMonetization={this.handleExtraMonetization}
/>
)}
/>
@@ -312,6 +357,7 @@ class Write extends React.Component {
onUpdate={this.saveDraft}
onSubmit={this.onSubmit}
onDelete={this.onDelete}
+ handleExtraMonetization={this.handleExtraMonetization}
/>
)}
/>
@@ -332,6 +378,7 @@ class Write extends React.Component {
onUpdate={this.saveDraft}
onSubmit={this.onSubmit}
onDelete={this.onDelete}
+ handleExtraMonetization={this.handleExtraMonetization}
/>
)}
/>
@@ -352,6 +399,7 @@ class Write extends React.Component {
onUpdate={this.saveDraft}
onSubmit={this.onSubmit}
onDelete={this.onDelete}
+ handleExtraMonetization={this.handleExtraMonetization}
/>
)}
/>
@@ -372,6 +420,7 @@ class Write extends React.Component {
onUpdate={this.saveDraft}
onSubmit={this.onSubmit}
onDelete={this.onDelete}
+ handleExtraMonetization={this.handleExtraMonetization}
/>
)}
/>
@@ -392,6 +441,7 @@ class Write extends React.Component {
onUpdate={this.saveDraft}
onSubmit={this.onSubmit}
onDelete={this.onDelete}
+ handleExtraMonetization={this.handleExtraMonetization}
/>
)}
/>
@@ -412,6 +462,7 @@ class Write extends React.Component {
onUpdate={this.saveDraft}
onSubmit={this.onSubmit}
onDelete={this.onDelete}
+ handleExtraMonetization={this.handleExtraMonetization}
/>
)}
/>
@@ -432,6 +483,7 @@ class Write extends React.Component {
onUpdate={this.saveDraft}
onSubmit={this.onSubmit}
onDelete={this.onDelete}
+ handleExtraMonetization={this.handleExtraMonetization}
/>
)}
/>
@@ -452,6 +504,7 @@ class Write extends React.Component {
onUpdate={this.saveDraft}
onSubmit={this.onSubmit}
onDelete={this.onDelete}
+ handleExtraMonetization={this.handleExtraMonetization}
/>
)}
/>
diff --git a/src/common/routes.js b/src/common/routes.js
index 889dae7b6f..5bf0c1b220 100644
--- a/src/common/routes.js
+++ b/src/common/routes.js
@@ -69,7 +69,6 @@ const routes = [
'/(editor|main-editor|teardrops|untalented|fanlove|ulog-ned|ulog-surpassinggoogle|ulog-diy|ulog-howto|ulog-quotes)',
exact: true,
component: Editor,
- exact: true,
},
{
path: '/settings',
diff --git a/yarn.lock b/yarn.lock
index b434ae84f5..410d67f4c1 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2664,6 +2664,11 @@ dot-prop@^4.1.0:
dependencies:
is-obj "^1.0.0"
+dotenv@^7.0.0:
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-7.0.0.tgz#a2be3cd52736673206e8a85fb5210eea29628e7c"
+ integrity sha512-M3NhsLbV1i6HuGzBUH8vXrtxOk+tWmzWKDMbAVSUp3Zsjm7ywFeuwrUXhmhQyRK1q5B5GGy7hcXPbj3bnfZg2g==
+
draft-js@^0.10.0, draft-js@~0.10.0:
version "0.10.5"
resolved "https://registry.yarnpkg.com/draft-js/-/draft-js-0.10.5.tgz#bfa9beb018fe0533dbb08d6675c371a6b08fa742"