wip
This commit is contained in:
parent
2b81ff1fb3
commit
cc85486414
28 changed files with 207 additions and 97 deletions
|
@ -1,5 +1,5 @@
|
|||
const html = require('choo/html');
|
||||
|
||||
module.exports = function() {
|
||||
return html`<div></div>`;
|
||||
return html`<main class="main"></main>`;
|
||||
};
|
||||
|
|
|
@ -4,7 +4,7 @@ const title = require('../templates/title');
|
|||
|
||||
module.exports = function(state) {
|
||||
return html`
|
||||
<div class="page">
|
||||
<main class="main page">
|
||||
${title(state)}
|
||||
<div class="title">${state.translate('legalHeader')}</div>
|
||||
${raw(
|
||||
|
@ -20,7 +20,7 @@ module.exports = function(state) {
|
|||
'https://www.mozilla.org/about/legal/terms/mozilla/'
|
||||
])
|
||||
)}
|
||||
</div>
|
||||
</main>
|
||||
`;
|
||||
};
|
||||
|
||||
|
|
|
@ -4,19 +4,15 @@ const title = require('../../templates/title');
|
|||
|
||||
module.exports = function(state) {
|
||||
return html`
|
||||
<div class="page">
|
||||
|
||||
<main class="main page">
|
||||
${title(state)}
|
||||
|
||||
<div class="error">${state.translate('expiredPageHeader')}</div>
|
||||
<img src="${assets.get(
|
||||
'illustration_expired.svg'
|
||||
)}" class="flexible" id="expired-img">
|
||||
<img src="${assets.get('illustration_expired.svg')}" id="expired-img">
|
||||
<div class="description">
|
||||
${state.translate('uploadPageExplainer')}
|
||||
</div>
|
||||
<a class="link link--action" href="/">
|
||||
${state.translate('sendYourFilesLink')}
|
||||
</a>
|
||||
</div>`;
|
||||
</main>`;
|
||||
};
|
||||
|
|
|
@ -4,9 +4,9 @@ const downloadPassword = require('../../templates/downloadPassword');
|
|||
|
||||
module.exports = function(state, emit) {
|
||||
return html`
|
||||
<div class="page">
|
||||
<main class="main page">
|
||||
${titleSection(state)}
|
||||
|
||||
|
||||
<div class="description">${state.translate('downloadMessage2')}</div>
|
||||
${downloadPassword(state, emit)}
|
||||
|
||||
|
@ -14,6 +14,6 @@ module.exports = function(state, emit) {
|
|||
${state.translate('sendYourFilesLink')}
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</main>
|
||||
`;
|
||||
};
|
||||
|
|
|
@ -23,6 +23,7 @@ module.exports = function(state, emit) {
|
|||
|
||||
return split(
|
||||
state,
|
||||
emit,
|
||||
downloadedFiles(fileInfo, state, emit),
|
||||
html`
|
||||
<div class="copySection">
|
||||
|
|
|
@ -19,6 +19,7 @@ module.exports = function(state, emit) {
|
|||
|
||||
return split(
|
||||
state,
|
||||
emit,
|
||||
uploadedFileList(file, state, emit),
|
||||
html`
|
||||
<div class="copySection">
|
||||
|
|
|
@ -6,7 +6,7 @@ const bytes = require('../../utils').bytes;
|
|||
|
||||
module.exports = function(state, emit) {
|
||||
return html`
|
||||
<div class="page signInPage">
|
||||
<main class="main page signInPage">
|
||||
${title(state)}
|
||||
<div class="signIn__info flexible">
|
||||
${state.translate('accountBenefitTitle')}
|
||||
|
@ -44,7 +44,7 @@ module.exports = function(state, emit) {
|
|||
<label class="btn" for="email-submit">
|
||||
${state.translate('signInContinueButton')}
|
||||
</label>
|
||||
</div>
|
||||
</main>
|
||||
`;
|
||||
|
||||
function submitEmail(event) {
|
||||
|
|
|
@ -1,18 +1,20 @@
|
|||
const html = require('choo/html');
|
||||
const title = require('../templates/title');
|
||||
const signupPromo = require('../templates/signupPromo');
|
||||
const controlArea = require('../templates/controlArea');
|
||||
|
||||
module.exports = function(state, a, b) {
|
||||
module.exports = function(state, emit, a, b) {
|
||||
return html`
|
||||
<div class="split">
|
||||
<div class="split__left">
|
||||
${title(state)}
|
||||
${a}
|
||||
</div>
|
||||
<div class="split__right">
|
||||
${signupPromo(state)}
|
||||
${b}
|
||||
</div>
|
||||
<main class="main">
|
||||
${controlArea(state, emit)}
|
||||
<div class="split__left">
|
||||
${title(state)}
|
||||
${a}
|
||||
</div>
|
||||
<div class="split__right">
|
||||
${b}
|
||||
</div>
|
||||
${signupPromo(state)}
|
||||
</main>
|
||||
`;
|
||||
};
|
||||
|
|
|
@ -32,7 +32,7 @@ module.exports = function(state) {
|
|||
}
|
||||
|
||||
return html`
|
||||
<div class="page unsupportedPage">
|
||||
<main class="main page unsupportedPage">
|
||||
${title(state)}
|
||||
<div class="error unsupportedPage__error">${strings.header}</div>
|
||||
<div class="description flexible">
|
||||
|
@ -53,7 +53,7 @@ module.exports = function(state) {
|
|||
<div class="unsupportedPage__info">
|
||||
${strings.explainer}
|
||||
</div>
|
||||
</div>`;
|
||||
</main>`;
|
||||
};
|
||||
|
||||
function outdatedStrings(state) {
|
||||
|
|
18
app/pages/uploads/index.js
Normal file
18
app/pages/uploads/index.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
const html = require('choo/html');
|
||||
const controlArea = require('../../templates/controlArea');
|
||||
const archiveTile = require('../../templates/archiveTile');
|
||||
|
||||
module.exports = function(state, emit) {
|
||||
const fileArea = state.storage.files.length
|
||||
? html`<ul class="myUploads">
|
||||
${state.storage.files.map(f => archiveTile(f, state))}
|
||||
</ul>`
|
||||
: html`<div>nothing to see here</div>`;
|
||||
return html`<main class="main">
|
||||
${controlArea(state, emit)}
|
||||
<div class="wide">
|
||||
<h1>${state.translate('myUploads')}</h1>
|
||||
${fileArea}
|
||||
</div>
|
||||
</main>`;
|
||||
};
|
11
app/pages/uploads/uploads.css
Normal file
11
app/pages/uploads/uploads.css
Normal file
|
@ -0,0 +1,11 @@
|
|||
.myUploads {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: grid;
|
||||
grid-gap: 12px;
|
||||
grid-template-columns: repeat(auto-fit, 150px);
|
||||
grid-auto-columns: 150px;
|
||||
grid-auto-rows: 160px;
|
||||
list-style-type: none;
|
||||
overflow: scroll;
|
||||
}
|
|
@ -2,5 +2,5 @@ const fileManager = require('../../templates/fileManager');
|
|||
const split = require('../split');
|
||||
|
||||
module.exports = function(state, emit) {
|
||||
return split(state, fileManager(state, emit));
|
||||
return split(state, emit, fileManager(state, emit));
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue