diff --git a/web/index.html b/web/index.html
index 7839419c0..d143d2bf0 100644
--- a/web/index.html
+++ b/web/index.html
@@ -32,10 +32,12 @@
Twake Mail
+
+
@@ -55,78 +57,44 @@
+
+
+
+
+
+
+ Twake Mail App
+
+
+
+
+
+ Continue on web
+
+
+
+
+
diff --git a/web/worker_service/style.css b/web/worker_service/style.css
index ea2a91cf7..cadf8665d 100644
--- a/web/worker_service/style.css
+++ b/web/worker_service/style.css
@@ -21,44 +21,34 @@
.sheet-content {
padding: 20px;
-}
-
-.sheet-content h2 {
- font-size: 24px;
- margin-bottom: 10px;
-}
-
-.sheet-content p {
- font-size: 16px;
- line-height: 1.5;
}
.open_on_mobile_title {
- height: 48px;
- line-height: 48px;
- display: inline-block;
- font-weight: bold;
- font-size: 16px;
- border-bottom: 1px solid #eee;
- text-align: center;
- width: 100%;
- margin-bottom: 16px;
- color: #000;
- }
+ height: 48px;
+ line-height: 48px;
+ display: inline-block;
+ font-weight: bold;
+ font-size: 16px;
+ border-bottom: 1px solid #eee;
+ text-align: center;
+ width: 100%;
+ margin-bottom: 16px;
+ color: #000;
+}
.open_on_mobile_actions {
- width: 100%;
- display: block;
- height: 48px;
- display: flex;
- justify-content: left;
- align-items: center;
+ width: 100%;
+ display: block;
+ height: 48px;
+ display: flex;
+ justify-content: left;
+ align-items: center;
- & > span {
- margin-left: 8px;
- font-weight: bold;
- }
- }
+ & > span {
+ margin-left: 8px;
+ font-weight: bold;
+ }
+}
.button {
border: none;
diff --git a/web/worker_service/worker_service.js b/web/worker_service/worker_service.js
new file mode 100644
index 000000000..330786e0b
--- /dev/null
+++ b/web/worker_service/worker_service.js
@@ -0,0 +1,136 @@
+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 iosPlatform = 'iOS';
+const androidPlatform = 'android';
+const otherPlatform = 'other';
+var serviceWorkerVersion = null;
+var scriptLoaded = false;
+
+function loadMainDartJs() {
+ if (scriptLoaded) {
+ return;
+ }
+ scriptLoaded = true;
+ var scriptTag = document.createElement('script');
+ scriptTag.src = 'main.dart.js';
+ scriptTag.type = 'application/javascript';
+ document.body.append(scriptTag);
+}
+
+function fetchServiceWorker() {
+if ('serviceWorker' in navigator) {
+ // Service workers are supported. Use them.
+ // Wait for registration to finish before dropping the