update ui

This commit is contained in:
John Gruen 2018-09-28 16:54:23 +02:00 committed by Danny Coates
parent 3bf7798323
commit 8964387331
No known key found for this signature in database
GPG key ID: 4C442633C62E00CB
15 changed files with 591 additions and 445 deletions

View file

@ -1,9 +1,31 @@
.header {
align-items: flex-start;
box-sizing: border-box;
align-items: flex-end;
display: flex;
flex-direction: row;
height: calc(var(--grid-basis) * 4);
justify-content: space-between;
height: 32px;
padding: 10px;
width: 100%;
}
.header h1 {
margin: 0;
}
.feedback {
background-color: #979797;
background-image: url('../assets/feedback.svg');
background-position: 2px 4px;
background-repeat: no-repeat;
background-size: 18px;
color: var(--primaryControlFGColor);
cursor: pointer;
display: block;
font-size: 12px;
line-height: 12px;
padding: 5px 5px 5px 20px;
text-indent: 2px;
transition: all 250ms ease-in-out;
white-space: nowrap;
margin-left: calc(var(--grid-basis) * 2);
margin-bottom: 8px;
}

View file

@ -1,8 +1,20 @@
const html = require('choo/html');
const version = require('../../../package.json').version;
const { browserName } = require('../../utils');
module.exports = function(state) {
const browser = browserName();
const feedbackUrl = `https://qsurvey.mozilla.com/s3/txp-firefox-send?ver=${version}&browser=${browser}`;
module.exports = function() {
const header = html`
<header class="header">
<h1>Firefox Send</h1>
<a href="${feedbackUrl}"
rel="noreferrer noopener"
class="feedback"
alt="Feedback"
target="_blank">${state.translate('siteFeedback')}
</a>
</header>`;
// HACK
// We only want to render this once because we