Compare commits

...

4 Commits

Author SHA1 Message Date
01089aaf12 Fix bug that didn't display 3G conformity in view 2021-10-30 19:47:45 +02:00
9c0aa29bff Convert "tested" checkbox into "3G" box 2021-10-14 13:45:00 +02:00
404a995e4f also fade tested entries 2021-10-11 19:39:07 +02:00
062330bcaa Bump version to 1.1.0 2021-06-12 13:55:43 +02:00
6 changed files with 14 additions and 8 deletions

View File

@ -6,6 +6,6 @@
# Corona time tracker # Corona time tracker
VERSION = (1, 0, 0) VERSION = (1, 1, 0)
__version__ = '.'.join(map(str, VERSION)) __version__ = '.'.join(map(str, VERSION))

View File

@ -8,7 +8,7 @@ with open("LICENSE.md", "r") as f:
st.setup( st.setup(
name="ftracker", name="ftracker",
version="1.0.0", version="1.1.0",
author="Oskar @ FaSTTUBe", author="Oskar @ FaSTTUBe",
author_email="o.winkels@fasttube.de", author_email="o.winkels@fasttube.de",
description="Small webapp to track who was in which room at which time to backtrace potential viral infections", description="Small webapp to track who was in which room at which time to backtrace potential viral infections",

View File

@ -12,7 +12,7 @@
'arrival': 'I have read and will adhere to the <a href="/guidelines" target="_blank">protection guidelines</a>', 'arrival': 'I have read and will adhere to the <a href="/guidelines" target="_blank">protection guidelines</a>',
'departure': 'I have cleaned my workspace' 'departure': 'I have cleaned my workspace'
} }
var testCheckBox = '<label class="checkbox"><input type="checkbox" name="tested" id="tested"><span>I have been tested negative for COVID in the last 24 hours</span></label>' var testCheckBox = '<label class="checkbox"><input type="checkbox" name="tested" id="tested"><span>I fullfill one of the <a href="https://www.bundesregierung.de/breg-de/aktuelles/bund-laender-beratung-corona-1949606">3G requirements</a></span></label>'
var editTimeBox = '<label>Departure Date/Time:<input type="datetime-local" name="datetime" id="datetime" required></label>' var editTimeBox = '<label>Departure Date/Time:<input type="datetime-local" name="datetime" id="datetime" required></label>'
function getParams() { function getParams() {
var qparams = document.location.search.substr(1) var qparams = document.location.search.substr(1)
@ -33,7 +33,7 @@
</head> </head>
<body> <body>
<h1><script> <h1><script>
document.write(qp.action ? (qp.action + "<br>Room " + qp.room) : 'FTracker<br>V1') document.write(qp.action ? (qp.action + "<br>Room " + qp.room) : 'FTracker<br>V1.1')
</script></h1> </script></h1>
<div id="startpage"> <div id="startpage">
This is a web app to track which people This is a web app to track which people

View File

@ -43,7 +43,7 @@ function sendMainData() {
'name': name, 'name': name,
'arrival': datetime, 'arrival': datetime,
'agreetoguidelines': agreed, 'agreetoguidelines': agreed,
'tested': tested 'tested': tested // = 3G
} : } :
{ {
'name': name, 'name': name,
@ -104,7 +104,7 @@ function handleRequestSubmit(e, json) {
var iso = new Date(input).toISOString() var iso = new Date(input).toISOString()
if (e.srcElement.length > 1) if (e.srcElement.length > 1)
tested = e.srcElement[1].checked tested = e.srcElement[1].checked // = 3G
// POST JSON. See docs/API.md // POST JSON. See docs/API.md
var payload = (json.request == 'arrival') ? var payload = (json.request == 'arrival') ?
@ -113,7 +113,7 @@ function handleRequestSubmit(e, json) {
'name': name, 'name': name,
'arrival': iso, 'arrival': iso,
'agreetoguidelines': agreed, 'agreetoguidelines': agreed,
'tested': tested 'tested': tested // = 3G
} : } :
{ {
'name': name, 'name': name,

View File

@ -67,9 +67,15 @@ main > section.times, #timeheader {
font-weight: bold; font-weight: bold;
-webkit-text-stroke: .4px #c50e1f; -webkit-text-stroke: .4px #c50e1f;
} }
.times span.tested { /* = 3G */
background: rgb(0,136,0);
}
.times span.implausible { .times span.implausible {
background: linear-gradient(to right, #c50e1f, rgba(197,14,31,0.2) 1000px); background: linear-gradient(to right, #c50e1f, rgba(197,14,31,0.2) 1000px);
} }
.times span.implausible.tested { /* = 3G */
background: linear-gradient(to right, rgb(0,136,0), rgba(0,136,0,0.2) 1000px);
}
.viewheader.row { .viewheader.row {
height: 30px; height: 30px;
background: #ddd !important; background: #ddd !important;

View File

@ -163,7 +163,7 @@ function renderData() {
block.style.left = arr + 'px' // 1px/min block.style.left = arr + 'px' // 1px/min
block.style.width = Math.max(0,(dur-14)) + 'px' // 1px/min block.style.width = Math.max(0,(dur-14)) + 'px' // 1px/min
if (entry.tested) if (entry.tested)
block.style.background = '#080' block.classList.add('tested') // = 3G
if (dur > 60 * 24) if (dur > 60 * 24)
block.classList.add('implausible') block.classList.add('implausible')