Skip to content

Commit e3ffafb

Browse files
authored
Merge pull request #20 from 7eXx/fix-name-logo
Fix name logo
2 parents 6176a87 + ff51827 commit e3ffafb

16 files changed

+137
-13
lines changed

angular.json

+7-3
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
"glob": "**/*.svg",
3030
"input": "node_modules/ionicons/dist/ionicons/svg",
3131
"output": "./svg"
32-
}
32+
},
33+
"src/manifest.webmanifest"
3334
],
3435
"styles": [
3536
"src/theme/variables.scss",
@@ -41,7 +42,9 @@
4142
"buildOptimizer": false,
4243
"sourceMap": true,
4344
"optimization": false,
44-
"namedChunks": true
45+
"namedChunks": true,
46+
"serviceWorker": true,
47+
"ngswConfigPath": "ngsw-config.json"
4548
},
4649
"configurations": {
4750
"production": {
@@ -112,7 +115,8 @@
112115
"glob": "**/*",
113116
"input": "src/assets",
114117
"output": "/assets"
115-
}
118+
},
119+
"src/manifest.webmanifest"
116120
]
117121
},
118122
"configurations": {

ngsw-config.json

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"$schema": "./node_modules/@angular/service-worker/config/schema.json",
3+
"index": "/index.html",
4+
"assetGroups": [
5+
{
6+
"name": "Raspi Home",
7+
"installMode": "prefetch",
8+
"resources": {
9+
"files": [
10+
"/favicon.ico",
11+
"/index.html",
12+
"/manifest.webmanifest",
13+
"/*.css",
14+
"/*.js"
15+
]
16+
}
17+
},
18+
{
19+
"name": "assets",
20+
"installMode": "lazy",
21+
"updateMode": "prefetch",
22+
"resources": {
23+
"files": [
24+
"/assets/**",
25+
"/*.(svg|cur|jpg|jpeg|png|apng|webp|avif|gif|otf|ttf|woff|woff2)"
26+
]
27+
}
28+
}
29+
]
30+
}

package-lock.json

+19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"@angular/platform-browser": "~13.2.2",
2121
"@angular/platform-browser-dynamic": "~13.2.2",
2222
"@angular/router": "~13.2.2",
23+
"@angular/service-worker": "~13.2.2",
2324
"@capacitor/android": "3.5.0",
2425
"@capacitor/app": "1.1.1",
2526
"@capacitor/core": "3.5.0",

src/app/app.module.ts

+8
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ import {CommonModule} from '@angular/common';
1515
import {HttpClientModule} from '@angular/common/http';
1616
import {CommandRequestServiceImpl} from './services/command-request-impl.service';
1717
import {Vibration} from '@ionic-native/vibration/ngx';
18+
import { ServiceWorkerModule } from '@angular/service-worker';
19+
import { environment } from '../environments/environment';
1820

1921
@NgModule({
2022
declarations: [AppComponent],
@@ -25,6 +27,12 @@ import {Vibration} from '@ionic-native/vibration/ngx';
2527
HttpClientModule,
2628
CommonModule,
2729
AppRoutingModule,
30+
ServiceWorkerModule.register('ngsw-worker.js', {
31+
enabled: environment.production,
32+
// Register the ServiceWorker as soon as the application is stable
33+
// or after 30 seconds (whichever comes first).
34+
registrationStrategy: 'registerWhenStable:30000'
35+
}),
2836
],
2937
providers: [
3038
{

src/assets/icon/favicon.png

6.78 KB
Loading

src/assets/icons/icon-128x128.png

11.9 KB
Loading

src/assets/icons/icon-144x144.png

12.2 KB
Loading

src/assets/icons/icon-152x152.png

11.5 KB
Loading

src/assets/icons/icon-192x192.png

11.3 KB
Loading

src/assets/icons/icon-384x384.png

22.8 KB
Loading

src/assets/icons/icon-512x512.png

26 KB
Loading

src/assets/icons/icon-72x72.png

10.8 KB
Loading

src/assets/icons/icon-96x96.png

10.3 KB
Loading

src/index.html

+13-10
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,28 @@
22
<html lang="en">
33

44
<head>
5-
<meta charset="utf-8" />
6-
<title>Ionic App</title>
5+
<meta charset="utf-8"/>
6+
<title>Raspi Home</title>
77

8-
<base href="/" />
8+
<base href="/"/>
99

10-
<meta name="color-scheme" content="light dark" />
11-
<meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
12-
<meta name="format-detection" content="telephone=no" />
13-
<meta name="msapplication-tap-highlight" content="no" />
10+
<meta name="color-scheme" content="light dark"/>
11+
<meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
12+
<meta name="format-detection" content="telephone=no"/>
13+
<meta name="msapplication-tap-highlight" content="no"/>
1414

15-
<link rel="icon" type="image/png" href="assets/icon/favicon.png" />
15+
<link rel="icon" type="image/png" href="assets/icon/favicon.png"/>
1616

1717
<!-- add to homescreen for ios -->
18-
<meta name="apple-mobile-web-app-capable" content="yes" />
19-
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
18+
<meta name="apple-mobile-web-app-capable" content="yes"/>
19+
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
20+
<link rel="manifest" href="manifest.webmanifest">
21+
<meta name="theme-color" content="#1976d2">
2022
</head>
2123

2224
<body>
2325
<app-root></app-root>
26+
<noscript>Please enable JavaScript to continue using this application.</noscript>
2427
</body>
2528

2629
</html>

src/manifest.webmanifest

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"name": "Raspi Home",
3+
"short_name": "raspi home",
4+
"theme_color": "#1976d2",
5+
"background_color": "#fafafa",
6+
"display": "standalone",
7+
"scope": "./",
8+
"start_url": "./",
9+
"icons": [
10+
{
11+
"src": "assets/icons/icon-72x72.png",
12+
"sizes": "72x72",
13+
"type": "image/png",
14+
"purpose": "maskable any"
15+
},
16+
{
17+
"src": "assets/icons/icon-96x96.png",
18+
"sizes": "96x96",
19+
"type": "image/png",
20+
"purpose": "maskable any"
21+
},
22+
{
23+
"src": "assets/icons/icon-128x128.png",
24+
"sizes": "128x128",
25+
"type": "image/png",
26+
"purpose": "maskable any"
27+
},
28+
{
29+
"src": "assets/icons/icon-144x144.png",
30+
"sizes": "144x144",
31+
"type": "image/png",
32+
"purpose": "maskable any"
33+
},
34+
{
35+
"src": "assets/icons/icon-152x152.png",
36+
"sizes": "152x152",
37+
"type": "image/png",
38+
"purpose": "maskable any"
39+
},
40+
{
41+
"src": "assets/icons/icon-192x192.png",
42+
"sizes": "192x192",
43+
"type": "image/png",
44+
"purpose": "maskable any"
45+
},
46+
{
47+
"src": "assets/icons/icon-384x384.png",
48+
"sizes": "384x384",
49+
"type": "image/png",
50+
"purpose": "maskable any"
51+
},
52+
{
53+
"src": "assets/icons/icon-512x512.png",
54+
"sizes": "512x512",
55+
"type": "image/png",
56+
"purpose": "maskable any"
57+
}
58+
]
59+
}

0 commit comments

Comments
 (0)