lbry-desktop/ui/js/component/welcomeModal/view.jsx

82 lines
2.8 KiB
React
Raw Normal View History

2017-06-08 02:56:52 +02:00
import React from "react";
import { Modal } from "component/modal";
import { CreditAmount } from "component/common";
import Link from "component/link";
import RewardLink from "component/rewardLink";
class WelcomeModal extends React.PureComponent {
2017-06-08 02:56:52 +02:00
render() {
2017-06-08 23:15:34 +02:00
const { closeModal, hasClaimed, isRewardApproved, reward } = this.props;
2017-06-08 02:56:52 +02:00
2017-06-08 23:15:34 +02:00
return !hasClaimed
2017-06-08 02:56:52 +02:00
? <Modal type="custom" isOpen={true} contentLabel="Welcome to LBRY">
<section>
2017-06-19 14:42:24 +02:00
<h3 className="modal__header">{__("Welcome to LBRY.")}</h3>
2017-06-08 02:56:52 +02:00
<p>
2017-06-20 14:08:52 +02:00
{__(
"Using LBRY is like dating a centaur. Totally normal up top, and"
)}
2017-06-19 14:58:39 +02:00
{" "}<em>{__("way different")}</em> {__("underneath.")}
2017-06-08 02:56:52 +02:00
</p>
2017-06-19 14:42:24 +02:00
<p>{__("Up top, LBRY is similar to popular media sites.")}</p>
2017-06-08 02:56:52 +02:00
<p>
2017-06-20 14:08:52 +02:00
{__(
"Below, LBRY is controlled by users -- you -- via blockchain and decentralization."
)}
2017-06-08 02:56:52 +02:00
</p>
<p>
2017-06-19 14:42:24 +02:00
{__("Thank you for making content freedom possible!")}
2017-06-08 02:56:52 +02:00
{" "}{isRewardApproved ? __("Here's a nickel, kid.") : ""}
</p>
2017-06-08 23:15:34 +02:00
<div className="text-center">
2017-06-08 02:56:52 +02:00
{isRewardApproved
? <RewardLink reward_type="new_user" button="primary" />
: <Link
button="primary"
onClick={closeModal}
2017-06-19 14:42:24 +02:00
label={__("Continue")}
2017-06-08 02:56:52 +02:00
/>}
</div>
</section>
</Modal>
: <Modal
type="alert"
overlayClassName="modal-overlay modal-overlay--clear"
isOpen={true}
2017-06-19 14:42:24 +02:00
contentLabel={__("Welcome to LBRY")}
2017-06-08 02:56:52 +02:00
onConfirmed={closeModal}
>
<section>
2017-06-19 14:42:24 +02:00
<h3 className="modal__header">{__("About Your Reward")}</h3>
2017-06-08 02:56:52 +02:00
<p>
2017-06-19 14:42:24 +02:00
{__("You earned a reward of")}
2017-06-08 23:15:34 +02:00
{" "}<CreditAmount amount={reward.reward_amount} label={false} />
2017-06-19 15:51:28 +02:00
{" "}{__("LBRY credits, or")} <em>{__("LBC")}</em>.
2017-06-08 02:56:52 +02:00
</p>
<p>
2017-06-20 14:08:52 +02:00
{__(
"This reward will show in your Wallet momentarily, probably while you are reading this message."
)}
2017-06-08 02:56:52 +02:00
</p>
<p>
2017-06-20 14:08:52 +02:00
{__(
"LBC is used to compensate creators, to publish, and to have say in how the network works."
)}
2017-06-08 02:56:52 +02:00
</p>
<p>
2017-06-20 14:08:52 +02:00
{__(
"No need to understand it all just yet! Try watching or downloading something next."
)}
2017-06-08 02:56:52 +02:00
</p>
<p>
2017-06-20 14:08:52 +02:00
{__(
"Finally, know that LBRY is an early beta and that it earns the name."
)}
2017-06-08 02:56:52 +02:00
</p>
</section>
</Modal>;
}
}
export default WelcomeModal;