-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Looks more professional.
- Loading branch information
Showing
7 changed files
with
14 additions
and
11 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -10,7 +10,7 @@ import { CreatedDeck, createResponse } from './createResponse'; | |
import { isPaying } from '../../lib/isPaying'; | ||
|
||
const getPayingErrorMessage = () => { | ||
return "There was an unknown error with your upload. Please try again. If the problem persists, please contact the developer <a href='mailto:[email protected]'>[email protected]</a>."; | ||
return "There was an unknown error with your upload. Please try again. If the problem persists, please contact <a href='mailto:[email protected]'>[email protected]</a>."; | ||
}; | ||
|
||
class SimpleUploadController { | ||
|
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 |
---|---|---|
|
@@ -39,3 +39,5 @@ export const CREATE_DECK_SCRIPT_PATH = path.join( | |
CREATE_DECK_DIR, | ||
'create_deck.py' | ||
); | ||
|
||
export const SUPPORT_EMAIL_ADDRESS = '[email protected]'; |
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,4 +1,5 @@ | ||
import { renderToStaticMarkup } from 'react-dom/server'; | ||
import { SUPPORT_EMAIL_ADDRESS } from '../constants'; | ||
|
||
export const getLimitMessage = () => | ||
renderToStaticMarkup( | ||
|
@@ -29,7 +30,8 @@ export const getLimitMessage = () => | |
If you already have an account, please{' '} | ||
<a href="/login?redirect=/upload">login</a> and try again. If you are | ||
still experiencing issues, please contact{' '} | ||
<a href="mailto:[email protected]">[email protected]</a>. | ||
<a href={`mailto:${SUPPORT_EMAIL_ADDRESS}`}>${SUPPORT_EMAIL_ADDRESS}</a> | ||
. | ||
</p> | ||
</div> | ||
); |
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,6 +1,6 @@ | ||
import { isLimitError } from './isLimitError'; | ||
|
||
const MOCK_MSG = "<div class=\"content\"><h3 class=\"title is-3\">Your request has hit the limit</h3><ul><li>Split your request into multiple smaller ones (i.e.) make your upload size smaller.</li><li><div class=\"is-flex is-align-items-center\"><a class=\"button is-success is-medium mr-2\" href=\"https://buy.stripe.com/eVadTGcCI6Ny73qfZ0\">Subscribe</a> for only 2 EUR per month to remove all the limits.</div></li><li>Or <a href=\"https://alemayhu.com/patreon\">Become a patron</a> to support me.</li></ul><p>If you already have an account, please <a href=\"/login?redirect=/upload\">login</a> and try again. If you are still experiencing issues, please contact <a href=\"mailto:[email protected]\">[email protected]</a>.</p></div>"; | ||
const MOCK_MSG = "<div class=\"content\"><h3 class=\"title is-3\">Your request has hit the limit</h3><ul><li>Split your request into multiple smaller ones (i.e.) make your upload size smaller.</li><li><div class=\"is-flex is-align-items-center\"><a class=\"button is-success is-medium mr-2\" href=\"https://buy.stripe.com/eVadTGcCI6Ny73qfZ0\">Subscribe</a> for only 2 EUR per month to remove all the limits.</div></li><li>Or <a href=\"https://alemayhu.com/patreon\">Become a patron</a> to support me.</li></ul><p>If you already have an account, please <a href=\"/login?redirect=/upload\">login</a> and try again. If you are still experiencing issues, please contact <a href=\"mailto:[email protected]\">[email protected]</a>.</p></div>"; | ||
|
||
describe('isLimitError', () => { | ||
it('returns true ', () => { | ||
|
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 |
---|---|---|
|
@@ -27,9 +27,9 @@ class EmailService implements IEmailService { | |
to: email, | ||
from: this.defaultSender, | ||
subject: 'Reset your 2anki.net password', | ||
text: `I received your password change request, you can change it here ${link}`, | ||
text: `We received your password change request, you can change it here ${link}`, | ||
html: markup, | ||
replyTo: '[email protected]', | ||
replyTo: '[email protected]', | ||
}; | ||
|
||
sgMail.send(msg); | ||
|
@@ -52,7 +52,7 @@ class EmailService implements IEmailService { | |
subject: `2anki.net - Your «${filename}» deck is ready`, | ||
text: 'Attached is your deck', | ||
html: markup, | ||
replyTo: '[email protected]', | ||
replyTo: '[email protected]', | ||
attachments: [ | ||
{ | ||
content: contents.toString('base64'), | ||
|
@@ -74,7 +74,7 @@ class EmailService implements IEmailService { | |
subject: `2anki.net - Your «${filename}» deck is ready`, | ||
text: `Download your deck here: ${link}`, | ||
html: markup, | ||
replyTo: '[email protected]', | ||
replyTo: '[email protected]', | ||
}; | ||
|
||
await sgMail.send(msg); | ||
|
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 |
---|---|---|
|
@@ -29,9 +29,9 @@ <h1 class="title">Your converted deck is ready!</h1> | |
<p><strong>Alexander Alemayhu</strong> Developer of 2anki.net</p> | ||
<hr /> | ||
<p class="has-text-grey-light"> | ||
If you did not request this deck conversion, please contact me via | ||
If you did not request this deck conversion, please contact us via | ||
<a href="mailto:[email protected]">[email protected]</a>. | ||
<a href="mailto:[email protected]">[email protected]</a>. | ||
</p> | ||
</div> | ||
</section> | ||
|
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 |
---|---|---|
|
@@ -22,8 +22,7 @@ <h1 class="title">Your converted deck is ready!</h1> | |
<hr /> | ||
<p class="has-text-grey-light"> | ||
If you did not request this deck conversion, please contact | ||
the maintainer of 2anki.net via email <a href="mailto:[email protected]">[email protected]</a>. | ||
</p> | ||
us via email <a href="mailto:[email protected]">[email protected]</a>. | ||
</p> | ||
</div> | ||
</section> | ||
|