From da10296132a38a100e8d130c18cef091c265493c Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Wed, 13 Nov 2019 13:14:19 -0500 Subject: [PATCH] lbry.tv account copy changes --- .lintstagedrc.json | 4 +-- package.json | 1 + ui/component/rewardAuthIntro/index.js | 12 +++++++++ ui/component/rewardAuthIntro/view.jsx | 35 +++++++++++++++++++++++++++ ui/component/userEmail/view.jsx | 14 +++++++---- ui/component/userEmailNew/view.jsx | 13 +++++++--- ui/page/file/view.jsx | 2 +- ui/page/publish/view.jsx | 18 +++----------- ui/page/rewards/view.jsx | 19 ++------------- ui/scss/component/section.scss | 1 + ui/scss/init/_gui.scss | 3 +++ yarn.lock | 5 ++++ 12 files changed, 84 insertions(+), 43 deletions(-) create mode 100644 ui/component/rewardAuthIntro/index.js create mode 100644 ui/component/rewardAuthIntro/view.jsx diff --git a/.lintstagedrc.json b/.lintstagedrc.json index 771aac230..38c99b105 100644 --- a/.lintstagedrc.json +++ b/.lintstagedrc.json @@ -1,6 +1,6 @@ { "linters": { - "src/**/*.{js,jsx,scss,json}": ["prettier --write", "git add"], - "src/**/*.{js,jsx}": ["eslint", "flow focus-check --color always", "git add"] + "ui/**/*.{js,jsx,scss,json}": ["prettier --write", "git add"], + "ui/**/*.{js,jsx}": ["eslint", "flow focus-check --color always", "git add"] } } diff --git a/package.json b/package.json index ac86fccb3..33cf82a28 100644 --- a/package.json +++ b/package.json @@ -113,6 +113,7 @@ "eslint-plugin-promise": "^4.0.1", "eslint-plugin-react": "^7.7.0", "eslint-plugin-react-hooks": "^1.6.0", + "eslint-plugin-standard": "^4.0.1", "file-loader": "^4.2.0", "flow-bin": "^0.97.0", "flow-typed": "^2.3.0", diff --git a/ui/component/rewardAuthIntro/index.js b/ui/component/rewardAuthIntro/index.js new file mode 100644 index 000000000..4acfa933c --- /dev/null +++ b/ui/component/rewardAuthIntro/index.js @@ -0,0 +1,12 @@ +import { connect } from 'react-redux'; +import { selectUnclaimedRewardValue } from 'lbryinc'; +import RewardAuthIntro from './view'; + +const select = state => ({ + totalRewardValue: selectUnclaimedRewardValue(state), +}); + +export default connect( + select, + null +)(RewardAuthIntro); diff --git a/ui/component/rewardAuthIntro/view.jsx b/ui/component/rewardAuthIntro/view.jsx new file mode 100644 index 000000000..decc047e6 --- /dev/null +++ b/ui/component/rewardAuthIntro/view.jsx @@ -0,0 +1,35 @@ +// @flow +import React from 'react'; +import CreditAmount from 'component/common/credit-amount'; +import Button from 'component/button'; +import Card from 'component/common/card'; +import I18nMessage from 'component/i18nMessage'; + +type Props = { + balance: number, + totalRewardValue: number, +}; + +function RewardAuthIntro(props: Props) { + const { totalRewardValue } = props; + const totalRewardRounded = Math.floor(totalRewardValue / 10) * 10; + + return ( + , + }} + > + A lbry.tv account allows you to earn more than %credit_amount% in rewards, backup your data, and get content + and security updates. + + } + actions={