updated signin dialog
This commit is contained in:
parent
1b9182aac7
commit
4820f175dd
5 changed files with 55 additions and 38 deletions
|
@ -1,4 +1,5 @@
|
|||
const html = require('choo/html');
|
||||
const assets = require('../../common/assets');
|
||||
const { bytes, platform } = require('../utils');
|
||||
const { canceledSignup, submittedSignup } = require('../metrics');
|
||||
|
||||
|
@ -8,37 +9,51 @@ module.exports = function(trigger) {
|
|||
const hidden = platform() === 'android' ? 'hidden' : '';
|
||||
let submitting = false;
|
||||
return html`
|
||||
<send-signup-dialog class="flex flex-col p-4">
|
||||
<h2 class="font-bold">${state.translate('accountBenefitTitle')}</h3>
|
||||
<ul class="my-2 leading-normal list-reset text-lg mb-8 mt-4">
|
||||
<li>${state.translate('accountBenefitLargeFiles', {
|
||||
size: bytes(state.LIMITS.MAX_FILE_SIZE)
|
||||
})}</li>
|
||||
<li>${state.translate('accountBenefitExpiry')}</li>
|
||||
<li>${state.translate('accountBenefitExpiryTwo', { count: DAYS })}</li>
|
||||
<li>${state.translate('accountBenefitSync')}</li>
|
||||
</ul>
|
||||
<form
|
||||
onsubmit=${submitEmail}
|
||||
data-no-csrf>
|
||||
<input
|
||||
id="email-input"
|
||||
type="text"
|
||||
class="${hidden} border rounded-lg w-full px-2 py-1 h-12 mb-4 text-lg text-grey-darker leading-loose"
|
||||
placeholder=${state.translate('emailEntryPlaceholder')} />
|
||||
<input
|
||||
class="btn rounded-lg w-full flex flex-no-shrink items-center justify-center"
|
||||
value="${state.translate('signInMenuOption')}"
|
||||
title="${state.translate('signInMenuOption')}"
|
||||
id="email-submit"
|
||||
type="submit" />
|
||||
</form>
|
||||
<button
|
||||
class="my-4 text-blue-dark hover:text-blue-darker focus:text-blue-darker font-medium"
|
||||
title="${state.translate('deletePopupCancel')}"
|
||||
onclick=${cancel}>${state.translate('deletePopupCancel')}
|
||||
</button>
|
||||
</send-signup-dialog>`;
|
||||
<send-signup-dialog
|
||||
class="flex flex-col md:flex-row justify-center px-8 md:px-24 w-full h-full"
|
||||
>
|
||||
<img src="${assets.get('firefox_logo-only.svg')}" class="h-16 mb-4" />
|
||||
<section class="flex flex-col flex-no-shrink self-center mx-6 max-w-xs">
|
||||
<h1 class="font-bold">${state.translate('accountBenefitTitle')}</h1>
|
||||
<ul class="leading-normal text-grey-darkest my-2 mb-8 mt-4 pl-4">
|
||||
<li>
|
||||
${state.translate('accountBenefitLargeFiles', {
|
||||
size: bytes(state.LIMITS.MAX_FILE_SIZE)
|
||||
})}
|
||||
</li>
|
||||
<li>${state.translate('accountBenefitExpiry')}</li>
|
||||
<li>
|
||||
${state.translate('accountBenefitExpiryTwo', { count: DAYS })}
|
||||
</li>
|
||||
<li>${state.translate('accountBenefitSync')}</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="flex flex-col flex-grow m-4">
|
||||
<form onsubmit=${submitEmail} data-no-csrf>
|
||||
<input
|
||||
id="email-input"
|
||||
type="text"
|
||||
class="${hidden} border rounded-lg w-full px-2 py-1 h-12 mb-3 text-lg text-grey-darker leading-loose"
|
||||
placeholder=${state.translate('emailEntryPlaceholder')}
|
||||
/>
|
||||
<input
|
||||
class="btn rounded-lg w-full flex flex-no-shrink items-center justify-center"
|
||||
value="${state.translate('signInMenuOption')}"
|
||||
title="${state.translate('signInMenuOption')}"
|
||||
id="email-submit"
|
||||
type="submit"
|
||||
/>
|
||||
</form>
|
||||
<button
|
||||
class="my-3 text-blue-dark hover:text-blue-darker focus:text-blue-darker font-medium"
|
||||
title="${state.translate('deletePopupCancel')}"
|
||||
onclick=${cancel}
|
||||
>
|
||||
${state.translate('deletePopupCancel')}
|
||||
</button>
|
||||
</section>
|
||||
</send-signup-dialog>
|
||||
`;
|
||||
|
||||
function emailish(str) {
|
||||
if (!str) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue