diff --git a/src/db/CreatorDatabase.ts b/src/db/CreatorDatabase.ts index 95935b2cb..9ea9862b4 100644 --- a/src/db/CreatorDatabase.ts +++ b/src/db/CreatorDatabase.ts @@ -7,7 +7,7 @@ import type { User } from 'firebase/auth'; export const CreatorCollection = 'creators'; /** The type for a record returned by our cloud functions */ -export type CreatorSchema = { +type CreatorSchema = { uid: string; name: string | null; email: string | null; @@ -15,7 +15,7 @@ export type CreatorSchema = { export class Creator { /** This is the domain we append to work around the lack of Firebase support for raw usernames. */ - static CreatorUsernameEmailDomain = '@wordplay.dev'; + static CreatorUsernameEmailDomain = '@u.wordplay.dev'; readonly data: CreatorSchema; constructor(data: CreatorSchema) { this.data = data; diff --git a/src/locale/en-US.json b/src/locale/en-US.json index b9413f9f7..5b5134238 100644 --- a/src/locale/en-US.json +++ b/src/locale/en-US.json @@ -4198,14 +4198,14 @@ "play": "You're logged in, we can save your projects online now! Want to create something?", "emailrules": [ "• Don't provide your email if you are *12 or younger*.", - "• If you *lose access* to your email account, you won't be able to update your email address." + "• If you *lose access* to your email account, you won't be able to log in or update your email address." ], "usernamerules": [ "• *Usernames* should not contain identiable information (e.g., names), cannot be an email addresses, and should be at least 5 characters long", "• *Passwords* must be at least 10 characters long; if you're not using a password manager, choose three long words you'll remember.", "• *If you forget your password*, you can't recover your account, since we have no other way to know it's you. Store your password somewhere safe, like a password manager" ], - "passwordreminder": "It looks like you're creating an account. Reveal it above, and make sure you wrote it down correctly, then submit again to create your account.", + "passwordreminder": "It looks like you're creating an account. Check your password, make sure you stored it safely and correctly, then submit again to create your account.", "change": "Want to change your email? Submit a new one and we'll send a confirmation to the old one.", "sent": "Check your email for a login link. Patience, email can be slow!", "logout": "Leaving a shared device and want to keep your projects private? Logout and we'll remove your projects from this device. They will still be stored online.", @@ -4220,7 +4220,7 @@ "invalid": "This link isn't valid.", "email": "This email wasn't valid.", "failure": "Unable to login :(", - "offline": "You appear to be offline.", + "offline": "We couldn't reach the cloud ☁️.", "unchanged": "We couldn't change your email address, but we don't know why.", "delete": "We couldn't delete your account, but we don't know why.", "wrongPassword": "Not a valid username and password. Either your password is wrong, or someone else has this username." diff --git a/src/routes/login/EmailLogin.svelte b/src/routes/login/EmailLogin.svelte new file mode 100644 index 000000000..e494400cc --- /dev/null +++ b/src/routes/login/EmailLogin.svelte @@ -0,0 +1,130 @@ + + +{$locales.get((l) => l.ui.page.login.subheader.email)} + +
+ l.ui.page.login.field.email.description + )} + placeholder={$locales.get( + (l) => l.ui.page.login.field.email.placeholder + )} + bind:text={email} + editable={!submitted} + /> + +
+ l.ui.page.login.prompt.emailrules)} + /> +
diff --git a/src/routes/login/Login.svelte b/src/routes/login/Login.svelte index f038a7526..f88f77dda 100644 --- a/src/routes/login/Login.svelte +++ b/src/routes/login/Login.svelte @@ -1,186 +1,31 @@ +
{$locales.get((l) => l.ui.page.login.header)}
+

- {#if missingEmail} - {$locales.get((l) => l.ui.page.login.prompt.enter)} - {:else if $user === null} - {$locales.get((l) => l.ui.page.login.prompt.login)} - {/if} + {$locales.get((l) => l.ui.page.login.prompt.login)}

+ l.ui.page.login.prompt.age.modes)} choice={0} @@ -188,114 +33,8 @@ descriptions={$locales.get((l) => l.ui.page.login.prompt.age)} /> -{#if missingEmail || !younger} - {$locales.get((l) => l.ui.page.login.subheader.email)} -
-
- l.ui.page.login.field.email.description - )} - placeholder={$locales.get( - (l) => l.ui.page.login.field.email.placeholder - )} - bind:text={email} - editable={!sent} - /> - -
- l.ui.page.login.prompt.emailrules)} - /> - -{/if} - -{#if sent === true} - {$locales.get((l) => l.ui.page.login.prompt.sent)} -{:else if success === true} - {$locales.get((l) => l.ui.page.login.prompt.success)} -{:else if emailLoginFeedback !== undefined} - {emailLoginFeedback} -{/if} - -{$locales.get((l) => l.ui.page.login.subheader.username)} -