Implements conditional auto-refresh using meta http-equiv tags in templates. Views with auto_refresh=True will reload every 5 seconds to show updated data. Work and workmonth views excluded to avoid disrupting focused work sessions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
68 lines
1.9 KiB
HTML
68 lines
1.9 KiB
HTML
<html>
|
|
<head>
|
|
<!-- <link rel="stylesheet" href="{{ url_for('static', filename='styles/dm.css') }}"> -->
|
|
{% if auto_refresh %}
|
|
<meta http-equiv="refresh" content="5">
|
|
{% endif %}
|
|
{% block head %}
|
|
{% endblock %}
|
|
|
|
<style>
|
|
body
|
|
{
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
height: 100vh; /* This ensures that the container takes the full height of the viewport */
|
|
margin: 0; /* Remove default margin */
|
|
}
|
|
|
|
.grey {
|
|
color:grey;
|
|
}
|
|
|
|
.blue {
|
|
color:blue;
|
|
}
|
|
|
|
table {
|
|
font-size: 84pt
|
|
}
|
|
td {
|
|
padding-right: 100px;
|
|
}
|
|
</style>
|
|
|
|
</head>
|
|
<body>
|
|
|
|
<!-- agregar función que me diga cuanto tiempo hace que esta activo el escritorio
|
|
(calcular el delta con el ultimo switch y pasarlo a mm:ss) -->
|
|
|
|
|
|
{% block content %}
|
|
{% if current_task_path and current_task_time %}
|
|
<div style="font-size: 48pt; margin-bottom: 40px; text-align: center;">
|
|
<div style="color: #333;">{{ current_task_path }}</div>
|
|
<div style="color: #666; font-size: 36pt;">{{ current_task_time }}</div>
|
|
</div>
|
|
{% endif %}
|
|
<table>
|
|
{% for row in rows %}
|
|
{% if row["ws"] in ['Away', 'Other'] %}
|
|
{% set my_class = 'grey' %}
|
|
{% elif row["ws"] in ['Active', 'Idle'] %}
|
|
{% set my_class = 'blue' %}
|
|
{% else %}
|
|
{% set my_class = '' %}
|
|
{% endif %}
|
|
<tr>
|
|
<td class="{{my_class}}" >{{ row["ws"] }}</td>
|
|
<td class="{{my_class}}" >{{ row["total"] }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
{% endblock %}
|
|
</body>
|
|
</html> |