-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update password reset email look #8
Changes from 4 commits
f24a85b
5bc7a9b
9d20b30
c5cc874
c7504cc
e012583
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/usr/bin/env node | ||
const yargs = require('yargs') | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
const { spawn, spawnSync } = require('child_process'); | ||
const { emailPasswordReset } = require('../src/lib/email/pre-defined/email-password-reset.js'); | ||
|
||
// ----------------------------------------------------------------------------- | ||
|
||
const main = async () => { | ||
const args = yargs | ||
.usage('example usage') | ||
.option('to', { | ||
alias: 'to', | ||
type: 'string', | ||
describe: "who to send the email to, duh!", | ||
}) | ||
.option('reset-url', { | ||
alias: 'to', | ||
type: 'string', | ||
describe: "who to send the email to, duh!", | ||
}) | ||
.epilogue('example epilogue') | ||
.argv; | ||
|
||
const result = await emailPasswordReset({ | ||
to: args.to, | ||
resetUrl: args.resetUrl, | ||
}); | ||
|
||
console.log(result); | ||
} | ||
|
||
main(); |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,13 +8,21 @@ export const emailPasswordReset = ({ | |
}) => email({ | ||
to, | ||
from: '[email protected]', | ||
subject: 'Password reset request', | ||
subject: '[TurningPointTales] Please reset your password', | ||
html: ` | ||
You have requested a password reset. | ||
<br/> | ||
If this was made in error, disregard. | ||
<br/> | ||
<br/> | ||
<a href="${resetUrl}" >Click here to reset your password</a> | ||
`, | ||
}); | ||
You forgot your password, didn't you? A tale as old as time.<br/> | ||
We're won't hold it against you. Forgive and forget.<br/> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. s/'re// |
||
Here's a link to reset your password. | ||
<br/> | ||
<br/> | ||
<a href="${resetUrl}" >Password reset link</a> | ||
<br/> | ||
<br/> | ||
If you didn't request a password reset, please ignore this email. | ||
<br /> | ||
<br/> | ||
Adventure safely, | ||
<br/> | ||
- The Team At Turning Point Tales | ||
`, | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { | ||
browserStore | ||
} from '../browserStore'; | ||
} from './index'; | ||
import { | ||
AD_SEEN | ||
} from './preDefinedKeys'; | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,6 +67,7 @@ | |
} | ||
|
||
img { | ||
width: 100%; | ||
display: flex; | ||
max-width: 500px; | ||
margin: 0 auto; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
import * as sapper from "@sapper/app"; | ||
import { fade } from "../lib/Transition"; | ||
import { axios } from "src/lib/axios"; | ||
import { statusTracking } from "../lib/stores/status-tracking"; | ||
import { statusTracking } from "../lib/status-tracking"; | ||
import { Input, Form } from "src/components/Form"; | ||
import Button from "src/components/Button.svelte"; | ||
|
||
|
@@ -41,17 +41,17 @@ | |
</script> | ||
|
||
<style> | ||
:global(.password-reset) { | ||
:global(.form) { | ||
width: 100%; | ||
max-width: 50ch; | ||
} | ||
|
||
:global(.password-reset .button) { | ||
:global(.form .button) { | ||
width: 100%; | ||
margin: 32px auto auto auto; | ||
} | ||
|
||
:global(.password-reset .input) { | ||
:global(.form .input) { | ||
width: 100%; | ||
} | ||
|
||
|
@@ -60,17 +60,17 @@ | |
margin: 8px 0 8px 0; | ||
} | ||
|
||
a { | ||
text-align: left; | ||
a { text-align: left; } | ||
|
||
h3 { | ||
margin-bottom: 32px; | ||
} | ||
</style> | ||
|
||
<Form className="password-reset"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll have to look into this later, but svelte does NOT like you doing this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ruh roh..... |
||
<Form> | ||
{#if successMsg} | ||
<h3 in:fade>{successMsg}</h3> | ||
{#if $page.query.token} | ||
<a href="/user/login">Click here to login</a> | ||
{/if} | ||
<a href="/user/login">return to login</a> | ||
{:else if $page.query.token} | ||
<h2>New Password</h2> | ||
<small>Try not to forget this one!</small> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
import * as sapper from "@sapper/app"; | ||
import { axios } from "src/lib/axios"; | ||
import { fade } from "src/lib/Transition"; | ||
import { statusTracking } from "src/lib/stores/status-tracking"; | ||
import { statusTracking } from "src/lib/status-tracking"; | ||
import { Input, Form, Checkbox } from "src/components/Form"; | ||
import Button from "src/components/Button.svelte"; | ||
import FAQ from "src/routes/faq.svelte"; | ||
|
@@ -54,6 +54,11 @@ | |
</script> | ||
|
||
<style> | ||
.user-new { | ||
max-width: 720px; | ||
margin: auto; | ||
} | ||
|
||
p { | ||
text-align: left; | ||
margin-bottom: 0; | ||
|
@@ -82,36 +87,36 @@ | |
<title>User Creation</title> | ||
</svelte:head> | ||
|
||
{#if $page.query.error === 'unknown'} | ||
<section class="errors text"> | ||
<section class='user-new'> | ||
{#if $page.query.error === 'unknown'} | ||
<article class="errors"> | ||
<p> | ||
An unknown error occurred! Please try again or contact | ||
<a href="mailto:[email protected]"> | ||
[email protected] | ||
</a> | ||
. | ||
</p> | ||
</article> | ||
{/if} | ||
|
||
<article> | ||
<h1>Let's create your user!</h1> | ||
|
||
<p> | ||
An unknown error occurred! Please try again or contact | ||
<a href="mailto:[email protected]"> | ||
[email protected] | ||
</a> | ||
. | ||
Creating an account grants you access to the entire library of adventures. | ||
We use your email and name, which we only share for things like payments, to | ||
personalize the experience and send you exciting updates. In lieu of sharing | ||
your data and browsing with a third party, we handcraft some interesting ads | ||
or let you skip those entirely with a paid subscription. | ||
</p> | ||
</section> | ||
{/if} | ||
|
||
<section class="preamble text"> | ||
<h1>Let's create your user!</h1> | ||
|
||
<p> | ||
Creating an account grants you access to the entire library of adventures. | ||
We use your email and name, which we only share for things like payments, to | ||
personalize the experience and send you exciting updates. In lieu of sharing | ||
your data and browsing with a third party, we handcraft some interesting ads | ||
or let you skip those entirely with a paid subscription. | ||
</p> | ||
|
||
<p> | ||
More questions? Check out our | ||
<a href="/faq">FAQ.</a> | ||
</p> | ||
</section> | ||
|
||
<section class="form text"> | ||
<p> | ||
More questions? Check out our | ||
<a href="/faq">FAQ.</a> | ||
</p> | ||
</article> | ||
|
||
<Form on:submit="{handleSubmit}" bind:this="{form}"> | ||
{#if errorMsg} | ||
<span class="error form-group">{errorMsg}</span> | ||
|
@@ -177,11 +182,11 @@ | |
Sign up | ||
</Button> | ||
</Form> | ||
</section> | ||
|
||
<section class="text"> | ||
<p> | ||
If you already have an account with us, you can log in | ||
<a href="/user/login">here.</a> | ||
</p> | ||
<article> | ||
<p> | ||
If you already have an account with us, you can log in | ||
<a href="/user/login">here.</a> | ||
</p> | ||
</article> | ||
</section> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@krwenholz
@cody-h2wib
Want your opinion on the markup / copy here, and if there's anything
you'd word differently. I based this on a generalized group of reset password emails
from a couple sites.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nit] I'd say
TurningPointTales:
for a subject.