浏览代码

Remove app upgrade hint (#565)

Danilo Bargen 7 年之前
父节点
当前提交
0191bd16c4
共有 6 个文件被更改,包括 16 次插入44 次删除
  1. 1 1
      CHANGELOG.md
  2. 2 6
      public/i18n/de.json
  3. 2 6
      public/i18n/en.json
  4. 0 7
      src/partials/welcome.html
  5. 3 24
      src/partials/welcome.ts
  6. 8 0
      src/services/settings.ts

+ 1 - 1
CHANGELOG.md

@@ -16,7 +16,7 @@ Contributors:
 - [@iasdeoupxe][@iasdeoupxe]
 - [@SirTyson][@SirTyson]
 
-### [v2.0.0][v2.0.0] (2018-08-02)
+### [v2.0.0][v2.0.0] Grosser Mythen (2018-08-02)
 
 This release changes the protocol version from 1 to 2. It provides preliminary
 support for iOS devices (currently in beta). It also improves the performance

+ 2 - 6
public/i18n/de.json

@@ -42,10 +42,7 @@
         "ALREADY_CONNECTED_DETAILS": "Sie sind bereits in einem anderen Tab oder Fenster mit Threema Web verbunden!",
         "VERSION": "Version",
         "BACKGROUND_IMAGE": "Hintergrundbild",
-        "NEW_VERSION": "Neue Version von Threema Web",
-        "NEW_VERSION_DETAILS": "Diese Version von Threema Web setzt <strong>Threema 3.5 für Android</strong> voraus. Falls Sie eine ältere Threema-Version verwenden, <strong>aktualisieren Sie bitte die App</strong>.<br><br>Wenn Sie die Threema-App nicht aktualisieren können, nutzen Sie vorübergehend die archivierte Version von Threema Web: <a href=\"https://web.threema.ch/archive/1.8.2/\">web.threema.ch/archive/1.8.2</a>",
-        "NOTIFICATION_IOS_BETA": "iOS Beta-User? Bitte benutzen Sie <a href=\"https://web-beta.threema.ch/\">web-beta.threema.ch</a>.",
-        "NOTIFICATION_NEW_RELEASE": "Eine neue Version von Threema Web wurde veröffentlicht. Bitte aktualisieren Sie Ihre App oder verwenden Sie die <a href=\"https://web.threema.ch/archive/1.8.2/\">letzte Version</a>."
+        "NOTIFICATION_IOS_BETA": "iOS Beta-User? Bitte benutzen Sie <a href=\"https://web-beta.threema.ch/\">web-beta.threema.ch</a>."
     },
     "connecting": {
         "CONNECTION_PROBLEMS": "Verbindungsprobleme",
@@ -88,8 +85,7 @@
         "SAVE": "Speichern",
         "DONE": "Fertig",
         "MODIFY": "Ändern",
-        "NOTE": "Hinweis:",
-        "UNDERSTOOD": "Verstanden"
+        "NOTE": "Hinweis:"
     },
     "messenger": {
         "VERIFICATION_LEVEL": "Vertrauensstufe",

+ 2 - 6
public/i18n/en.json

@@ -42,10 +42,7 @@
         "ALREADY_CONNECTED_DETAILS": "You are already connected to Threema Web in another tab or window!",
         "VERSION": "Version",
         "BACKGROUND_IMAGE": "Background Image",
-        "NEW_VERSION": "New Threema Web Version",
-        "NEW_VERSION_DETAILS": "This version of Threema Web requires <strong>Threema 3.5 for Android</strong>. If you are using an older Threema version, <strong>please update the app</strong>.<br><br>If you are unable to update the Threema app, you can temporarily use the archived version of Threema Web: <a href=\"https://web.threema.ch/archive/1.8.2/\">web.threema.ch/archive/1.8.2</a>",
-        "NOTIFICATION_IOS_BETA": "Using the iOS beta? Please go to <a href=\"https://web-beta.threema.ch/\">web-beta.threema.ch</a>.",
-        "NOTIFICATION_NEW_RELEASE": "A new version of Threema Web was released. Make sure to update your app or use the <a href=\"/archive/1.8.2/\">previous version of Threema Web</a>."
+        "NOTIFICATION_IOS_BETA": "Using the iOS beta? Please go to <a href=\"https://web-beta.threema.ch/\">web-beta.threema.ch</a>."
     },
     "connecting": {
         "CONNECTION_PROBLEMS": "Connection problems",
@@ -88,8 +85,7 @@
         "SAVE": "Save",
         "DONE": "Done",
         "MODIFY": "Modify",
-        "NOTE": "Note:",
-        "UNDERSTOOD": "Understood"
+        "NOTE": "Note:"
     },
     "messenger": {
         "VERIFICATION_LEVEL": "Verification level",

+ 0 - 7
src/partials/welcome.html

@@ -6,9 +6,6 @@
                 <p><strong translate>common.NOTE</strong> <span translate>welcome.SAFARI</span></p>
             </div>
 
-            <div class="notification">
-                <p translate>welcome.NOTIFICATION_NEW_RELEASE</p>
-            </div>
             <div class="notification">
                 <p translate>welcome.NOTIFICATION_IOS_BETA</p>
             </div>
@@ -35,10 +32,6 @@
         </div>
 
         <div ng-if="ctrl.state === 'connecting' && ctrl.mode === 'unlock'" class="unlock">
-            <div class="notification">
-                <p translate>welcome.NOTIFICATION_NEW_RELEASE</p>
-            </div>
-
             <h2 class="instructions" translate>welcome.PLEASE_UNLOCK</h2>
             <div class="password-entry">
                 <label>

+ 3 - 24
src/partials/welcome.ts

@@ -161,13 +161,9 @@ class WelcomeController {
             this.showBrowserWarning();
         }
 
-        // Show a "new version info" dialog the first time.
-        if (!this.browserWarningShown) {
-            // The browser warning dialog interferes with the new version dialog, so don't trigger both.
-            if (this.settingsService.retrieveUntrustedKeyValuePair('v2infoShown', false) !== 'yes') {
-                this.showNewVersionInfos();
-            }
-        }
+        // Clean up local storage
+        // TODO: Remove this in future version
+        this.settingsService.removeUntrustedKeyValuePair('v2infoShown');
 
         // Determine whether local storage is available
         if (this.trustedKeyStore.blocked === true) {
@@ -466,23 +462,6 @@ class WelcomeController {
         });
     }
 
-    /**
-     * Show version 2 release information.
-     * TODO: Remove this in next version!
-     */
-    private showNewVersionInfos(): void {
-        this.$translate.onReady().then(() => {
-            const confirm = this.$mdDialog.alert()
-                .title(this.$translate.instant('welcome.NEW_VERSION'))
-                .htmlContent(this.$translate.instant('welcome.NEW_VERSION_DETAILS'))
-                .ok(this.$translate.instant('common.UNDERSTOOD'));
-            this.$mdDialog.show(confirm).then(() => {
-                // Remember that dialog was dismissed
-                this.settingsService.storeUntrustedKeyValuePair('v2infoShown', 'yes');
-            });
-        });
-    }
-
     /**
      * Forget trusted keys.
      */

+ 8 - 0
src/services/settings.ts

@@ -59,6 +59,14 @@ export class SettingsService {
         }
     }
 
+    /**
+     * Remove settings key-value pair from LocalStorage if it exists.
+     */
+    public removeUntrustedKeyValuePair(key: string): void {
+        this.$log.debug(this.logTag, 'Removing settings key:', key);
+        this.storage.removeItem(SettingsService.STORAGE_KEY_PREFIX + key);
+    }
+
     /**
      * Return whether key-value pair is present in LocalStorage.
      *