From 3f8c7f1fda5a06133bd04d754f069605b6b759bc Mon Sep 17 00:00:00 2001 From: Chandan Kumar Date: Thu, 8 Oct 2020 19:07:42 +0530 Subject: [PATCH 1/3] #316 Fix cursor visibility on monitor fullscreen view --- src/client/monitor/monitor.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/monitor/monitor.scss b/src/client/monitor/monitor.scss index 18b90fa3..ab7f4137 100644 --- a/src/client/monitor/monitor.scss +++ b/src/client/monitor/monitor.scss @@ -12,5 +12,5 @@ } .fullscreen { - cursor: none; + cursor: default; } From cbdc9b88998c9932bc85b370ba1d2cc7cdb937c2 Mon Sep 17 00:00:00 2001 From: Chandan Kumar Date: Fri, 9 Oct 2020 10:26:22 +0530 Subject: [PATCH 2/3] #316 Add mouseover event listner to show cursor --- src/client/monitor/Monitor.tsx | 15 +++++++++++---- src/client/monitor/monitor.scss | 4 ++++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/client/monitor/Monitor.tsx b/src/client/monitor/Monitor.tsx index 1e238c73..7e3db16c 100644 --- a/src/client/monitor/Monitor.tsx +++ b/src/client/monitor/Monitor.tsx @@ -33,6 +33,11 @@ export function Monitor({fullScreen, requestFullScreen}: MonitorProps): ReactEle const [loaded, setLoaded] = useState(false) const [projects, setProjects] = useState([]) + const [monitorClassNames, setMonitorClassNames] = useState({ + [styles.monitor]: true, + [styles.inactive]: true, + [styles.fullscreen]: fullScreen + }) useEffect(() => { requestFullScreen(true) @@ -65,12 +70,14 @@ export function Monitor({fullScreen, requestFullScreen}: MonitorProps): ReactEle const traysAdded = !isEmpty(trays) const success = isEmpty(projects) - const monitorClassNames = cn(styles.monitor, { - [styles.fullscreen]: fullScreen - }) + document.onmousemove = () => { + setMonitorClassNames({ + ...monitorClassNames, [styles.inactive]: false + }) + } return ( -
+
Monitor {!traysAdded && ( diff --git a/src/client/monitor/monitor.scss b/src/client/monitor/monitor.scss index ab7f4137..ab0993b7 100644 --- a/src/client/monitor/monitor.scss +++ b/src/client/monitor/monitor.scss @@ -14,3 +14,7 @@ .fullscreen { cursor: default; } + +.inactive { + cursor: none; +} \ No newline at end of file From 75e7e6049ee4588a65aea7d81a85236835ebe5a3 Mon Sep 17 00:00:00 2001 From: Chandan Kumar Date: Fri, 9 Oct 2020 10:34:22 +0530 Subject: [PATCH 3/3] #316 Fix css lint --- src/client/monitor/monitor.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/monitor/monitor.scss b/src/client/monitor/monitor.scss index ab0993b7..e77bce12 100644 --- a/src/client/monitor/monitor.scss +++ b/src/client/monitor/monitor.scss @@ -17,4 +17,4 @@ .inactive { cursor: none; -} \ No newline at end of file +}