File tree 2 files changed +32
-0
lines changed
2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "short_name" : " 2048 Clone" ,
3
+ "name" : " 2048 Clone" ,
4
+ "icons" : [
5
+ {
6
+ "src" : " icon128_classic.png" ,
7
+ "sizes" : " 128x128" ,
8
+ "type" : " image/png"
9
+ },
10
+ {
11
+ "src" : " icon152_classic.png" ,
12
+ "sizes" : " 152x152" ,
13
+ "type" : " image/png"
14
+ }
15
+ ],
16
+ "start_url" : " ." ,
17
+ "display" : " fullscreen" ,
18
+ "orientation" : " portrait"
19
+ }
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ export class AppIconManager {
3
3
4
4
public setAppIcon ( type : string ) {
5
5
this . setAppleTouchIcon ( type ) ;
6
+ this . loadManifest ( type ) ;
6
7
this . setFavicon ( type ) ;
7
8
}
8
9
@@ -21,6 +22,18 @@ export class AppIconManager {
21
22
}
22
23
}
23
24
25
+ private loadManifest ( type : string ) {
26
+ const manifest = document . querySelector ( "link[rel='manifest']" ) as HTMLLinkElement ;
27
+ switch ( type ) {
28
+ case "classic" :
29
+ manifest . href = "manifest_classic.json" ;
30
+ break ;
31
+ default :
32
+ manifest . href = "manifest.json" ;
33
+ break ;
34
+ }
35
+ }
36
+
24
37
private setFavicon ( type : string ) {
25
38
const favicon = document . querySelector ( "link[rel='icon']" ) as HTMLLinkElement ;
26
39
switch ( type ) {
You can’t perform that action at this time.
0 commit comments