From 3df02500d13005281d1dde159d249ccdcef0bb16 Mon Sep 17 00:00:00 2001
From: dergelm <59627708+dergelm@users.noreply.github.com>
Date: Sat, 10 Jul 2021 19:16:51 +0200
Subject: [PATCH 1/5] add brightness control
---
src/views/device-manage.mustache | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/src/views/device-manage.mustache b/src/views/device-manage.mustache
index b38a2a8..e517f87 100644
--- a/src/views/device-manage.mustache
+++ b/src/views/device-manage.mustache
@@ -58,6 +58,20 @@
{{Reboot Device}} |
|
|
+
+
+ | {{Max Brightness}} |
+
+ |
+
+
+ | {{Min Brightness}} |
+
+ |
| {{Device Logs}} |
From 8b4622bc5ac48faba4ffb68ed55699ec0d070a04 Mon Sep 17 00:00:00 2001
From: dergelm <59627708+dergelm@users.noreply.github.com>
Date: Sat, 10 Jul 2021 19:19:18 +0200
Subject: [PATCH 2/5] Update en.json
---
static/locales/en.json | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/static/locales/en.json b/static/locales/en.json
index 847ff4e..6ae15e9 100644
--- a/static/locales/en.json
+++ b/static/locales/en.json
@@ -144,5 +144,7 @@
"Timezone": "Timezone",
"Clear Device IP Addresses": "Clear Device IP Addresses",
"Model": "Model",
- "Exclude From Reboots": "Exclude From Reboots"
+ "Exclude From Reboots": "Exclude From Reboots",
+ "Max Brightness": "Max Brightness",
+ "Min Brightness": "Min Brightness"
}
From e7c517e9a1b16cd05efb289a0076e744053e9168 Mon Sep 17 00:00:00 2001
From: dergelm <59627708+dergelm@users.noreply.github.com>
Date: Sat, 10 Jul 2021 19:20:12 +0200
Subject: [PATCH 3/5] Update de.json
---
static/locales/de.json | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/static/locales/de.json b/static/locales/de.json
index ff2f2f1..e9a6f7d 100644
--- a/static/locales/de.json
+++ b/static/locales/de.json
@@ -144,5 +144,7 @@
"Timezone": "Timezone",
"Clear Device IP Addresses": "Clear Device IP Addresses",
"Model": "Model",
- "Exclude From Reboots": "Exclude From Reboots"
+ "Exclude From Reboots": "Exclude From Reboots",
+ "Max Brightness": "Maximale Helligkeit",
+ "Min Brightness": "Minimale Helligkeit"
}
From 5ac8cdce6095a276cadc132f63214e941cf650c8 Mon Sep 17 00:00:00 2001
From: versx
Date: Sat, 10 Jul 2021 15:21:59 -0700
Subject: [PATCH 4/5] Change to slider for brightness
---
src/views/device-manage.mustache | 39 +++++++++++++++++++++-----------
1 file changed, 26 insertions(+), 13 deletions(-)
diff --git a/src/views/device-manage.mustache b/src/views/device-manage.mustache
index e517f87..816ebb2 100644
--- a/src/views/device-manage.mustache
+++ b/src/views/device-manage.mustache
@@ -59,19 +59,12 @@
|
|
-
- | {{Max Brightness}} |
-
- |
-
-
- | {{Min Brightness}} |
-
- |
+ {{Brightness}} |
+
+
+
+ |
+ |
| {{Device Logs}} |
@@ -199,6 +192,26 @@
});
}
+ function sendBrightness(brightnessElement) {
+ const clientip = $('#client_ip').val();
+ const brightness = $('#brightness').val();
+ const url = `http://${clientip}:{{webserver_port}}/brightness?value=${brightness}`;
+ console.log('brightness:', url);
+ $.ajax({
+ url: url,
+ type: 'POST',
+ async: true,
+ success: function (result, textStatus, jqXHR) {
+ //$('#' + id).text(text);
+ },
+ error: function(xhr, textStatus, errorThrown) {
+ //$('#' + id).text('Error');
+ console.error('Error:', textStatus);
+ console.error('Error Thrown:', errorThrown);
+ }
+ });
+ }
+
function sendImageData(id, imageData) {
$.ajax({
url: '/api/device/screen/{{name}}',
From a3f78395bcd6d606112ed9678994dc67a6f1de85 Mon Sep 17 00:00:00 2001
From: versx
Date: Sat, 10 Jul 2021 15:23:01 -0700
Subject: [PATCH 5/5] Fix locale
---
static/locales/de.json | 3 +--
static/locales/en.json | 3 +--
static/locales/es.json | 3 ++-
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/static/locales/de.json b/static/locales/de.json
index e9a6f7d..a0e64c6 100644
--- a/static/locales/de.json
+++ b/static/locales/de.json
@@ -145,6 +145,5 @@
"Clear Device IP Addresses": "Clear Device IP Addresses",
"Model": "Model",
"Exclude From Reboots": "Exclude From Reboots",
- "Max Brightness": "Maximale Helligkeit",
- "Min Brightness": "Minimale Helligkeit"
+ "Brightness": "Helligkeit"
}
diff --git a/static/locales/en.json b/static/locales/en.json
index 6ae15e9..1986e90 100644
--- a/static/locales/en.json
+++ b/static/locales/en.json
@@ -145,6 +145,5 @@
"Clear Device IP Addresses": "Clear Device IP Addresses",
"Model": "Model",
"Exclude From Reboots": "Exclude From Reboots",
- "Max Brightness": "Max Brightness",
- "Min Brightness": "Min Brightness"
+ "Brightness": "Brightness"
}
diff --git a/static/locales/es.json b/static/locales/es.json
index 4fa64a0..14435d0 100644
--- a/static/locales/es.json
+++ b/static/locales/es.json
@@ -142,5 +142,6 @@
"Timezone": "Timezone",
"Clear Device IP Addresses": "Clear Device IP Addresses",
"Model": "Model",
- "Exclude From Reboots": "Exclude From Reboots"
+ "Exclude From Reboots": "Exclude From Reboots",
+ "Brightness": "Brightness"
}