Software /
code /
prosody-modules
Changeset
4134:82713dfee238
mod_invites_page: Fix platform detection and don't show empty list of clients for unknown platforms
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 15 Sep 2020 16:27:48 +0100 |
parents | 4133:0ba6108afcbf |
children | 4135:ed0c7044b00f |
files | mod_invites_page/html/invite.html |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_invites_page/html/invite.html Tue Sep 15 16:16:16 2020 +0100 +++ b/mod_invites_page/html/invite.html Tue Sep 15 16:27:48 2020 +0100 @@ -147,10 +147,17 @@ if(platform.os.family.startsWith("Windows")) { platform_friendly = "Windows"; platform_classname = "windows"; + } else { + platform_friendly = platform.os.family; + platform_classname = platform_friendly.toLowerCase(); } } if(platform_friendly && platform_classname) { + if($('.client-card .client-platform-badge-'+platform_classname).length == 0) { + // No clients recognised for this platform, do nothing + return; + } // Hide clients not for this platform $('.client-card.app-platform-'+platform_classname).addClass("supported-platform"); $('.client-card').not(".supported-platform").hide();