Merge pull request #280 from mozilla/unsupported
created /unsupported page and added gcmCompliant to /download page
This commit is contained in:
commit
834df8526f
@ -1,6 +1,6 @@
|
|||||||
require('./common');
|
require('./common');
|
||||||
const FileReceiver = require('./fileReceiver');
|
const FileReceiver = require('./fileReceiver');
|
||||||
const { notify, findMetric, sendEvent } = require('./utils');
|
const { notify, findMetric, gcmCompliant, sendEvent } = require('./utils');
|
||||||
const bytes = require('bytes');
|
const bytes = require('bytes');
|
||||||
const Storage = require('./storage');
|
const Storage = require('./storage');
|
||||||
const storage = new Storage(localStorage);
|
const storage = new Storage(localStorage);
|
||||||
@ -11,6 +11,14 @@ require('jquery-circle-progress');
|
|||||||
const Raven = window.Raven;
|
const Raven = window.Raven;
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
gcmCompliant().catch(err => {
|
||||||
|
$('#download').attr('hidden', true);
|
||||||
|
sendEvent('recipient', 'unsupported', {
|
||||||
|
cd6: err
|
||||||
|
}).then(() => {
|
||||||
|
location.replace('/unsupported');
|
||||||
|
});
|
||||||
|
});
|
||||||
//link back to homepage
|
//link back to homepage
|
||||||
$('.send-new').attr('href', window.location.origin);
|
$('.send-new').attr('href', window.location.origin);
|
||||||
|
|
||||||
|
@ -27,10 +27,10 @@ if (storage.has('referrer')) {
|
|||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
gcmCompliant().catch(err => {
|
gcmCompliant().catch(err => {
|
||||||
$('#page-one').attr('hidden', true);
|
$('#page-one').attr('hidden', true);
|
||||||
$('#unsupported-browser').removeAttr('hidden');
|
|
||||||
// record unsupported event
|
|
||||||
sendEvent('sender', 'unsupported', {
|
sendEvent('sender', 'unsupported', {
|
||||||
cd6: err
|
cd6: err
|
||||||
|
}).then(() => {
|
||||||
|
location.replace('/unsupported');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -80,6 +80,10 @@ app.get('/', (req, res) => {
|
|||||||
res.render('index');
|
res.render('index');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
app.get('/unsupported', (req, res) => {
|
||||||
|
res.render('unsupported');
|
||||||
|
});
|
||||||
|
|
||||||
app.get('/jsconfig.js', (req, res) => {
|
app.get('/jsconfig.js', (req, res) => {
|
||||||
res.set('Content-Type', 'application/javascript');
|
res.set('Content-Type', 'application/javascript');
|
||||||
res.render('jsconfig', {
|
res.render('jsconfig', {
|
||||||
|
@ -71,15 +71,3 @@
|
|||||||
<img id="upload-error-img" data-l10n-id="errorAltText" src="/resources/illustration_error.svg"/>
|
<img id="upload-error-img" data-l10n-id="errorAltText" src="/resources/illustration_error.svg"/>
|
||||||
<a class="send-new" id="send-new-error" data-l10n-id="sendAnotherFileLink"></a>
|
<a class="send-new" id="send-new-error" data-l10n-id="sendAnotherFileLink"></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="unsupported-browser" hidden="true">
|
|
||||||
<div class="title" data-l10n-id="notSupportedHeader"></div>
|
|
||||||
<div class="description" data-l10n-id="notSupportedDetail"></div>
|
|
||||||
<a id="dl-firefox" href="https://www.mozilla.org/firefox/new/?scene=2" target="_blank">
|
|
||||||
<img src="/resources/firefox_logo-only.svg" id="firefox-logo" alt="Firefox"/>
|
|
||||||
<div id="dl-firefox-text">Firefox<br>
|
|
||||||
<span data-l10n-id="downloadFirefoxButtonSub"></span>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
<div class="unsupported-description" data-l10n-id="uploadPageExplainer"></div>
|
|
||||||
</div>
|
|
||||||
|
11
views/unsupported.handlebars
Normal file
11
views/unsupported.handlebars
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<div id="unsupported-browser">
|
||||||
|
<div class="title" data-l10n-id="notSupportedHeader"></div>
|
||||||
|
<div class="description" data-l10n-id="notSupportedDetail"></div>
|
||||||
|
<a id="dl-firefox" href="https://www.mozilla.org/firefox/new/?scene=2" target="_blank">
|
||||||
|
<img src="/resources/firefox_logo-only.svg" id="firefox-logo" alt="Firefox"/>
|
||||||
|
<div id="dl-firefox-text">Firefox<br>
|
||||||
|
<span data-l10n-id="downloadFirefoxButtonSub"></span>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<div class="unsupported-description" data-l10n-id="uploadPageExplainer"></div>
|
||||||
|
</div>
|
Loading…
Reference in New Issue
Block a user