Skip to content

Commit

Permalink
Merge pull request #13 from SeaweedbrainCY/pwa
Browse files Browse the repository at this point in the history
Add PWA to rescue
  • Loading branch information
SeaweedbrainCY authored Dec 5, 2024
2 parents e4c6cf5 + e5aaa2c commit 05dde3d
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 2 deletions.
6 changes: 4 additions & 2 deletions frontend/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"tsConfig": "tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets"
"src/assets",
"src/manifest.webmanifest"
],
"styles": [
"src/styles.scss",
Expand Down Expand Up @@ -94,7 +95,8 @@
"tsConfig": "tsconfig.spec.json",
"assets": [
"src/favicon.ico",
"src/assets"
"src/assets",
"src/manifest.webmanifest"
],
"styles": [
"src/styles.scss"
Expand Down
45 changes: 45 additions & 0 deletions frontend/ngsw-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"$schema": "./node_modules/@angular/service-worker/config/schema.json",
"index": "/index.html",
"dataGroups": [
{
"name": "frontend-performance",
"urls": [
"**"
],
"cacheConfig": {
"strategy": "performance",
"maxSize": 200,
"maxAge": "3d",
"timeout": "10s"
}
}
],
"assetGroups": [
{
"name": "app",
"installMode": "prefetch",
"updateMode": "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)"
]
}
}
]
}
Binary file added frontend/src/assets/pwa_desktop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/src/assets/pwa_phone.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions frontend/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/png" href="favicon.ico">
<link rel="manifest" href="manifest.webmanifest">
<meta name="theme-color" content="#1976d2">
</head>

<body>
Expand Down
35 changes: 35 additions & 0 deletions frontend/src/manifest.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name": "Rescue Zero-TOTP",
"short_name": "Rescue Zero-TOTP - Your emergency Zero-TOTP",
"theme_color": "#FFFFFF",
"background_color": "#16262E",
"display": "standalone",
"scope": "./",
"start_url": "./openVault",
"icons": [
{
"src": "assets/totp_square_red.png",
"sizes": "800x800",
"type": "image/png"
},
{
"src": "favicon.ico",
"sizes": "256x256",
"type": "image/png"
}
],
"screenshots": [
{
"src": "assets/pwa_desktop.png",
"sizes": "1309x750",
"type": "image/png",
"form_factor": "wide"
},
{
"src": "assets/pwa_phone.png",
"sizes": "413x824",
"type": "image/png",
"form_factor": "narrow"
}
]
}

0 comments on commit 05dde3d

Please sign in to comment.