oops
This commit is contained in:
parent
7cfa748269
commit
be40d2b3b7
|
@ -42,7 +42,7 @@ const Account = ({ user, loadUser }: { user: AT.LingdocsUser | undefined, loadUs
|
||||||
function handleIncomingMessage(event: MessageEvent<any>) {
|
function handleIncomingMessage(event: MessageEvent<any>) {
|
||||||
if (
|
if (
|
||||||
event.origin === "https://account.lingdocs.com"
|
event.origin === "https://account.lingdocs.com"
|
||||||
&& (event.data === "signed in" || event.data === "upgraded" || event.data === "cancelled")
|
&& (event.data === "signed in")
|
||||||
&& popupRef
|
&& popupRef
|
||||||
) {
|
) {
|
||||||
loadUser();
|
loadUser();
|
||||||
|
@ -77,9 +77,6 @@ const Account = ({ user, loadUser }: { user: AT.LingdocsUser | undefined, loadUs
|
||||||
function handleOpenSignup() {
|
function handleOpenSignup() {
|
||||||
popupRef = window.open("https://account.lingdocs.com", "account", "height=800,width=500,top=50,left=400");
|
popupRef = window.open("https://account.lingdocs.com", "account", "height=800,width=500,top=50,left=400");
|
||||||
}
|
}
|
||||||
function handleOpenUpgrade() {
|
|
||||||
popupRef = window.open("https://account.lingdocs.com/payment/store", "store", "height=800,width=500,top=50,left=400");
|
|
||||||
}
|
|
||||||
function handlePublish() {
|
function handlePublish() {
|
||||||
setPublishingStatus("publishing");
|
setPublishingStatus("publishing");
|
||||||
publishDictionary().then((response) => {
|
publishDictionary().then((response) => {
|
||||||
|
@ -165,9 +162,7 @@ const Account = ({ user, loadUser }: { user: AT.LingdocsUser | undefined, loadUs
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className="btn btn-outline-secondary"
|
className="btn btn-outline-secondary"
|
||||||
onClick={"tester" in user
|
onClick={() => setShowingUpgradePrompt(true)}
|
||||||
? handleOpenUpgrade
|
|
||||||
: () => setShowingUpgradePrompt(true)}
|
|
||||||
data-testid="upgradeButton"
|
data-testid="upgradeButton"
|
||||||
>
|
>
|
||||||
<i className="fa fa-level-up-alt"></i> Upgrade Account
|
<i className="fa fa-level-up-alt"></i> Upgrade Account
|
||||||
|
|
|
@ -268,17 +268,16 @@ function Wordlist({ options, wordlist, isolateEntry, optionsDispatch, user }: {
|
||||||
<div style={{ marginTop: "2rem" }}>
|
<div style={{ marginTop: "2rem" }}>
|
||||||
{!user
|
{!user
|
||||||
? <p className="lead"><Link to="/account">Sign in</Link> to upgrade and enable wordlist</p>
|
? <p className="lead"><Link to="/account">Sign in</Link> to upgrade and enable wordlist</p>
|
||||||
: <div>
|
: <p className="lead">Upgrade to a <strong>student account</strong> to enable the wordlist</p>}
|
||||||
<p className="lead">Upgrade to a <strong>student account</strong> to enable the wordlist</p>
|
<div>
|
||||||
<p>Features:</p>
|
<p>Features:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Save your wordlist and sync across devices</li>
|
<li>Save your wordlist and sync across devices</li>
|
||||||
<li>Save text, audio, or visual context for words</li>
|
<li>Save text, audio, or visual context for words</li>
|
||||||
<li>Review words with Anki-style spaced repetition</li>
|
<li>Review words with Anki-style spaced repetition</li>
|
||||||
</ul>
|
</ul>
|
||||||
<UpgradePrices />
|
{user ? <UpgradePrices /> : <Link to="/account">Sign In</Link>}
|
||||||
</div>
|
</div>
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
</div>;
|
</div>;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue