traggo/server

Add web app manifest

AudunVN opened this issue · 1 comments

Is your feature request related to a problem? Please describe.
Adding a shortcut to Traggo on mobile devices currently opens it in the default browser as a regular web page, which is less than ideal as it amongst other things means you can't switch to/from Traggo without opening and occupying the web browser.

Describe the solution you'd like
Adding a simple web app manifest could be a fairly good and quick solution for this. Something like the suggestions below would allow home screen website shortcuts to feel and work a lot more like a standalone app on modern mobile devices.

index.html

<head>
	[...]
	<link rel="manifest" href="/manifest.json">
	[...]
</head>

manifest.json

{
	"name": "Treggo",
	"short_name": "Treggo",
	"description": "Tag-based time tracking",
	"theme_color": "#9bd7fe",
	"background_color": "#3f51b5",
	"display": "standalone",
	"scope": "/",
	"start_url": "/",
	"icons": [
		{
			"src": "/favicon-16x16.png",
			"sizes": "16x16",
			"type": "image/png"
		}, {
			"src": "/favicon-32x32.png",
			"sizes": "32x32",
			"type": "image/png"
		}, {
			"src": "/favicon-192x192.png",
			"sizes": "192x192",
			"type": "image/png"
		}, {
			"src": "/favicon-256x256.png",
			"sizes": "256x256",
			"type": "image/png"
		}
	]
}

The contents of manifest.json - such as the description and colours - have been taken from https://traggo.net/.

Will see if I can test and create a pull request for this later, haven't currently got a dev environment set up; just got started using Traggo today. Liking it a lot so far, thanks for the effort! 😄

Describe alternatives you've considered
Creating a whole separate mobile app, but that is likely a very large amount of extra effort for little gain. As stated in #83 (comment), implementing a PWA is probably a better solution and this feature request could be a good starting point for that.

Additional context
Initially written as a comment for #83, but became a separate feature request.

Sure thing, I'd be open for a PR (:.