added a webmanifest (#1023)
This commit is contained in:
parent
5028351e6e
commit
416b9902cb
|
@ -36,6 +36,8 @@ module.exports = function(state, body = '') {
|
|||
content="${state.baseUrl}${assets.get('send-twitter.jpg')}"
|
||||
/>
|
||||
<meta property="og:url" content="${state.baseUrl}" />
|
||||
<meta name="theme-color" content="#0a84ff" />
|
||||
<link rel="manifest" href="/app.webmanifest" />
|
||||
|
||||
<title>${state.title}</title>
|
||||
|
||||
|
|
|
@ -70,6 +70,7 @@ module.exports = function(app) {
|
|||
app.get('/oauth', language, pages.blank);
|
||||
app.get('/legal', language, pages.legal);
|
||||
app.get('/jsconfig.js', require('./jsconfig'));
|
||||
app.get('/app.webmanifest', language, require('./webmanifest'));
|
||||
app.get(`/download/:id${ID_REGEX}`, language, pages.download);
|
||||
app.get('/unsupported/:reason', language, pages.unsupported);
|
||||
app.get(`/api/download/:id${ID_REGEX}`, auth.hmac, require('./download'));
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
const assets = require('../../common/assets');
|
||||
|
||||
module.exports = function(req, res) {
|
||||
const manifest = {
|
||||
name: 'Firefox Send',
|
||||
short_name: 'Send',
|
||||
lang: req.language,
|
||||
icons: [
|
||||
{
|
||||
src: assets.get('favicon-144.png'),
|
||||
type: 'image/png',
|
||||
sizes: '144x144'
|
||||
},
|
||||
{
|
||||
src: assets.get('send_logo.svg'),
|
||||
type: 'image/svg',
|
||||
sizes: '192x192 512x512'
|
||||
}
|
||||
],
|
||||
start_url: '/',
|
||||
display: 'standalone',
|
||||
orientation: 'portrait',
|
||||
theme_color: '#0a84ff',
|
||||
background_color: 'white'
|
||||
};
|
||||
res.set('Content-Type', 'application/manifest+json');
|
||||
res.json(manifest);
|
||||
};
|
Loading…
Reference in New Issue