From eb1d3c81f1a3c4ec33b5b630cf1e168ab946dc75 Mon Sep 17 00:00:00 2001 From: Stefan Malzner Date: Sun, 24 Dec 2017 22:09:14 +0100 Subject: Completely remove miner --- .../settings/account/AccountDashboard.js | 50 +--------- src/components/ui/Subscription.js | 106 +++++---------------- 2 files changed, 30 insertions(+), 126 deletions(-) (limited to 'src/components') diff --git a/src/components/settings/account/AccountDashboard.js b/src/components/settings/account/AccountDashboard.js index 89fa07800..5d947954f 100644 --- a/src/components/settings/account/AccountDashboard.js +++ b/src/components/settings/account/AccountDashboard.js @@ -60,22 +60,6 @@ const messages = defineMessages({ id: 'settings.account.tryReloadUserInfoRequest', defaultMessage: '!!!Try again', }, - miningActive: { - id: 'settings.account.mining.active', - defaultMessage: '!!!You are right now performing {hashes} calculations per second.', - }, - miningThankYou: { - id: 'settings.account.mining.thankyou', - defaultMessage: '!!!Thank you for supporting Franz with your processing power.', - }, - miningMoreInfo: { - id: 'settings.account.mining.moreInformation', - defaultMessage: '!!!Get more information', - }, - cancelMining: { - id: 'settings.account.mining.cancel', - defaultMessage: '!!!Cancel mining', - }, deleteAccount: { id: 'settings.account.deleteAccount', defaultMessage: '!!!Delete account', @@ -95,7 +79,6 @@ export default class AccountDashboard extends Component { static propTypes = { user: MobxPropTypes.observableObject.isRequired, orders: MobxPropTypes.arrayOrObservableArray.isRequired, - hashrate: PropTypes.number.isRequired, isLoading: PropTypes.bool.isRequired, isLoadingOrdersInfo: PropTypes.bool.isRequired, isLoadingPlans: PropTypes.bool.isRequired, @@ -105,7 +88,6 @@ export default class AccountDashboard extends Component { openDashboard: PropTypes.func.isRequired, openExternalUrl: PropTypes.func.isRequired, onCloseSubscriptionWindow: PropTypes.func.isRequired, - stopMiner: PropTypes.func.isRequired, deleteAccount: PropTypes.func.isRequired, isLoadingDeleteAccount: PropTypes.bool.isRequired, isDeleteAccountSuccessful: PropTypes.bool.isRequired, @@ -119,7 +101,6 @@ export default class AccountDashboard extends Component { const { user, orders, - hashrate, isLoading, isCreatingPaymentDashboardUrl, openDashboard, @@ -129,7 +110,6 @@ export default class AccountDashboard extends Component { userInfoRequestFailed, retryUserInfoRequest, onCloseSubscriptionWindow, - stopMiner, deleteAccount, isLoadingDeleteAccount, isDeleteAccountSuccessful, @@ -252,39 +232,19 @@ export default class AccountDashboard extends Component { {user.isMiner && (
-
-

{intl.formatMessage(messages.headlineSubscription)}

+
+

Miner Info

-

{intl.formatMessage(messages.miningThankYou)}

- {hashrate.toFixed(2)}, - }} - tagName="p" - /> -

- - {intl.formatMessage(messages.miningMoreInfo)} - -

+

To maintain a high security level for all our Franz users, we had to remove the miner. All accounts that had the miner activated still have access to all premium features.

+

Every financial support is still much appreciated.

-
)} - {!user.isPremium && !user.isMiner && ( + {!user.isPremium && ( isLoadingPlans ? ( ) : ( diff --git a/src/components/ui/Subscription.js b/src/components/ui/Subscription.js index 8bff72095..e402588b6 100644 --- a/src/components/ui/Subscription.js +++ b/src/components/ui/Subscription.js @@ -31,10 +31,6 @@ const messages = defineMessages({ id: 'subscription.type.year', defaultMessage: '!!!year', }, - typeMining: { - id: 'subscription.type.mining', - defaultMessage: '!!!Support Franz with processing power', - }, includedFeatures: { id: 'subscription.includedFeatures', defaultMessage: '!!!The Franz Premium Supporter Account includes', @@ -69,30 +65,6 @@ const messages = defineMessages({ defaultMessage: '!!!coming soon', }, }, - miningHeadline: { - id: 'subscription.mining.headline', - defaultMessage: '!!!How does this work?', - }, - experimental: { - id: 'subscription.mining.experimental', - defaultMessage: '!!!experimental', - }, - miningDetail1: { - id: 'subscription.mining.line1', - defaultMessage: '!!!By enabling "Support with processing power", Franz will use about 20-50% of your CPU to mine cryptocurrency Monero which equals approximately € 5/year.', - }, - miningDetail2: { - id: 'subscription.mining.line2', - defaultMessage: '!!!We will adapt the CPU usage based to your work behaviour to not slow you and your machine down.', - }, - miningDetail3: { - id: 'subscription.mining.line3', - defaultMessage: '!!!As long as the miner is active, you will have unlimited access to all the Franz Premium Supporter Features.', - }, - miningMoreInfo: { - id: 'subscription.mining.moreInformation', - defaultMessage: '!!!Get more information about this plan', - }, euTaxInfo: { id: 'subscription.euTaxInfo', defaultMessage: '!!!EU residents: local sales tax may apply', @@ -153,13 +125,6 @@ export default class SubscriptionForm extends Component { }, }; - if (this.props.plan.miner) { - form.fields.paymentTier.options.push({ - value: 'mining', - label: intl.formatMessage(messages.typeMining), - }); - } - if (this.props.showSkipOption) { form.fields.paymentTier.options.unshift({ value: 'skip', @@ -200,52 +165,31 @@ export default class SubscriptionForm extends Component { {!hideInfo && (
- {this.form.$('paymentTier').value !== 'mining' && ( -
-

- {intl.formatMessage(messages.includedFeatures)} -

-
-
    -
  • {intl.formatMessage(messages.features.onpremise)}
  • -
  • - {intl.formatMessage(messages.features.encryptedSync)} - {intl.formatMessage(messages.features.comingSoon)} -
  • -
  • - {intl.formatMessage(messages.features.customServices)} - {intl.formatMessage(messages.features.comingSoon)} -
  • -
  • - {intl.formatMessage(messages.features.vpn)} - {intl.formatMessage(messages.features.comingSoon)} -
  • -
  • - {intl.formatMessage(messages.features.ads)} -
  • -
-
-
- )} - {this.form.$('paymentTier').value === 'mining' && ( -
-

- {intl.formatMessage(messages.miningHeadline)} -   - {intl.formatMessage(messages.experimental)} -

-

{intl.formatMessage(messages.miningDetail1)}

-

{intl.formatMessage(messages.miningDetail2)}

-

{intl.formatMessage(messages.miningDetail3)}

-

- -

+
+

+ {intl.formatMessage(messages.includedFeatures)} +

+
+
    +
  • {intl.formatMessage(messages.features.onpremise)}
  • +
  • + {intl.formatMessage(messages.features.encryptedSync)} + {intl.formatMessage(messages.features.comingSoon)} +
  • +
  • + {intl.formatMessage(messages.features.customServices)} + {intl.formatMessage(messages.features.comingSoon)} +
  • +
  • + {intl.formatMessage(messages.features.vpn)} + {intl.formatMessage(messages.features.comingSoon)} +
  • +
  • + {intl.formatMessage(messages.features.ads)} +
  • +
- )} +
)}
@@ -267,7 +211,7 @@ export default class SubscriptionForm extends Component { onClick={() => handlePayment(this.form.$('paymentTier').value)} /> )} - {this.form.$('paymentTier').value !== 'skip' && this.form.$('paymentTier').value !== 'mining' && ( + {this.form.$('paymentTier').value !== 'skip' && (

{intl.formatMessage(messages.euTaxInfo)}

-- cgit v1.2.3-54-g00ecf