Merge pull request #2705 from MaxLeiter/hide-native

Hide `Native App` settings section when no items are available
This commit is contained in:
Pavel Djundik 2018-08-21 12:15:35 +03:00 committed by GitHub
commit dbd6bee487
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 1 deletions

View File

@ -333,6 +333,8 @@ function initialize() {
return false; return false;
}); });
$("#native-app").prop("hidden", false);
} else { } else {
defaultClientButton.hide(); defaultClientButton.hide();
} }

View File

@ -18,6 +18,8 @@ window.addEventListener("beforeinstallprompt", (installPromptEvent) => {
$(this).prop("hidden", true); $(this).prop("hidden", true);
}) })
.prop("hidden", false); .prop("hidden", false);
$("#native-app").prop("hidden", false);
}); });
socket.on("configuration", function(data) { socket.on("configuration", function(data) {

View File

@ -14,7 +14,7 @@
</div> </div>
<div class="row"> <div class="row">
<div class="col-sm-12"> <div class="col-sm-12" id="native-app" hidden>
<h2>Native app</h2> <h2>Native app</h2>
<button type="button" class="btn" id="webapp-install-button" hidden>Add The Lounge to Home screen</button> <button type="button" class="btn" id="webapp-install-button" hidden>Add The Lounge to Home screen</button>
<button type="button" class="btn" id="make-default-client">Open irc:// URLs with The Lounge</button> <button type="button" class="btn" id="make-default-client">Open irc:// URLs with The Lounge</button>