diff --git a/static/styles/night_mode.css b/static/styles/night_mode.css
index 8e4522f953..165957f1fa 100644
--- a/static/styles/night_mode.css
+++ b/static/styles/night_mode.css
@@ -335,12 +335,6 @@ on a dark background, and don't change the dark labels dark either. */
opacity: 0.2;
}
- #about-zulip {
- .about-zulip-version {
- color: hsl(212, 17%, 81%);
- }
- }
-
#gear_menu_about_zulip {
.white_zulip_icon_without_text {
filter: invert(10%) sepia(16%) saturate(175%) hue-rotate(194deg)
diff --git a/static/styles/zulip.css b/static/styles/zulip.css
index 93409be964..2a61462c29 100644
--- a/static/styles/zulip.css
+++ b/static/styles/zulip.css
@@ -2720,41 +2720,17 @@ select.inline_select_topic_edit {
}
.overlay-content {
- position: relative;
- width: 300px;
+ width: 440px;
border-radius: 4px;
}
- .modal-body {
- display: flex;
- flex-direction: column;
- align-items: center;
- }
-
.about-zulip-logo {
- padding-top: 20px;
- height: 70px;
+ text-align: center;
+ margin: 30px;
}
- .about-zulip-title {
- font-weight: 600;
- padding: 10px;
- }
-
- .about-zulip-version {
- color: hsl(222, 8%, 28%);
-
- .fa-copy {
- padding-left: 3px;
- }
-
- :hover {
- cursor: pointer;
-
- .fa-copy {
- color: hsl(0, 0%, 0%);
- }
- }
+ .about-zulip-logo img {
+ height: 40px;
}
}
diff --git a/templates/zerver/app/about-zulip.html b/templates/zerver/app/about-zulip.html
index af94ba3713..dce83b3058 100644
--- a/templates/zerver/app/about-zulip.html
+++ b/templates/zerver/app/about-zulip.html
@@ -1,16 +1,30 @@
-
+
×
-
-
Zulip
-
- {{zulip_version_name}}
-
+
+
+
+
+ This is an installation of Zulip .
- Zulip is open-source software .
+ Zulip Server version {{zulip_version}}
+
+ {% if zulip_merge_base and zulip_version != zulip_merge_base %}
+
+ Forked from upstream at {{zulip_merge_base}}
+
+ {% endif %}
+
+
+ Copyright 2012–2015 Dropbox, Inc., 2015–2021 Kandra Labs, Inc., and contributors.
+
+
+ Zulip is open-source software ,
+ distributed under the Apache 2.0 license.
+
diff --git a/tools/cache-zulip-git-version b/tools/cache-zulip-git-version
index 330a6cd854..e125e1187c 100755
--- a/tools/cache-zulip-git-version
+++ b/tools/cache-zulip-git-version
@@ -1,5 +1,13 @@
#!/usr/bin/env bash
-set -e
+set -eu
cd "$(dirname "$0")/.."
-git describe --tags --match='[0-9]*' >zulip-git-version || true
+remote="$(git config zulip.zulipRemote)" || remote=upstream
+{
+ git describe --always --tags --match='[0-9]*'
+ branches="$(git for-each-ref --format='%(objectname)' "refs/remotes/$remote/master" "refs/remotes/$remote/*.x")"
+ mapfile -t branches <<<"$branches"
+ if merge_base="$(git merge-base -- HEAD "${branches[@]}")"; then
+ git describe --always --tags --match='[0-9]*' -- "$merge_base"
+ fi
+} >zulip-git-version
diff --git a/version.py b/version.py
index 14a45d00f7..5e847e9e54 100644
--- a/version.py
+++ b/version.py
@@ -1,15 +1,17 @@
import os
ZULIP_VERSION = "4.0-rc1+git"
+
# Add information on number of commits and commit hash to version, if available
zulip_git_version_file = os.path.join(
os.path.dirname(os.path.abspath(__file__)), "zulip-git-version"
)
+lines = [ZULIP_VERSION, ""]
if os.path.exists(zulip_git_version_file):
with open(zulip_git_version_file) as f:
- version = f.read().strip()
- if version:
- ZULIP_VERSION = version
+ lines = f.readlines() + ["", ""]
+ZULIP_VERSION = lines.pop(0).strip()
+ZULIP_MERGE_BASE = lines.pop(0).strip()
LATEST_MAJOR_VERSION = "3.0"
LATEST_RELEASE_VERSION = "3.0"
diff --git a/zerver/context_processors.py b/zerver/context_processors.py
index 2523376993..024240d6fd 100644
--- a/zerver/context_processors.py
+++ b/zerver/context_processors.py
@@ -49,13 +49,6 @@ def common_context(user: UserProfile) -> Dict[str, Any]:
}
-def get_zulip_version_name(zulip_version: str) -> str:
- if zulip_version.endswith("+git"):
- return "Zulip " + zulip_version[:-4]
-
- return "Zulip " + zulip_version
-
-
def get_realm_from_request(request: HttpRequest) -> Optional[Realm]:
if hasattr(request, "user") and hasattr(request.user, "realm"):
return request.user.realm
@@ -142,8 +135,6 @@ def zulip_default_context(request: HttpRequest) -> Dict[str, Any]:
"request_language": get_language(),
}
- ZULIP_VERSION_NAME = get_zulip_version_name(ZULIP_VERSION)
-
context = {
"root_domain_landing_page": settings.ROOT_DOMAIN_LANDING_PAGE,
"custom_logo_url": settings.CUSTOM_LOGO_URL,
@@ -169,7 +160,6 @@ def zulip_default_context(request: HttpRequest) -> Dict[str, Any]:
"password_min_length": settings.PASSWORD_MIN_LENGTH,
"password_min_guesses": settings.PASSWORD_MIN_GUESSES,
"zulip_version": ZULIP_VERSION,
- "zulip_version_name": ZULIP_VERSION_NAME,
"user_is_authenticated": user_is_authenticated,
"settings_path": settings_path,
"secrets_path": secrets_path,
diff --git a/zerver/tests/test_context_processors.py b/zerver/tests/test_context_processors.py
deleted file mode 100644
index 9026bd8cb4..0000000000
--- a/zerver/tests/test_context_processors.py
+++ /dev/null
@@ -1,8 +0,0 @@
-from zerver.context_processors import get_zulip_version_name
-from zerver.lib.test_classes import ZulipTestCase
-
-
-class TestContextProcessors(ZulipTestCase):
- def test_get_zulip_version_name(self) -> None:
- self.assertEqual(get_zulip_version_name("4.0-dev+git"), "Zulip 4.0-dev")
- self.assertEqual(get_zulip_version_name("4.0"), "Zulip 4.0")
diff --git a/zerver/views/home.py b/zerver/views/home.py
index e049bc2040..eb19692092 100644
--- a/zerver/views/home.py
+++ b/zerver/views/home.py
@@ -8,6 +8,7 @@ from django.shortcuts import redirect, render
from django.urls import reverse
from django.utils.cache import patch_cache_control
+from version import ZULIP_MERGE_BASE, ZULIP_VERSION
from zerver.context_processors import get_valid_realm_from_request
from zerver.decorator import web_public_view, zulip_login_required
from zerver.forms import ToSForm
@@ -240,6 +241,8 @@ def home_real(request: HttpRequest) -> HttpResponse:
"is_admin": user_permission_info.is_realm_admin,
"is_guest": user_permission_info.is_guest,
"color_scheme": user_permission_info.color_scheme,
+ "zulip_version": ZULIP_VERSION,
+ "zulip_merge_base": ZULIP_MERGE_BASE,
"navbar_logo_url": navbar_logo_url,
"show_webathena": user_permission_info.show_webathena,
"embedded": narrow_stream is not None,