webmanifest.js 690 B

123456789101112131415161718192021222324252627282930
  1. const state = require('../state');
  2. module.exports = async function(req, res) {
  3. const appState = await state(req);
  4. const manifest = {
  5. name: 'Send',
  6. short_name: 'Send',
  7. lang: req.language,
  8. icons: [
  9. {
  10. src: appState.ui.assets.android_chrome_192px,
  11. type: 'image/png',
  12. sizes: '192x192'
  13. },
  14. {
  15. src: appState.ui.assets.android_chrome_512px,
  16. type: 'image/png',
  17. sizes: '512x512'
  18. }
  19. ],
  20. start_url: '/',
  21. display: 'standalone',
  22. orientation: 'portrait',
  23. theme_color: '#220033',
  24. background_color: 'white'
  25. };
  26. res.set('Content-Type', 'application/manifest+json');
  27. res.json(manifest);
  28. };