From d1cefa4131fba0d890e6298be9ed1caa244a01c5 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Sat, 26 Aug 2023 11:41:23 +0200 Subject: [PATCH] fix template using new configuration --- static/main.css | 14 ++++-------- static/main.js | 8 +++---- views/page/home.html | 51 ++++++++++++++++++++++++++------------------ 3 files changed, 37 insertions(+), 36 deletions(-) diff --git a/static/main.css b/static/main.css index d61daa9..7fe1a89 100644 --- a/static/main.css +++ b/static/main.css @@ -58,7 +58,8 @@ a { } #pointer { - height: calc(100vh - 80px); + height: calc(100vh - 33px - 38px); + top: calc(33px + 38px); margin: auto; background: #ccc; position: absolute; @@ -80,14 +81,6 @@ a { right: 0; } -.fullscreen #scrollbar { - height: calc(100vh - 150px); -} - -.fullscreen #pointer { - height: calc(100vh - 150px); -} - #pane-pointer .form-group { padding: 0; margin: 0; @@ -97,7 +90,8 @@ a { margin-top: -42px; width: 100%; z-index: 110; - position: absolute; + position: fixed; + bottom: 0; } #pointer-buttons .btn { diff --git a/static/main.js b/static/main.js index 4ae6eac..04f26e9 100644 --- a/static/main.js +++ b/static/main.js @@ -257,11 +257,9 @@ var documentHashHandler = function() { var hash = window.location.hash; if (hash) { - $(hash).show(); - $('a[href="' + hash + '"]').addClass('active'); + $('a[href="' + hash + '"]').click(); } else { - $('#pane-keyboard').show(); - $('#nav a').first().addClass('active'); + $('#nav > li:first-child a').click(); } } @@ -294,10 +292,10 @@ var addListeners = function() { } var bootstrap = function() { - documentHashHandler(); shortcutsSpecialKeysOnChangeHandler(); createWebSocketConnection(); addListeners(); + documentHashHandler(); } $(function() { diff --git a/views/page/home.html b/views/page/home.html index eb39add..47b44b9 100644 --- a/views/page/home.html +++ b/views/page/home.html @@ -4,9 +4,9 @@
- {{range $key, $values := .Config.Remote}} -
- {{range $key2, $value := $values}} + {{range $key, $tab := .Config.Remote}} +
+ {{range $key2, $value := $tab.Items}}
{{if ne $value.Label ""}}
@@ -121,12 +121,36 @@
{{end}} + + {{if eq $value.Type "screenshot"}} +
+ + +
+ {{end}} + + {{if eq $value.Type "live_video"}} +
+ + +
+
+ {{end}} + + {{if eq $value.Type "messages"}} +
+ {{range $key3, $item := $value.Items}} + + {{end}} +
+ {{end}} + +
{{end}}
{{end}} -
@@ -150,20 +174,5 @@
- -
-
-

Desktop

-
-
- - - - -
-
-
-
-
{{end}}