send/server/routes/webmanifest.js

29 lines
668 B
JavaScript
Raw Normal View History

2018-11-20 20:00:32 +00:00
const assets = require('../../common/assets');
module.exports = function(req, res) {
const manifest = {
name: 'Firefox Send',
short_name: 'Send',
lang: req.language,
icons: [
{
2019-02-19 20:52:09 +00:00
src: assets.get('android-chrome-192x192.png'),
2018-11-20 20:00:32 +00:00
type: 'image/png',
2019-02-19 20:52:09 +00:00
sizes: '192x192'
2018-11-20 20:00:32 +00:00
},
{
2019-02-19 20:52:09 +00:00
src: assets.get('android-chrome-512x512.png'),
type: 'image/png',
sizes: '512x512'
2018-11-20 20:00:32 +00:00
}
],
start_url: '/',
display: 'standalone',
orientation: 'portrait',
2019-02-19 20:52:09 +00:00
theme_color: '#ffffff',
2018-11-20 20:00:32 +00:00
background_color: 'white'
};
res.set('Content-Type', 'application/manifest+json');
res.json(manifest);
};