mirror of https://github.com/zulip/zulip.git
apps: Simplify rendering logic using $.toggle.
This commit is contained in:
parent
3aa16dcd73
commit
8e1dff708e
|
@ -119,18 +119,10 @@ var apps_events = function () {
|
||||||
$(".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);
|
||||||
|
|
||||||
if (version_info.show_instructions) {
|
$download_instructions.toggle(version_info.show_instructions);
|
||||||
$download_instructions.show();
|
$third_party_apps.toggle(version === "mac" ||
|
||||||
} else {
|
version === "windows" ||
|
||||||
$download_instructions.hide();
|
version === "linux");
|
||||||
}
|
|
||||||
|
|
||||||
if (version === "mac" || version === "windows" || version === "linux") {
|
|
||||||
$third_party_apps.show();
|
|
||||||
} else {
|
|
||||||
$third_party_apps.hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
$download_android_apk.toggle(version === "android");
|
$download_android_apk.toggle(version === "android");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue