Skip to content

Commit c77effc

Browse files
committed
update
1 parent 6c9564d commit c77effc

5 files changed

Lines changed: 25 additions & 9 deletions

File tree

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616
<body>
1717
<app-root></app-root>
1818
<noscript>Please enable JavaScript to continue using this application.</noscript>
19-
<link rel="modulepreload" href="chunk-MFWMSMTE.js"><link rel="modulepreload" href="chunk-N57AJHA5.js"><script src="polyfills-S3KRBCMK.js" type="module"></script><script src="scripts-TSGU23AO.js" defer></script><script src="main-SS2DAPHT.js" type="module"></script></body>
19+
<link rel="modulepreload" href="chunk-MFWMSMTE.js"><link rel="modulepreload" href="chunk-N57AJHA5.js"><script src="polyfills-S3KRBCMK.js" type="module"></script><script src="scripts-TSGU23AO.js" defer></script><script src="main-LDOHRQCC.js" type="module"></script></body>
2020
</html>
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/ngsw.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"configVersion": 1,
3-
"timestamp": 1769264619935,
3+
"timestamp": 1770038558722,
44
"index": "/index.html",
55
"assetGroups": [
66
{
@@ -17,7 +17,7 @@
1717
"/chunk-ZCRT7WCY.js",
1818
"/favicon.ico",
1919
"/index.html",
20-
"/main-SS2DAPHT.js",
20+
"/main-LDOHRQCC.js",
2121
"/manifest.webmanifest",
2222
"/polyfills-S3KRBCMK.js",
2323
"/scripts-TSGU23AO.js",
@@ -128,8 +128,8 @@
128128
"/chunk-OPKXG5HT.js": "d5030108cbfe5a8b71c1160d31ac71d9b73d38c0",
129129
"/chunk-ZCRT7WCY.js": "329dc506f74b2578bbeaa0c4b3f6b1d3090bdaca",
130130
"/favicon.ico": "22f6a4a3bcaafafb0254e0f2fa4ceb89e505e8b2",
131-
"/index.html": "032f8ccd973713741a18023bf3219571a78f02ae",
132-
"/main-SS2DAPHT.js": "160262ca30278cbd4cd7a3b98c1593843011aaf6",
131+
"/index.html": "bc360d1fd4952f4d8ee4b489d4d9ef3c585a8951",
132+
"/main-LDOHRQCC.js": "6919afdfc42a91e4351582277d7692f8e1eefff8",
133133
"/manifest.webmanifest": "0f6d8f1c753e9f503daf4cd303ebecc6b0b0a04b",
134134
"/polyfills-S3KRBCMK.js": "666124c1a3df4ed7eb66e54da096791013fab792",
135135
"/scripts-TSGU23AO.js": "e172440274ca0257fbf1b7e414f5bd41b03b202f",

src/app/components/collection-landing/collection-landing.component.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export class CollectionLandingComponent implements OnInit, OnDestroy {
3232
const id = params['id'];
3333
if (id) {
3434
this.currentCollectionId = parseInt(id, 10);
35-
if (this.isAndroid()) {
35+
if (this.isMobile()) {
3636
this.promptForNativeApp(this.currentCollectionId);
3737
}
3838
this.loadCollection(this.currentCollectionId);
@@ -44,6 +44,14 @@ export class CollectionLandingComponent implements OnInit, OnDestroy {
4444
return /Android/i.test(navigator.userAgent);
4545
}
4646

47+
private isIOS(): boolean {
48+
return /iPhone|iPad|iPod/i.test(navigator.userAgent);
49+
}
50+
51+
private isMobile(): boolean {
52+
return this.isAndroid() || this.isIOS();
53+
}
54+
4755
private promptForNativeApp(collectionId: number): void {
4856
if (confirm('Would you like to open this collection in the native Curtain app?')) {
4957
const nativeAppUrl = `curtain://collection?collectionId=${encodeURIComponent(collectionId)}&curtainType=TP&apiURL=${encodeURIComponent(environment.apiURL)}&frontendURL=${encodeURIComponent(location.origin)}`;

src/app/components/home/home.component.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,8 @@ export class HomeComponent implements OnInit {
214214
if (this.currentID !== settings[0]) {
215215
this.currentID = settings[0]
216216

217-
// Check if user is on Android and prompt for native app
218-
if (this.isAndroid()) {
217+
// Check if user is on mobile (Android or iOS) and prompt for native app
218+
if (this.isMobile()) {
219219
this.promptForNativeApp(settings[0]);
220220
}
221221

@@ -235,6 +235,14 @@ export class HomeComponent implements OnInit {
235235
return /Android/i.test(navigator.userAgent);
236236
}
237237

238+
private isIOS(): boolean {
239+
return /iPhone|iPad|iPod/i.test(navigator.userAgent);
240+
}
241+
242+
private isMobile(): boolean {
243+
return this.isAndroid() || this.isIOS();
244+
}
245+
238246
private promptForNativeApp(uniqueId: string): void {
239247
if (confirm('Would you like to open this in the native Curtain app?')) {
240248
const nativeAppUrl = `curtain://open?uniqueId=${encodeURIComponent(uniqueId)}&apiURL=${encodeURIComponent(environment.apiURL)}&frontendURL=${encodeURIComponent(location.origin)}`;

0 commit comments

Comments
 (0)