From bdbffd151f3339d0f1d6d285133e5e00ad5ff3c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mierzwa?= Date: Sat, 22 Sep 2018 20:59:46 +0100 Subject: [PATCH] feat(ui): use different idle value for desktop and mobile Very simple version, no resize handling, but it will cover 95% cases --- ui/src/Components/NavBar/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ui/src/Components/NavBar/index.js b/ui/src/Components/NavBar/index.js index a556e3100..215b9e34c 100644 --- a/ui/src/Components/NavBar/index.js +++ b/ui/src/Components/NavBar/index.js @@ -19,6 +19,9 @@ import { FilterInput } from "./FilterInput"; import "./index.css"; +const DesktopIdleTimeout = 1000 * 60 * 3; +const MobileIdleTimeout = 1000 * 5; + const NavbarOnResize = function(width, height) { document.body.style["padding-top"] = `${height + 4}px`; }; @@ -66,7 +69,9 @@ const NavBar = observer( = 768 ? DesktopIdleTimeout : MobileIdleTimeout + } >