pwa
@ -62,7 +62,8 @@
|
||||
"maximumError": "8kB"
|
||||
}
|
||||
],
|
||||
"outputHashing": "all"
|
||||
"outputHashing": "all",
|
||||
"serviceWorker": "ngsw-config.json"
|
||||
},
|
||||
"development": {
|
||||
"optimization": false,
|
||||
@ -137,5 +138,8 @@
|
||||
"@schematics/angular:resolver": {
|
||||
"typeSeparator": "."
|
||||
}
|
||||
},
|
||||
"cli": {
|
||||
"analytics": false
|
||||
}
|
||||
}
|
30
ngsw-config.json
Normal file
@ -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)"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
20
package-lock.json
generated
@ -18,6 +18,7 @@
|
||||
"@angular/platform-browser": "^20.0.2",
|
||||
"@angular/platform-browser-dynamic": "^20.0.2",
|
||||
"@angular/router": "^20.0.2",
|
||||
"@angular/service-worker": "^20.0.2",
|
||||
"ngx-markdown": "^20.0.0",
|
||||
"ngx-toastr": "^19.0.0",
|
||||
"prismjs": "^1.30.0",
|
||||
@ -605,6 +606,25 @@
|
||||
"rxjs": "^6.5.3 || ^7.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@angular/service-worker": {
|
||||
"version": "20.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@angular/service-worker/-/service-worker-20.0.2.tgz",
|
||||
"integrity": "sha512-3Kg4wFX0WjeTH7rEQurbNgcf1e4wTIie6au5/Q3ktqfYpKVa9p6d4Zqd8vJw5VqmTXnV09ZMB3czQQz2RvfBxA==",
|
||||
"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": "20.0.2",
|
||||
"rxjs": "^6.5.3 || ^7.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@antfu/install-pkg": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@antfu/install-pkg/-/install-pkg-1.1.0.tgz",
|
||||
|
@ -20,6 +20,7 @@
|
||||
"@angular/platform-browser": "^20.0.2",
|
||||
"@angular/platform-browser-dynamic": "^20.0.2",
|
||||
"@angular/router": "^20.0.2",
|
||||
"@angular/service-worker": "^20.0.2",
|
||||
"ngx-markdown": "^20.0.0",
|
||||
"ngx-toastr": "^19.0.0",
|
||||
"prismjs": "^1.30.0",
|
||||
@ -40,4 +41,4 @@
|
||||
"karma-jasmine-html-reporter": "~2.1.0",
|
||||
"typescript": "~5.8.3"
|
||||
}
|
||||
}
|
||||
}
|
BIN
public/icons/icon-128x128.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
public/icons/icon-144x144.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
public/icons/icon-152x152.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
public/icons/icon-192x192.png
Normal file
After Width: | Height: | Size: 4.2 KiB |
BIN
public/icons/icon-384x384.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
public/icons/icon-512x512.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
public/icons/icon-72x72.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
public/icons/icon-96x96.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
57
public/manifest.webmanifest
Normal file
@ -0,0 +1,57 @@
|
||||
{
|
||||
"name": "Chat",
|
||||
"short_name": "Chat",
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';
|
||||
import { ApplicationConfig, provideZoneChangeDetection, isDevMode } from '@angular/core';
|
||||
import { provideRouter, withInMemoryScrolling } from '@angular/router';
|
||||
|
||||
import { routes } from './app.routes';
|
||||
@ -6,6 +6,7 @@ import { provideHttpClient } from '@angular/common/http';
|
||||
import { provideToastr } from 'ngx-toastr';
|
||||
import { provideAnimations } from '@angular/platform-browser/animations';
|
||||
import { provideMarkdown } from 'ngx-markdown';
|
||||
import { provideServiceWorker } from '@angular/service-worker';
|
||||
|
||||
export const appConfig: ApplicationConfig = {
|
||||
providers: [
|
||||
@ -21,6 +22,10 @@ export const appConfig: ApplicationConfig = {
|
||||
positionClass: 'toast-top-right',
|
||||
closeButton: true
|
||||
}),
|
||||
provideMarkdown()
|
||||
provideMarkdown(),
|
||||
provideServiceWorker('ngsw-worker.js', {
|
||||
enabled: !isDevMode(),
|
||||
registrationStrategy: 'registerWhenStable:30000'
|
||||
})
|
||||
]
|
||||
};
|
||||
|
@ -1,15 +1,20 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Chat</title>
|
||||
<base href="/">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
||||
<link rel="manifest" href="manifest.webmanifest">
|
||||
</head>
|
||||
|
||||
<body class="mat-typography">
|
||||
<app-root></app-root>
|
||||
<noscript>Please enable JavaScript to continue using this application.</noscript>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</html>
|