Created PWA
@ -23,7 +23,7 @@ import {HttpClientModule} from '@angular/common/http';
|
||||
import { LoginComponent } from './login/login.component';
|
||||
import {environment} from '../environments/environment';
|
||||
import * as firebase from 'firebase/app';
|
||||
import {LoginGuard} from './login/login.guard';
|
||||
import { ServiceWorkerModule } from '@angular/service-worker';
|
||||
|
||||
export const firebaseApp = firebase.initializeApp(environment.firebase);
|
||||
|
||||
@ -52,8 +52,9 @@ export const firebaseApp = firebase.initializeApp(environment.firebase);
|
||||
MatListModule,
|
||||
MatSidenavModule,
|
||||
MatToolbarModule,
|
||||
ServiceWorkerModule.register('ngsw-worker.js', { enabled: false }),
|
||||
],
|
||||
providers: [LoginGuard],
|
||||
providers: [],
|
||||
bootstrap: [AppComponent]
|
||||
})
|
||||
export class AppModule {
|
||||
|
@ -2,7 +2,9 @@ import {CanActivate, Router} from '@angular/router';
|
||||
import {firebaseApp} from '../app.module';
|
||||
import {Injectable} from '@angular/core';
|
||||
|
||||
@Injectable()
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class LoginGuard implements CanActivate {
|
||||
|
||||
constructor(private router: Router) {}
|
||||
|
BIN
src/assets/icons/icon-128x128.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
src/assets/icons/icon-144x144.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
src/assets/icons/icon-152x152.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
src/assets/icons/icon-192x192.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
src/assets/icons/icon-384x384.png
Normal file
After Width: | Height: | Size: 36 KiB |
BIN
src/assets/icons/icon-512x512.png
Normal file
After Width: | Height: | Size: 31 KiB |
BIN
src/assets/icons/icon-72x72.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
src/assets/icons/icon-96x96.png
Normal file
After Width: | Height: | Size: 8.0 KiB |
@ -8,8 +8,11 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" type="image/x-icon" href="assets/icon.png">
|
||||
<link rel="stylesheet" type="text/css" href="assets/bootstrap.min.css">
|
||||
<link rel="manifest" href="manifest.json">
|
||||
<meta name="theme-color" content="#1976d2">
|
||||
</head>
|
||||
<body>
|
||||
<app-root></app-root>
|
||||
<noscript>Please enable JavaScript to continue using this application.</noscript>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,9 +1,7 @@
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
import 'hammerjs';
|
||||
|
||||
if (environment.production) {
|
||||
|
51
src/manifest.json
Normal file
@ -0,0 +1,51 @@
|
||||
{
|
||||
"name": "Home Front",
|
||||
"short_name": "Home Front",
|
||||
"theme_color": "#f8f8f8",
|
||||
"background_color": "#2f323a",
|
||||
"display": "standalone",
|
||||
"scope": "/",
|
||||
"start_url": "/",
|
||||
"icons": [
|
||||
{
|
||||
"src": "assets/icons/icon-72x72.png",
|
||||
"sizes": "72x72",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "assets/icons/icon-96x96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "assets/icons/icon-128x128.png",
|
||||
"sizes": "128x128",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "assets/icons/icon-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "assets/icons/icon-152x152.png",
|
||||
"sizes": "152x152",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "assets/icons/icon-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "assets/icons/icon-384x384.png",
|
||||
"sizes": "384x384",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "assets/icons/icon-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
}
|
||||
]
|
||||
}
|