From ab7d3b77f818d7655d54cec4ab770f19b8d20398 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Sat, 9 May 2020 12:12:52 -0700 Subject: [PATCH] Improved online only filter --- views/default.handlebars | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/views/default.handlebars b/views/default.handlebars index 2d34f445..18746115 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -232,7 +232,7 @@     - +     @@ -1330,6 +1330,7 @@ Q('KvmSearchInput').value = Q('SearchInput').value = getstore('_search', ''); showRealNames = (getstore('showRealNames', 0) == 1); Q('RealNameCheckBox').checked = showRealNames; + Q('OnlineCheckBox').checked = (getstore('onlineOnly', 0) == 1); Q('viewselect').value = getstore('deviceView', 1); Q('DeskControl').checked = (getstore('DeskControl', 1) == 1); QV('accountChangeEmailAddressSpan', (features & 0x200000) == 0); @@ -2642,7 +2643,7 @@ node.lastconnect = Date.now(); // Web page update - masterUpdate(4 | 16); + masterUpdate(1 | 4 | 16); refreshDevice(node._id); } break; @@ -2870,7 +2871,11 @@ showRealNames = Q('RealNameCheckBox').checked; putstore('showRealNames', showRealNames ? 1 : 0); masterUpdate(6); - return; + } + + function onOnlineCheckBox(e) { + putstore('onlineOnly', Q('OnlineCheckBox').checked ? 1 : 0); + onDeviceSearchChanged(e); } function onDeviceViewChange(i) {