Skip to content

Commit

Permalink
fix: make sure install button is available (#1678)
Browse files Browse the repository at this point in the history
updated manifest file
  • Loading branch information
TheSlimvReal authored Jan 26, 2023
1 parent 7db1a6d commit 8fdf016
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 11 deletions.
7 changes: 4 additions & 3 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"assets": [
"src/assets",
"src/favicon.ico",
"src/manifest.json",
"src/manifest.webmanifest",
{
"glob": "**/*",
"input": "node_modules/leaflet/dist/images/",
Expand Down Expand Up @@ -63,7 +63,8 @@
"with": "src/environments/environment.prod.ts"
}
],
"serviceWorker": true
"serviceWorker": true,
"ngswConfigPath": "ngsw-config.json"
},
"development": {}
},
Expand Down Expand Up @@ -104,7 +105,7 @@
"assets": [
"src/assets",
"src/favicon.ico",
"src/manifest.json"
"src/manifest.webmanifest"
]
}
},
Expand Down
2 changes: 1 addition & 1 deletion src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ import { TodosModule } from "./features/todos/todos.module";
declarations: [AppComponent],
imports: [
// Global Angular modules
ServiceWorkerModule.register("/ngsw-worker.js", {
ServiceWorkerModule.register("ngsw-worker.js", {
enabled: environment.production,
}),
Angulartics2Module.forRoot({
Expand Down
2 changes: 1 addition & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
content="width=device-width, initial-scale=1, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, viewport-fit=cover">
<link rel="icon" type="image/x-icon" href="favicon.ico">

<link rel="manifest" href="manifest.json">
<link rel="manifest" href="manifest.webmanifest">
<meta name="theme-color" content="#1976d2">

<meta name="apple-mobile-web-app-capable" content="yes">
Expand Down
22 changes: 16 additions & 6 deletions src/manifest.json → src/manifest.webmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"theme_color": "#1976d2",
"background_color": "#fafafa",
"display": "standalone",
"scope": ".",
"start_url": ".",
"scope": "./",
"start_url": "./",
"icons": [
{
"src": "assets/icons/icon-72x72.png",
Expand Down Expand Up @@ -33,21 +33,31 @@
"type": "image/png"
},
{
"src": "manifest-icon-192.png",
"src": "assets/icons/icon-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "assets/icons/manifest-icon-192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "maskable any"
"purpose": "maskable"
},
{
"src": "assets/icons/icon-384x384.png",
"sizes": "384x384",
"type": "image/png"
},
{
"src": "manifest-icon-512.png",
"src": "assets/icons/icon-512x512.png",
"sizes": "512x512",
"type": "image/png"
},
{
"src": "assets/icons/manifest-icon-512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable any"
"purpose": "maskable"
}
]
}

0 comments on commit 8fdf016

Please sign in to comment.