mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-01 21:13:09 +00:00
Feature/pwa (#2246)
* setup ui project with pwa configurations * enable service worker config to work with ionic livereload * fix service worker key placement * update webmanifest names * cleanup * shrink logo size * fix package build * build fix * fix icon size in webmanifest
This commit is contained in:
@@ -31,6 +31,8 @@ import { PatchDbModule } from './services/patch-db/patch-db.module'
|
||||
import { ToastContainerModule } from './components/toast-container/toast-container.module'
|
||||
import { ConnectionBarComponentModule } from './components/connection-bar/connection-bar.component.module'
|
||||
import { WidgetsPageModule } from './pages/widgets/widgets.module'
|
||||
import { ServiceWorkerModule } from '@angular/service-worker'
|
||||
import { environment } from '../environments/environment'
|
||||
|
||||
@NgModule({
|
||||
declarations: [AppComponent],
|
||||
@@ -62,6 +64,12 @@ import { WidgetsPageModule } from './pages/widgets/widgets.module'
|
||||
ResponsiveColModule,
|
||||
DarkThemeModule,
|
||||
LightThemeModule,
|
||||
ServiceWorkerModule.register('ngsw-worker.js', {
|
||||
enabled: environment.useServiceWorker,
|
||||
// Register the ServiceWorker as soon as the application is stable
|
||||
// or after 30 seconds (whichever comes first).
|
||||
registrationStrategy: 'registerWhenStable:30000',
|
||||
}),
|
||||
],
|
||||
providers: APP_PROVIDERS,
|
||||
bootstrap: [AppComponent],
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
export const environment = {
|
||||
production: true,
|
||||
useServiceWorker: true,
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
export const environment = {
|
||||
production: false,
|
||||
useServiceWorker: true,
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -14,12 +14,14 @@
|
||||
<meta name="msapplication-tap-highlight" content="no" />
|
||||
|
||||
<link rel="icon" type="image/x-icon" href="assets/icon/favicon.ico" />
|
||||
<link rel="manifest" href="manifest.webmanifest" />
|
||||
<meta name="theme-color" content="#ff5b71" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<app-root></app-root>
|
||||
<noscript
|
||||
>Please enable JavaScript to continue using this application.</noscript
|
||||
>
|
||||
<noscript>
|
||||
Please enable JavaScript to continue using this application.
|
||||
</noscript>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
18
frontend/projects/ui/src/manifest.webmanifest
Normal file
18
frontend/projects/ui/src/manifest.webmanifest
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "StartOS",
|
||||
"short_name": "StartOS",
|
||||
"theme_color": "#ff5b71",
|
||||
"background_color": "#1e1e1e",
|
||||
"display": "standalone",
|
||||
"scope": ".",
|
||||
"start_url": "/",
|
||||
"id": "/",
|
||||
"icons": [
|
||||
{
|
||||
"src": "assets/img/logo_solid.png",
|
||||
"sizes": "256x256",
|
||||
"type": "image/png",
|
||||
"purpose": "any"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user