drop.chapril.org-firefoxsend/server/routes/webmanifest.js

31 lines
690 B
JavaScript
Raw Normal View History

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