From b8888c801be78bccf585690ca1d34c35da301ed8 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Fri, 28 Feb 2020 00:55:29 -0800 Subject: [PATCH] panels: Show a banner for users with legacy desktop apps. Users who are using ZulipDesktop or haven't managed to auto-update to ZulipElectron should be strongly encouraged to upgrade. We'll likely want to move to something even stricter that blocks loading the app at all, but this is a good start. --- static/js/panels.js | 4 +++- templates/zerver/app/navbar.html | 10 ++++++++++ zerver/tests/test_compatibility.py | 10 ++++++++++ zerver/tests/test_home.py | 1 + zerver/views/compatibility.py | 14 ++++++++++++++ zerver/views/home.py | 2 ++ 6 files changed, 40 insertions(+), 1 deletion(-) diff --git a/static/js/panels.js b/static/js/panels.js index e89e9ccd88..b83a728197 100644 --- a/static/js/panels.js +++ b/static/js/panels.js @@ -19,7 +19,9 @@ const get_step = function ($process) { exports.initialize = function () { // if email has not been set up and the user is the admin, display a warning // to tell them to set up an email server. - if (page_params.warn_no_email === true && page_params.is_admin) { + if (page_params.insecure_desktop_app) { + exports.open($("[data-process='insecure-desktop-app']")); + } else if (page_params.warn_no_email === true && page_params.is_admin) { exports.open($("[data-process='email-server']")); } else { exports.open($("[data-process='notifications']")); diff --git a/templates/zerver/app/navbar.html b/templates/zerver/app/navbar.html index 151ab358b5..d2409fdc45 100644 --- a/templates/zerver/app/navbar.html +++ b/templates/zerver/app/navbar.html @@ -26,6 +26,16 @@ +
+ × +
+ You are using an old, insecure version of the Zulip + desktop app that cannot auto-update. + + Download the latest version. + +
+