diff --git a/booklore-ui/angular.json b/booklore-ui/angular.json index 2ee301054..a6d2f8e96 100644 --- a/booklore-ui/angular.json +++ b/booklore-ui/angular.json @@ -85,7 +85,8 @@ "maximumError": "25kB" } ], - "outputHashing": "all" + "outputHashing": "all", + "serviceWorker": "ngsw-config.json" }, "development": { "optimization": false, diff --git a/booklore-ui/ngsw-config.json b/booklore-ui/ngsw-config.json new file mode 100644 index 000000000..69edd2878 --- /dev/null +++ b/booklore-ui/ngsw-config.json @@ -0,0 +1,30 @@ +{ + "$schema": "./node_modules/@angular/service-worker/config/schema.json", + "index": "/index.html", + "assetGroups": [ + { + "name": "app", + "installMode": "prefetch", + "resources": { + "files": [ + "/favicon.ico", + "/index.csr.html", + "/index.html", + "/manifest.webmanifest", + "/*.css", + "/*.js" + ] + } + }, + { + "name": "assets", + "installMode": "lazy", + "updateMode": "prefetch", + "resources": { + "files": [ + "/**/*.(svg|cur|jpg|jpeg|png|apng|webp|avif|gif|otf|ttf|woff|woff2)" + ] + } + } + ] +} diff --git a/booklore-ui/package-lock.json b/booklore-ui/package-lock.json index 2d300e15a..a3cbb8b55 100644 --- a/booklore-ui/package-lock.json +++ b/booklore-ui/package-lock.json @@ -17,6 +17,7 @@ "@angular/platform-browser": "^21.1.0", "@angular/platform-browser-dynamic": "^21.1.0", "@angular/router": "^21.1.0", + "@angular/service-worker": "^21.1.0", "@iharbeck/ngx-virtual-scroller": "^19.0.1", "@primeng/themes": "^21.0.3", "@stomp/rx-stomp": "^2.3.0", @@ -810,6 +811,25 @@ "rxjs": "^6.5.3 || ^7.4.0" } }, + "node_modules/@angular/service-worker": { + "version": "21.1.0", + "resolved": "https://registry.npmjs.org/@angular/service-worker/-/service-worker-21.1.0.tgz", + "integrity": "sha512-6Kb9xrq7nFZ8MYnayEojI3HjIn2of4RJSr1CEPux/18KRPHml1IwXFjkwfnKkVZ8WzOVC2robt1Edp9ooLPsyg==", + "license": "MIT", + "dependencies": { + "tslib": "^2.3.0" + }, + "bin": { + "ngsw-config": "ngsw-config.js" + }, + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=24.0.0" + }, + "peerDependencies": { + "@angular/core": "21.1.0", + "rxjs": "^6.5.3 || ^7.4.0" + } + }, "node_modules/@asamuzakjp/css-color": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/@asamuzakjp/css-color/-/css-color-4.1.1.tgz", diff --git a/booklore-ui/package.json b/booklore-ui/package.json index bee5ee868..01504a7f9 100644 --- a/booklore-ui/package.json +++ b/booklore-ui/package.json @@ -21,6 +21,7 @@ "@angular/platform-browser": "^21.1.0", "@angular/platform-browser-dynamic": "^21.1.0", "@angular/router": "^21.1.0", + "@angular/service-worker": "^21.1.0", "@iharbeck/ngx-virtual-scroller": "^19.0.1", "@primeng/themes": "^21.0.3", "@stomp/rx-stomp": "^2.3.0", @@ -66,4 +67,4 @@ "typescript-eslint": "^8.53.0", "vitest": "^4.0.17" } -} +} \ No newline at end of file diff --git a/booklore-ui/public/favicon-128x128.png b/booklore-ui/public/favicon-128x128.png new file mode 100644 index 000000000..3e8db4a89 Binary files /dev/null and b/booklore-ui/public/favicon-128x128.png differ diff --git a/booklore-ui/public/favicon-16x16.png b/booklore-ui/public/favicon-16x16.png new file mode 100644 index 000000000..d7349de4d Binary files /dev/null and b/booklore-ui/public/favicon-16x16.png differ diff --git a/booklore-ui/public/favicon-196x196.png b/booklore-ui/public/favicon-196x196.png new file mode 100644 index 000000000..936094a85 Binary files /dev/null and b/booklore-ui/public/favicon-196x196.png differ diff --git a/booklore-ui/public/favicon-32x32.png b/booklore-ui/public/favicon-32x32.png new file mode 100644 index 000000000..d5df11f89 Binary files /dev/null and b/booklore-ui/public/favicon-32x32.png differ diff --git a/booklore-ui/public/favicon-96x96.png b/booklore-ui/public/favicon-96x96.png new file mode 100644 index 000000000..f797f639c Binary files /dev/null and b/booklore-ui/public/favicon-96x96.png differ diff --git a/booklore-ui/public/favicon.ico b/booklore-ui/public/favicon.ico deleted file mode 100644 index 57614f9c9..000000000 Binary files a/booklore-ui/public/favicon.ico and /dev/null differ diff --git a/booklore-ui/public/icons/icon-128x128.png b/booklore-ui/public/icons/icon-128x128.png new file mode 100755 index 000000000..d7170c3e0 Binary files /dev/null and b/booklore-ui/public/icons/icon-128x128.png differ diff --git a/booklore-ui/public/icons/icon-144x144.png b/booklore-ui/public/icons/icon-144x144.png new file mode 100755 index 000000000..937ca087f Binary files /dev/null and b/booklore-ui/public/icons/icon-144x144.png differ diff --git a/booklore-ui/public/icons/icon-152x152.png b/booklore-ui/public/icons/icon-152x152.png new file mode 100755 index 000000000..9ebb19e73 Binary files /dev/null and b/booklore-ui/public/icons/icon-152x152.png differ diff --git a/booklore-ui/public/icons/icon-192x192.png b/booklore-ui/public/icons/icon-192x192.png new file mode 100755 index 000000000..da0fddb3c Binary files /dev/null and b/booklore-ui/public/icons/icon-192x192.png differ diff --git a/booklore-ui/public/icons/icon-384x384.png b/booklore-ui/public/icons/icon-384x384.png new file mode 100755 index 000000000..c937d1ce0 Binary files /dev/null and b/booklore-ui/public/icons/icon-384x384.png differ diff --git a/booklore-ui/public/icons/icon-512x512.png b/booklore-ui/public/icons/icon-512x512.png new file mode 100755 index 000000000..cdb4fb71c Binary files /dev/null and b/booklore-ui/public/icons/icon-512x512.png differ diff --git a/booklore-ui/public/icons/icon-72x72.png b/booklore-ui/public/icons/icon-72x72.png new file mode 100755 index 000000000..3ce3fa60a Binary files /dev/null and b/booklore-ui/public/icons/icon-72x72.png differ diff --git a/booklore-ui/public/icons/icon-96x96.png b/booklore-ui/public/icons/icon-96x96.png new file mode 100755 index 000000000..fed17797d Binary files /dev/null and b/booklore-ui/public/icons/icon-96x96.png differ diff --git a/booklore-ui/public/manifest.webmanifest b/booklore-ui/public/manifest.webmanifest new file mode 100644 index 000000000..b5c412b37 --- /dev/null +++ b/booklore-ui/public/manifest.webmanifest @@ -0,0 +1,57 @@ +{ + "name": "booklore", + "short_name": "booklore", + "display": "standalone", + "scope": "./", + "start_url": "./", + "icons": [ + { + "src": "icons/icon-72x72.png", + "sizes": "72x72", + "type": "image/png", + "purpose": "maskable any" + }, + { + "src": "icons/icon-96x96.png", + "sizes": "96x96", + "type": "image/png", + "purpose": "maskable any" + }, + { + "src": "icons/icon-128x128.png", + "sizes": "128x128", + "type": "image/png", + "purpose": "maskable any" + }, + { + "src": "icons/icon-144x144.png", + "sizes": "144x144", + "type": "image/png", + "purpose": "maskable any" + }, + { + "src": "icons/icon-152x152.png", + "sizes": "152x152", + "type": "image/png", + "purpose": "maskable any" + }, + { + "src": "icons/icon-192x192.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "maskable any" + }, + { + "src": "icons/icon-384x384.png", + "sizes": "384x384", + "type": "image/png", + "purpose": "maskable any" + }, + { + "src": "icons/icon-512x512.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "maskable any" + } + ] +} diff --git a/booklore-ui/src/index.html b/booklore-ui/src/index.html index 9025126a8..f116a36ef 100644 --- a/booklore-ui/src/index.html +++ b/booklore-ui/src/index.html @@ -6,11 +6,13 @@