Skip to content
This repository has been archived by the owner on May 22, 2021. It is now read-only.

Commit

Permalink
debrand web app
Browse files Browse the repository at this point in the history
  • Loading branch information
dannycoates committed May 21, 2021
1 parent 1131908 commit ade10e4
Show file tree
Hide file tree
Showing 128 changed files with 715 additions and 1,686 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
# [![Firefox Send](./assets/icon.svg)](https://send.firefox.com/) Firefox Send
# Firefox Send

[![CircleCI](https://img.shields.io/circleci/project/github/mozilla/send.svg)](https://circleci.com/gh/mozilla/send)

## NOTICE - May 2021

Mozilla discontinued the Firefox Send service in September 2021. For more information about this, please see the [Mozilla Blog](https://blog.mozilla.org/blog/2020/09/17/update-on-firefox-send-and-firefox-notes/).

Please note that the [Mozilla Public License 2.0](https://www.mozilla.org/en-US/MPL/2.0/) does not "grant any rights in the trademarks, service marks, or logos of any Contributor." You may fork and modify the source code for Firefox Send pursuant to the Mozilla Public License, but you may not create a version of the service that uses Mozilla trademarks or logos.

This repository is archived. In May 2021, Mozilla removed Mozilla trademarks from some of the files in this repository so that developers using this code are less likely to inadvertently infringe Mozilla's trademarks and confuse users. You are welcome to copy and modify this code under its open source license, but please ensure that all use complies with [Mozilla's trademark policy](https://www.mozilla.org/en-US/foundation/trademarks/policy/). In other words, if you create a new version of Firefox Send you must remove all "Mozilla" and "Firefox" branding to ensure that users are not confused about who is providing the service.

**Docs:** [FAQ](docs/faq.md), [Encryption](docs/encryption.md), [Build](docs/build.md), [Docker](docs/docker.md), [Metrics](docs/metrics.md), [More](docs/)

---
Expand Down
19 changes: 2 additions & 17 deletions app/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import { bytes, locale } from './utils';
import okDialog from './ui/okDialog';
import copyDialog from './ui/copyDialog';
import shareDialog from './ui/shareDialog';
import signupDialog from './ui/signupDialog';
import surveyDialog from './ui/surveyDialog';

export default function(state, emitter) {
let lastRender = 0;
Expand Down Expand Up @@ -36,7 +34,7 @@ export default function(state, emitter) {
document.addEventListener('blur', () => (updateTitle = true));
document.addEventListener('focus', () => {
updateTitle = false;
emitter.emit('DOMTitleChange', 'Firefox Send');
emitter.emit('DOMTitleChange', 'Send');
});
checkFiles();
});
Expand Down Expand Up @@ -110,19 +108,6 @@ export default function(state, emitter) {
render();
});

emitter.on('signup-cta', source => {
const query = state.query;
state.user.startAuthFlow(source, {
campaign: query.utm_campaign,
content: query.utm_content,
medium: query.utm_medium,
source: query.utm_source,
term: query.utm_term
});
state.modal = signupDialog(source);
render();
});

emitter.on('authenticate', async (code, oauthState) => {
try {
await state.user.finishLogin(code, oauthState);
Expand Down Expand Up @@ -309,7 +294,7 @@ export default function(state, emitter) {
!state.user.surveyed
) {
state.user.surveyed = true;
state.modal = surveyDialog();
// state.modal = surveyDialog();
} else {
state.modal = null;
}
Expand Down
22 changes: 0 additions & 22 deletions app/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ a:focus {
}

body {
background-image: url('../assets/bg.svg');
background-position: center;
background-repeat: no-repeat;
background-size: cover;
overflow-x: hidden;
}

Expand Down Expand Up @@ -182,19 +178,6 @@ footer li:hover {
@apply bg-white;
}

.mozilla-logo {
background-image: url('../assets/mozilla-logo.svg');
background-repeat: no-repeat;
background-size: 100px, 48px;
overflow: hidden;
text-indent: 120%;
white-space: nowrap;
display: inline-block;
height: 32px;
width: 100px;
flex-shrink: 0;
}

#password-msg::after {
content: '\200b';
}
Expand Down Expand Up @@ -337,11 +320,6 @@ select {
@apply bg-grey-90;
}

.mozilla-logo {
background-color: white;
border: 1px solid white;
}

@screen md {
.main > section {
@apply border;
Expand Down
1 change: 0 additions & 1 deletion app/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ module.exports = function(app = choo({ hash: true })) {
app.route('/download/:id', body(download));
app.route('/download/:id/:key', body(download));
app.route('/unsupported/:reason', body(require('./ui/unsupported')));
app.route('/legal', body(require('./ui/legal')));
app.route('/error', body(require('./ui/error')));
app.route('/blank', body(require('./ui/blank')));
app.route('/oauth', function(state, emit) {
Expand Down
18 changes: 2 additions & 16 deletions app/ui/body.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,15 @@
const html = require('choo/html');
const Promo = require('./promo');
const Header = require('./header');
const Footer = require('./footer');

function banner(state) {
if (state.layout) {
return; // server side
}
const show =
!state.capabilities.standalone &&
!state.route.startsWith('/unsupported/') &&
state.locale === 'en-US';
if (show) {
return state.cache(Promo, 'promo').render();
}
}

module.exports = function body(main) {
return function(state, emit) {
const b = html`
<body
class="flex flex-col items-center font-sans md:h-screen md:bg-grey-10 dark:bg-black"
>
${banner(state, emit)} ${state.cache(Header, 'header').render()}
${main(state, emit)} ${state.cache(Footer, 'footer').render()}
${state.cache(Header, 'header').render()} ${main(state, emit)}
${state.cache(Footer, 'footer').render()}
</body>
`;
if (state.layout) {
Expand Down
27 changes: 1 addition & 26 deletions app/ui/footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,35 +12,10 @@ class Footer extends Component {
}

createElement() {
const translate = this.state.translate;
return html`
<footer
class="flex flex-col md:flex-row items-start w-full flex-none self-start p-6 md:p-8 font-medium text-xs text-grey-60 dark:text-grey-40 md:items-center justify-between"
>
<a class="mozilla-logo m-2" href="https://www.mozilla.org/">
Mozilla
</a>
<ul
class="flex flex-col md:flex-row items-start md:items-center md:justify-end"
>
<li class="m-2">
<a href="https://www.mozilla.org/about/legal/terms/services/#send">
${translate('footerLinkLegal')}
</a>
</li>
<li class="m-2">
<a href="/legal"> ${translate('footerLinkPrivacy')} </a>
</li>
<li class="m-2">
<a href="https://www.mozilla.org/privacy/websites/#cookies">
${translate('footerLinkCookies')}
</a>
</li>
<li class="m-2">
<a href="https://github.com/mozilla/send">GitHub </a>
</li>
</ul>
</footer>
></footer>
`;
}
}
Expand Down
109 changes: 0 additions & 109 deletions app/ui/legal.js

This file was deleted.

40 changes: 0 additions & 40 deletions app/ui/promo.js

This file was deleted.

24 changes: 0 additions & 24 deletions app/ui/report.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const html = require('choo/html');
const raw = require('choo/html/raw');
const assets = require('../../common/assets');

const REPORTABLES = ['Malware', 'Pii', 'Abuse'];
Expand All @@ -16,13 +15,6 @@ module.exports = function(state, emit) {
<p class="text-xl text-center mb-4 leading-normal">
${state.translate('reportUnknownDescription')}
</p>
<p class="text-center">
${raw(
replaceLinks(state.translate('reportReasonCopyright'), [
'https://www.mozilla.org/about/legal/report-infringement/'
])
)}
</p>
</section>
</main>
`;
Expand Down Expand Up @@ -88,13 +80,6 @@ module.exports = function(state, emit) {
</li>
`
)}
<li class="mt-4 mb-2 leading-normal">
${raw(
replaceLinks(state.translate('reportReasonCopyright'), [
'https://www.mozilla.org/about/legal/report-infringement/'
])
)}
</li>
</ul>
</fieldset>
<input
Expand Down Expand Up @@ -127,13 +112,4 @@ module.exports = function(state, emit) {
const form = event.target;
emit('report', { reason: form.reason.value });
}

function replaceLinks(str, urls) {
let i = 0;
const s = str.replace(
/<a>([^<]+)<\/a>/g,
(m, v) => `<a class="text-blue" href="${urls[i++]}">${v}</a>`
);
return `<p>${s}</p>`;
}
};
Loading

0 comments on commit ade10e4

Please sign in to comment.