Skip to content

Commit

Permalink
Add pwa
Browse files Browse the repository at this point in the history
  • Loading branch information
miladsoft committed Sep 17, 2024
1 parent c199de7 commit fe49d79
Show file tree
Hide file tree
Showing 16 changed files with 3,468 additions and 2,821 deletions.
3 changes: 2 additions & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@
"maximumError": "90kb"
}
],
"outputHashing": "all"
"outputHashing": "all",
"serviceWorker": "ngsw-config.json"
},
"development": {
"optimization": false,
Expand Down
Empty file added manifest.webmanifest
Empty file.
29 changes: 29 additions & 0 deletions ngsw-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"$schema": "./node_modules/@angular/service-worker/config/schema.json",
"index": "/index.html",
"assetGroups": [
{
"name": "app",
"installMode": "prefetch",
"resources": {
"files": [
"/favicon.ico",
"/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)"
]
}
}
]
}
6,124 changes: 3,337 additions & 2,787 deletions package-lock.json

Large diffs are not rendered by default.

67 changes: 34 additions & 33 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,66 +13,67 @@
"deploy": "ng deploy"
},
"dependencies": {
"@angular/animations": "18.0.1",
"@angular/cdk": "18.0.1",
"@angular/common": "18.0.1",
"@angular/compiler": "18.0.1",
"@angular/core": "18.0.1",
"@angular/forms": "18.0.1",
"@angular/material": "18.0.1",
"@angular/material-luxon-adapter": "18.0.1",
"@angular/platform-browser": "18.0.1",
"@angular/platform-browser-dynamic": "18.0.1",
"@angular/router": "18.0.1",
"@angular/animations": "18.2.4",
"@angular/cdk": "18.2.4",
"@angular/common": "18.2.4",
"@angular/compiler": "18.2.4",
"@angular/core": "18.2.4",
"@angular/forms": "18.2.4",
"@angular/material": "18.2.4",
"@angular/material-luxon-adapter": "18.2.4",
"@angular/platform-browser": "18.2.4",
"@angular/platform-browser-dynamic": "18.2.4",
"@angular/pwa": "^18.2.4",
"@angular/router": "18.2.4",
"@gandlaf21/bolt11-decode": "^3.1.1",
"@ngneat/cashew": "^4.1.0",
"@ngneat/transloco": "6.0.4",
"@noble/hashes": "^1.5.0",
"@noble/secp256k1": "^2.1.0",
"apexcharts": "3.49.1",
"apexcharts": "3.53.0",
"bech32": "^2.0.0",
"crypto-js": "4.2.0",
"dayjs": "^1.11.13",
"highlight.js": "11.9.0",
"highlight.js": "11.10.0",
"localforage": "^1.10.0",
"lodash-es": "4.17.21",
"luxon": "3.4.4",
"ng-apexcharts": "1.10.0",
"ngx-quill": "26.0.1",
"luxon": "3.5.0",
"ng-apexcharts": "1.12.0",
"ngx-quill": "26.0.8",
"nostr-tools": "^2.7.2",
"perfect-scrollbar": "1.5.5",
"quill": "2.0.2",
"rxjs": "7.8.1",
"tslib": "2.6.2",
"zone.js": "0.14.6"
"tslib": "2.7.0",
"zone.js": "0.15.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "18.0.2",
"@angular/cli": "18.0.2",
"@angular/compiler-cli": "18.0.1",
"@tailwindcss/typography": "0.5.13",
"@angular-devkit/build-angular": "18.2.4",
"@angular/cli": "18.2.4",
"@angular/compiler-cli": "18.2.4",
"@tailwindcss/typography": "0.5.15",
"@types/chroma-js": "2.4.4",
"@types/crypto-js": "4.2.2",
"@types/highlight.js": "10.1.0",
"@types/jasmine": "5.1.4",
"@types/lodash": "4.17.4",
"@types/lodash": "4.17.7",
"@types/lodash-es": "4.17.12",
"@types/luxon": "3.4.2",
"angular-cli-ghpages": "^2.0.1",
"autoprefixer": "10.4.19",
"chroma-js": "2.4.2",
"jasmine-core": "5.1.2",
"karma": "6.4.3",
"autoprefixer": "10.4.20",
"chroma-js": "3.1.1",
"jasmine-core": "5.3.0",
"karma": "6.4.4",
"karma-chrome-launcher": "3.2.0",
"karma-coverage": "2.2.1",
"karma-jasmine": "5.1.0",
"karma-jasmine-html-reporter": "2.1.0",
"lodash": "4.17.21",
"postcss": "8.4.38",
"prettier": "3.3.0",
"prettier-plugin-organize-imports": "3.2.4",
"prettier-plugin-tailwindcss": "0.6.1",
"tailwindcss": "3.4.3",
"typescript": "5.4.5"
"postcss": "8.4.47",
"prettier": "3.3.3",
"prettier-plugin-organize-imports": "4.0.0",
"prettier-plugin-tailwindcss": "0.6.6",
"tailwindcss": "3.4.12",
"typescript": "5.5.2"
}
}
Binary file added public/app-icons/icon-128x128.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 public/app-icons/icon-144x144.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 public/app-icons/icon-152x152.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 public/app-icons/icon-192x192.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 public/app-icons/icon-384x384.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 public/app-icons/icon-512x512.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 public/app-icons/icon-72x72.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 public/app-icons/icon-96x96.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
59 changes: 59 additions & 0 deletions public/manifest.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"name": "Angor Hub",
"short_name": "hub",
"theme_color": "#022229",
"background_color": "#022229",
"display": "standalone",
"scope": "./",
"start_url": "./",
"icons": [
{
"src": "app-icons/icon-72x72.png",
"sizes": "72x72",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "app-icons/icon-96x96.png",
"sizes": "96x96",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "app-icons/icon-128x128.png",
"sizes": "128x128",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "app-icons/icon-144x144.png",
"sizes": "144x144",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "app-icons/icon-152x152.png",
"sizes": "152x152",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "app-icons/icon-192x192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "app-icons/icon-384x384.png",
"sizes": "384x384",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "app-icons/icon-512x512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable any"
}
]
}
2 changes: 2 additions & 0 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@

<!-- Splash screen styles -->
<link href="styles/splash-screen.css" rel="stylesheet" />

<link rel="manifest" href="manifest.webmanifest">
</head>

<body>
Expand Down
5 changes: 5 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@ import { appConfig } from 'app/app.config';
bootstrapApplication(AppComponent, appConfig).catch((err) =>
console.error(err)
);
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('/ngsw-worker.js').then(() => {
console.log('Service Worker Registered');
});
}

0 comments on commit fe49d79

Please sign in to comment.