From 50661b5947e8f06dad9f838943644da8b7bd5853 Mon Sep 17 00:00:00 2001 From: Max Leiter Date: Sat, 18 Aug 2018 12:48:58 -0700 Subject: [PATCH] Hide `Native App` settings section when no items are available --- client/js/options.js | 2 ++ client/js/socket-events/configuration.js | 2 ++ client/views/windows/settings.tpl | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/client/js/options.js b/client/js/options.js index 2f1b0d5b..b9805610 100644 --- a/client/js/options.js +++ b/client/js/options.js @@ -333,6 +333,8 @@ function initialize() { return false; }); + + $("#native-app").prop("hidden", false); } else { defaultClientButton.hide(); } diff --git a/client/js/socket-events/configuration.js b/client/js/socket-events/configuration.js index 5443283c..f00d5b20 100644 --- a/client/js/socket-events/configuration.js +++ b/client/js/socket-events/configuration.js @@ -18,6 +18,8 @@ window.addEventListener("beforeinstallprompt", (installPromptEvent) => { $(this).prop("hidden", true); }) .prop("hidden", false); + + $("#native-app").prop("hidden", false); }); socket.on("configuration", function(data) { diff --git a/client/views/windows/settings.tpl b/client/views/windows/settings.tpl index ed9b9e93..6ca7a46c 100644 --- a/client/views/windows/settings.tpl +++ b/client/views/windows/settings.tpl @@ -14,7 +14,7 @@
-
+