-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
1,739 additions
and
1,591 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
import { Button, Input } from 'antd'; | ||
import { Button, Input, Alert } from 'antd'; | ||
import { ipcRenderer } from 'electron'; | ||
import React from 'react'; | ||
|
||
import { useDispatch } from 'react-redux'; | ||
import { useHistory } from 'react-router'; | ||
import persistSubscriptionThunk from '../app/persistSubscriptionThunk'; | ||
import syncRepoThunk from '../app/repoThunk'; | ||
import { setKey } from '../features/subscriptionSlice/subscriptionSlice'; | ||
|
||
const CodeActivation = () => { | ||
|
@@ -15,6 +16,7 @@ const CodeActivation = () => { | |
const newKey = event.target['new-key'].value; | ||
dispatch(setKey({ key: newKey })); | ||
dispatch(persistSubscriptionThunk()); | ||
dispatch(syncRepoThunk(false)); | ||
history.push('/subscription'); | ||
}; | ||
|
||
|
@@ -28,19 +30,21 @@ const CodeActivation = () => { | |
<h1 className="text-6xl">Activate subscription</h1> | ||
</div> | ||
|
||
<div className="bg-white border-5px mt-2 mr-2 p-4"> | ||
<div className="bg-white border-5px mr-2 p-4"> | ||
<form onSubmit={setNewKey}> | ||
<p className="mb-2">Activation key:</p> | ||
<Input | ||
autoFocus | ||
id="new-key" | ||
className="mb-1 mt-4" | ||
placeholder="Enter your activation key from the email" | ||
className="mb-1" | ||
placeholder="40 characters long string" | ||
size="large" | ||
/> | ||
<p className="text-gray-400 mb-4"> | ||
You should receive an activation key after a successful payment. If | ||
you did not find the code, check the spam folder or contact us | ||
via <a onClick={openSupportUrl}>[email protected]</a>. | ||
You should receive an activation key after a successful payment or | ||
trial request. If you did not find the code, check the spam folder | ||
or contact us via{' '} | ||
<a onClick={openSupportUrl}>[email protected]</a>. | ||
</p> | ||
<Input | ||
className="bg-opacity-25 border-0 text-base w-6/12 mb-2 cursor-pointer hover:border-0 border-transparent hover:border-transparent" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import { Button, Input } from 'antd'; | ||
import { ipcRenderer } from 'electron'; | ||
import React from 'react'; | ||
|
||
import { useHistory } from 'react-router'; | ||
|
||
const TrialActivation = () => { | ||
const history = useHistory(); | ||
|
||
const getTrial = (event) => { | ||
const email = event.target.email.value; | ||
ipcRenderer.send('url:get-trial-link', { email }); | ||
history.push('/code-activation'); | ||
}; | ||
|
||
return ( | ||
<div className="overflow-y-auto overflow-x-hidden h-full pb-4"> | ||
<div className="relative pt-11 pb-6"> | ||
<h1 className="text-6xl">Start trial</h1> | ||
</div> | ||
<div className="bg-white border-5px mr-2 p-4"> | ||
<form onSubmit={getTrial}> | ||
<p className="mb-2">Email:</p> | ||
<Input | ||
autoFocus | ||
id="email" | ||
className="mb-1" | ||
placeholder="" | ||
size="large" | ||
type="email" | ||
/> | ||
<p className="text-gray-400 mb-4"> | ||
We will only use this address to contact you about security or | ||
billing changes on your account. No marketing emails, no sales | ||
emails, nothing like that. | ||
</p> | ||
<Input | ||
className="bg-opacity-25 border-0 text-base w-6/12 mb-2 cursor-pointer hover:border-0 border-transparent hover:border-transparent" | ||
size="large" | ||
style={{ background: '#0A40FF14', color: '#0A40FF' }} | ||
type="submit" | ||
value="Get activation code" | ||
/> | ||
<Button | ||
className="bg-opacity-25 border-0 text-base mb-2" | ||
size="large" | ||
onClick={() => history.goBack()} | ||
style={{ color: '#0A40FF' }} | ||
> | ||
Return to subscription plans | ||
</Button> | ||
</form> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default TrialActivation; |
Oops, something went wrong.