TF-2565: Update iOS store link
This commit is contained in:
committed by
Dat PHAM HOANG
parent
8a2ccf0822
commit
f0ac4ef80a
@@ -1,8 +1,9 @@
|
||||
const androidStore = 'https://play.google.com/store/apps/details?id=com.linagora.android.teammail';
|
||||
const iosStore = 'https://apps.apple.com/vn/app/twake-mail/id1587086189';
|
||||
const iosStore = 'https://apps.apple.com/app/twake-mail/id1587086189';
|
||||
const iosPlatform = 'iOS';
|
||||
const androidPlatform = 'android';
|
||||
const otherPlatform = 'other';
|
||||
const timeoutDuration = 4000;
|
||||
var serviceWorkerVersion = null;
|
||||
var scriptLoaded = false;
|
||||
|
||||
@@ -67,9 +68,8 @@ if ('serviceWorker' in navigator) {
|
||||
);
|
||||
loadMainDartJs();
|
||||
}
|
||||
}, 4000);
|
||||
}
|
||||
else {
|
||||
}, timeoutDuration);
|
||||
} else {
|
||||
// Service workers not supported. Just drop the <script> tag.
|
||||
loadMainDartJs();
|
||||
}
|
||||
@@ -92,9 +92,9 @@ if ('serviceWorker' in navigator) {
|
||||
return otherPlatform;
|
||||
}
|
||||
|
||||
function hanldeOpenTwakeMailApp() {
|
||||
function handleOpenTwakeMailApp() {
|
||||
const os = getPlatform();
|
||||
console.info('[TwakeMail] hanldeOpenTwakeMailApp() - OS:', os);
|
||||
console.info('[TwakeMail] handleOpenTwakeMailApp() - OS:', os);
|
||||
if (os === androidPlatform) {
|
||||
document.location.replace(androidStore);
|
||||
} else if (os === iosPlatform) {
|
||||
@@ -104,23 +104,26 @@ if ('serviceWorker' in navigator) {
|
||||
|
||||
function initialWorkerService() {
|
||||
const os = getPlatform();
|
||||
const searchParams = Object.fromEntries(
|
||||
new URLSearchParams(window.location.search),
|
||||
);
|
||||
const originInUrl = searchParams.origin;
|
||||
const originInUrl = window.location;
|
||||
|
||||
console.info('[TwakeMail] initialWorkerService(): OriginInUrl:', originInUrl);
|
||||
|
||||
// For desktop, we don't show the open on app popup
|
||||
if (os === otherPlatform || typeof window === 'undefined') {
|
||||
if (os !== otherPlatform) {
|
||||
console.log('[TwakeMail] initialWorkerService(): Keep on browser because:', {
|
||||
os,
|
||||
originInUrl,
|
||||
windowUndefined: typeof window === 'undefined',
|
||||
});
|
||||
}
|
||||
fetchServiceWorker();
|
||||
return;
|
||||
}
|
||||
console.log('[TwakeMail] initialWorkerService(): Open the bottom sheet.');
|
||||
|
||||
if (window.location.pathname.includes('/login')) {
|
||||
console.info('[TwakeMail] initialWorkerService(): Login callback');
|
||||
handleContinueTwakeMailOnWeb();
|
||||
} else {
|
||||
openBottomSheet();
|
||||
}
|
||||
}
|
||||
|
||||
function openBottomSheet() {
|
||||
console.info('[TwakeMail] openBottomSheet(): Open the bottom sheet.');
|
||||
const bottomSheet = document.querySelector(".bottom-sheet");
|
||||
bottomSheet.style.display = "block";
|
||||
document.body.style.overflow = "hidden";
|
||||
|
||||
Reference in New Issue
Block a user