reorged routes/index.js (broken)

This commit is contained in:
Danny Coates 2018-10-01 14:20:26 -07:00
parent 8964387331
commit 5b939d2c95
No known key found for this signature in database
GPG Key ID: 4C442633C62E00CB
3 changed files with 30 additions and 30 deletions

View File

@ -1,6 +1,8 @@
const html = require('choo/html');
const assets = require('../../../common/assets');
const title = require('../../templates/title');
const signupPromo = require('../../templates/signupPromo');
const fileList = require('../../templates/fileList');
const setPasswordSection = require('../../templates/setPasswordSection');
const uploadBox = require('../../templates/uploadedFileList');
const expireInfo = require('../../templates/expireInfo');
@ -30,9 +32,30 @@ module.exports = function(state, emit) {
}
return html`
<div class="${fade}">
<div class="${fade} welcome">
${title(state)}
<div class="welcome__file-manager">
</div>
<div class="welcome__context">
<div class="welcome__signup-promo">
${signupPromo(state)}
</div>
<div class="welcome__file-list">
${fileList(state)}
</div>
<div class="welcome__context-footer">
<a
href="https://www.mozilla.org"
class="socialSection__link">
<img
class="footer__mozLogo"
src="${assets.get('mozilla-logo.svg')}"
alt="mozilla"/>
</a>
</div>
</div>
<label class="uploadArea"
ondragover=${dragover}

View File

@ -4,11 +4,7 @@ const nanotiming = require('nanotiming');
const download = require('./download');
const footer = require('../templates/footer');
const fxPromo = require('../templates/fxPromo');
const signupPromo = require('../templates/signupPromo');
const fileList = require('../templates/fileList');
const profile = require('../templates/userAccount');
const modal = require('../templates/modal');
const assets = require('../../common/assets');
const header = require('../templates/header');
nanotiming.disabled = true;
@ -28,12 +24,12 @@ module.exports = function() {
}
}
function body(template) {
function body(page) {
return function(state, emit) {
const b = html`<body>
${modalDialog(state, emit)}
${banner(state, emit)}
${header(state)}
${header(state, emit)}
<main class="main">
<noscript>
<div class="noscript">
@ -46,28 +42,7 @@ module.exports = function() {
<p>${state.translate('enableJavascript')}</p>
</div>
</noscript>
<div class="main__file-manager">
${profile(state, emit)}
${template(state, emit)}
</div>
<div class="main__context">
<div class="main__signup-promo">
${signupPromo(state)}
</div>
<div class="main__file-list">
${fileList(state)}
</div>
<div class="main__context-footer">
<a
href="https://www.mozilla.org"
class="socialSection__link">
<img
class="footer__mozLogo"
src="${assets.get('mozilla-logo.svg')}"
alt="mozilla"/>
</a>
</div>
</div>
${page(state, emit)}
</main>
${footer(state)}
</body>`;

View File

@ -1,14 +1,16 @@
const html = require('choo/html');
const userAccount = require('../../templates/userAccount');
const version = require('../../../package.json').version;
const { browserName } = require('../../utils');
module.exports = function(state) {
module.exports = function(state, emit) {
const browser = browserName();
const feedbackUrl = `https://qsurvey.mozilla.com/s3/txp-firefox-send?ver=${version}&browser=${browser}`;
const header = html`
<header class="header">
<h1>Firefox Send</h1>
${userAccount(state, emit)}
<a href="${feedbackUrl}"
rel="noreferrer noopener"
class="feedback"