apps: Link to macOS Apple silicon native build.

Leave the Intel build as the prominent default, since it will run on
both platforms.  (I would have liked to detect the appropriate
platform, but Apple seems to have put significant effort into making
that impossible for anti-fingerprinting reasons, which is probably an
overall good.)

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2021-05-05 15:39:52 -07:00 committed by Tim Abbott
parent fa8532d9b7
commit 779353b44e
4 changed files with 8 additions and 1 deletions

View File

@ -41,6 +41,7 @@ const apps_events = function () {
description: description:
"Zulip on macOS is even better than Zulip on the web, with a cleaner look, tray integration, native notifications, and support for multiple Zulip accounts.", "Zulip on macOS is even better than Zulip on the web, with a cleaner look, tray integration, native notifications, and support for multiple Zulip accounts.",
download_link: "/apps/download/mac", download_link: "/apps/download/mac",
mac_arm64_link: "/apps/download/mac-arm64",
show_instructions: true, show_instructions: true,
install_guide: "/help/desktop-app-install-guide", install_guide: "/help/desktop-app-install-guide",
app_type: "desktop", app_type: "desktop",
@ -106,6 +107,7 @@ const apps_events = function () {
const $download_android_apk = $("#download-android-apk"); const $download_android_apk = $("#download-android-apk");
const $download_from_google_play_store = $(".download-from-google-play-store"); const $download_from_google_play_store = $(".download-from-google-play-store");
const $download_from_apple_app_store = $(".download-from-apple-app-store"); const $download_from_apple_app_store = $(".download-from-apple-app-store");
const $download_mac_arm64 = $("#download-mac-arm64");
const $desktop_download_link = $(".desktop-download-link"); const $desktop_download_link = $(".desktop-download-link");
const version_info = info[version]; const version_info = info[version];
@ -115,6 +117,7 @@ const apps_events = function () {
$download_from_google_play_store.attr("href", version_info.play_store_link); $download_from_google_play_store.attr("href", version_info.play_store_link);
$download_from_apple_app_store.attr("href", version_info.app_store_link); $download_from_apple_app_store.attr("href", version_info.app_store_link);
$download_android_apk.attr("href", version_info.download_link); $download_android_apk.attr("href", version_info.download_link);
$download_mac_arm64.attr("href", version_info.mac_arm64_link);
$(".image img").attr("src", version_info.image); $(".image img").attr("src", version_info.image);
$download_instructions.find("a").attr("href", version_info.install_guide); $download_instructions.find("a").attr("href", version_info.install_guide);
@ -125,6 +128,7 @@ const apps_events = function () {
$download_android_apk.toggle(version === "android"); $download_android_apk.toggle(version === "android");
$download_from_google_play_store.toggle(version === "android"); $download_from_google_play_store.toggle(version === "android");
$download_from_apple_app_store.toggle(version === "ios"); $download_from_apple_app_store.toggle(version === "ios");
$download_mac_arm64.toggle(version === "mac");
}; };
$(window).on("popstate", () => { $(window).on("popstate", () => {

View File

@ -3857,7 +3857,8 @@ nav {
} }
} }
#download-android-apk { #download-android-apk,
#download-mac-arm64 {
display: inline-block; display: inline-block;
color: hsl(0, 0%, 100%); color: hsl(0, 0%, 100%);
font-size: 13px; font-size: 13px;

View File

@ -26,6 +26,7 @@
<a class="download-from-google-play-store" hidden href=""><img src='/static/images/store-badges/google-play-badge.png' alt=""/></a> <a class="download-from-google-play-store" hidden href=""><img src='/static/images/store-badges/google-play-badge.png' alt=""/></a>
<a class="download-from-apple-app-store" hidden href=""><img src='/static/images/store-badges/app-store-badge.svg' alt=""/></a> <a class="download-from-apple-app-store" hidden href=""><img src='/static/images/store-badges/app-store-badge.svg' alt=""/></a>
<span><a id="download-android-apk" hidden href="https://github.com/zulip/zulip-mobile/releases/latest">or manually download APK</a></span> <span><a id="download-android-apk" hidden href="https://github.com/zulip/zulip-mobile/releases/latest">or manually download APK</a></span>
<span><a id="download-mac-arm64" hidden href="">or download Apple silicon native build</a></span>
</div> </div>
</div> </div>
</div> </div>

View File

@ -29,6 +29,7 @@ def verify_release_download_link(link: str) -> bool:
PLATFORM_TO_SETUP_FILE = { PLATFORM_TO_SETUP_FILE = {
"linux": "Zulip-{version}-x86_64.AppImage", "linux": "Zulip-{version}-x86_64.AppImage",
"mac": "Zulip-{version}.dmg", "mac": "Zulip-{version}.dmg",
"mac-arm64": "Zulip-{version}-arm64.dmg",
"windows": "Zulip-Web-Setup-{version}.exe", "windows": "Zulip-Web-Setup-{version}.exe",
} }