From 25eabefd43b00b48ccf27796586d00df403124f7 Mon Sep 17 00:00:00 2001
From: philipp
Date: Thu, 2 Nov 2023 12:58:50 +0100
Subject: [PATCH 1/4] show own data + add gitignore folder
---
.gitignore | 1 +
templates/ergo.html.tera | 13 +++++++++++++
2 files changed, 14 insertions(+)
diff --git a/.gitignore b/.gitignore
index d17d371..6b4b2c7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@ db.sqlite
Rocket.toml
frontend/node_modules/*
/static/
+/data-ergo/
diff --git a/templates/ergo.html.tera b/templates/ergo.html.tera
index 2ecc90f..bb478b8 100644
--- a/templates/ergo.html.tera
+++ b/templates/ergo.html.tera
@@ -7,6 +7,19 @@
{% if flash %}
{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}
{% endif %}
+
+ Deine Daten
+
+ Folgende Daten hat der Ruderassistent von dir. Wenn diese nicht mehr aktuell sind, bitte gewünschte Änderungen an Philipp melden (Tel. nr siehe Signal, oder an it@rudernlinz.at).
+
+
+ Geburtsdatum: {{ loggedin_user.dob }}
+ Gewicht: {{ loggedin_user.weight}} kg
+ Geschlecht: {{ loggedin_user.sex}}
+
+
+
+
Neuer Eintrag
Dirty Thirty
From 728d87ab05f29d4f2eb87ca9b48fbd3bf3eb7932 Mon Sep 17 00:00:00 2001
From: philipp
Date: Thu, 2 Nov 2023 12:58:50 +0100
Subject: [PATCH 2/4] show own data + add gitignore folder
---
.gitignore | 1 +
templates/ergo.html.tera | 13 +++++++++++++
2 files changed, 14 insertions(+)
diff --git a/.gitignore b/.gitignore
index d17d371..6b4b2c7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@ db.sqlite
Rocket.toml
frontend/node_modules/*
/static/
+/data-ergo/
diff --git a/templates/ergo.html.tera b/templates/ergo.html.tera
index 2ecc90f..bb478b8 100644
--- a/templates/ergo.html.tera
+++ b/templates/ergo.html.tera
@@ -7,6 +7,19 @@
{% if flash %}
{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}
{% endif %}
+
+ Deine Daten
+
+ Folgende Daten hat der Ruderassistent von dir. Wenn diese nicht mehr aktuell sind, bitte gewünschte Änderungen an Philipp melden (Tel. nr siehe Signal, oder an it@rudernlinz.at).
+
+
+ Geburtsdatum: {{ loggedin_user.dob }}
+ Gewicht: {{ loggedin_user.weight}} kg
+ Geschlecht: {{ loggedin_user.sex}}
+
+
+
+
Neuer Eintrag
Dirty Thirty
From 2bff02f43aadca1eb907b34f9fa61b70b67a5483 Mon Sep 17 00:00:00 2001
From: philipp
Date: Thu, 2 Nov 2023 13:19:21 +0100
Subject: [PATCH 3/4] ergo: default own person
---
templates/ergo.html.tera | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/templates/ergo.html.tera b/templates/ergo.html.tera
index bb478b8..3d172a6 100644
--- a/templates/ergo.html.tera
+++ b/templates/ergo.html.tera
@@ -29,7 +29,11 @@
Ergo-Fahrer
{% for user in users %}
- {{ user.name }}
+ {% if user.id == loggedin_user.id %}
+ {{ user.name }}
+ {% else %}
+ {{ user.name }}
+ {% endif %}
{% endfor %}
{{ macros::input(label="Zeit [(hh:)mm:ss]/Distanz [m]", name="result", required=true, type="text", class="input") }}
@@ -49,7 +53,11 @@
User auswählen
{% for user in users %}
- {{ user.name }}
+ {% if user.id == loggedin_user.id %}
+ {{ user.name }}
+ {% else %}
+ {{ user.name }}
+ {% endif %}
{% endfor %}
{{ macros::input(label="Zeit [(hh:)mm:ss]/Distanz [m]", name="result", required=true, type="text", class="input") }}
From 50de29284f9acb7ea3f0838ae8f23b2303d33381 Mon Sep 17 00:00:00 2001
From: philipp
Date: Thu, 2 Nov 2023 13:50:34 +0100
Subject: [PATCH 4/4] disable reload on ergo page; allow camera capture
---
frontend/main.ts | 24 +++++++++++++-----------
templates/ergo.html.tera | 4 ++--
2 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/frontend/main.ts b/frontend/main.ts
index 640f60a..625abd6 100644
--- a/frontend/main.ts
+++ b/frontend/main.ts
@@ -68,19 +68,21 @@ function selectBoatChange() {
}
function reloadPage() {
- let pageTitle = document.title;
- let attentionMessage = 'Riemen- und Dollenbruch';
+ if (!window.location.href.includes("ergo")){
+ let pageTitle = document.title;
+ let attentionMessage = 'Riemen- und Dollenbruch';
- document.addEventListener('visibilitychange', function() {
- let isPageActive = !document.hidden;
+ document.addEventListener('visibilitychange', function() {
+ let isPageActive = !document.hidden;
- if(!isPageActive){
- document.title = attentionMessage;
- } else {
- document.title = pageTitle;
- location.reload();
- }
- });
+ if(!isPageActive){
+ document.title = attentionMessage;
+ } else {
+ document.title = pageTitle;
+ location.reload();
+ }
+ });
+ }
}
function setMaxAmountRowers(name: string, rowers: number) {
diff --git a/templates/ergo.html.tera b/templates/ergo.html.tera
index 3d172a6..3385611 100644
--- a/templates/ergo.html.tera
+++ b/templates/ergo.html.tera
@@ -37,7 +37,7 @@
{% endfor %}
{{ macros::input(label="Zeit [(hh:)mm:ss]/Distanz [m]", name="result", required=true, type="text", class="input") }}
-
+
@@ -61,7 +61,7 @@
{% endfor %}
{{ macros::input(label="Zeit [(hh:)mm:ss]/Distanz [m]", name="result", required=true, type="text", class="input") }}
-
+