From 2976193b422f645a03780581b21bb8c2503cb3e4 Mon Sep 17 00:00:00 2001 From: Tuur Lievens Date: Sun, 13 Sep 2020 13:44:14 +0200 Subject: [PATCH] Add web manifest --- src/backend/routes/PublicRouter.ts | 19 +++++++++++++++++++ src/frontend/index.html | 5 +++++ 2 files changed, 24 insertions(+) diff --git a/src/backend/routes/PublicRouter.ts b/src/backend/routes/PublicRouter.ts index ac8d7f77..2ef09cf1 100644 --- a/src/backend/routes/PublicRouter.ts +++ b/src/backend/routes/PublicRouter.ts @@ -93,6 +93,25 @@ export class PublicRouter { } ); + app.get('/manifest.json', + (req: Request, res: Response, next: NextFunction) => { + res.send({ + name: Config.Client.applicationTitle, + icons: [ + { + src: 'assets/icon_inv.png', + sizes: '48x48 72x72 96x96 128x128 256x256' + } + ], + display: 'standalone', + orientation: 'any', + start_url: Config.Client.publicUrl, + background_color: '#000000', + theme_color: '#000000' + }); + } + ); + app.get(['/', '/login', '/gallery*', '/share*', '/admin', '/duplicates', '/faces', '/search*'], AuthenticationMWs.tryAuthenticate, setLocale, diff --git a/src/frontend/index.html b/src/frontend/index.html index e683a869..130d77ea 100644 --- a/src/frontend/index.html +++ b/src/frontend/index.html @@ -7,6 +7,11 @@ + + + + +