Skip to content

Commit

Permalink
feat(PWA): improve manifest configuration (#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn committed Jan 22, 2024
1 parent 43d22fb commit f64990f
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .env.preprod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VITE_OPEN_PRICES_API_URL = "https://prices.openfoodfacts.net/api/v1"
VITE_MANIFEST_PATH = "/app/manifest.json"
VITE_MANIFEST_PATH = "/app/manifest.preprod.json"
VITE_DEFAULT_LOCALE = en
VITE_FALLBACK_LOCALE = en
2 changes: 1 addition & 1 deletion .env.prod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VITE_OPEN_PRICES_API_URL = "https://prices.openfoodfacts.org/api/v1"
VITE_MANIFEST_PATH = "/app/manifest.json"
VITE_MANIFEST_PATH = "/app/manifest.prod.json"
VITE_DEFAULT_LOCALE = en
VITE_FALLBACK_LOCALE = en
4 changes: 2 additions & 2 deletions public/manifest.local.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Open Prices",
"short_name": "Open Prices",
"name": "Open Prices (Local)",
"short_name": "OpenPrices (Local)",
"icons": [
{
"src": "/android-chrome-192x192.png",
Expand Down
21 changes: 21 additions & 0 deletions public/manifest.preprod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "Open Prices (Preprod)",
"short_name": "OpenPrices (Preprod)",
"icons": [
{
"src": "/app/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/app/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"scope": "https://prices.openfoodfacts.net/app/",
"start_url": "https://prices.openfoodfacts.net/app",
"display": "standalone"
}
5 changes: 3 additions & 2 deletions public/manifest.json → public/manifest.prod.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Open Prices",
"short_name": "Open Prices",
"short_name": "OpenPrices",
"icons": [
{
"src": "/app/android-chrome-192x192.png",
Expand All @@ -15,6 +15,7 @@
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"start_url": "/app/",
"scope": "https://prices.openfoodfacts.com/app/",
"start_url": "https://prices.openfoodfacts.com/app",
"display": "standalone"
}

0 comments on commit f64990f

Please sign in to comment.