send/server/routes/webmanifest.js

31 lines
690 B
JavaScript
Raw Permalink Normal View History

2022-04-12 13:58:58 +00:00
const state = require('../state');
module.exports = async function(req, res) {
const appState = await state(req);
2018-11-20 20:00:32 +00:00
const manifest = {
name: 'Send',
2018-11-20 20:00:32 +00:00
short_name: 'Send',
lang: req.language,
icons: [
{
2022-04-12 13:58:58 +00:00
src: appState.ui.assets.android_chrome_192px,
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
},
{
2022-04-12 13:58:58 +00:00
src: appState.ui.assets.android_chrome_512px,
2019-02-19 20:52:09 +00:00
type: 'image/png',
sizes: '512x512'
2018-11-20 20:00:32 +00:00
}
],
start_url: '/',
display: 'standalone',
orientation: 'portrait',
2019-03-10 00:45:17 +00:00
theme_color: '#220033',
2018-11-20 20:00:32 +00:00
background_color: 'white'
};
res.set('Content-Type', 'application/manifest+json');
res.json(manifest);
};