From d303039b1c5c540eeb16f00780bebcdf24926283 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Wed, 20 Sep 2023 18:54:54 +0200 Subject: [PATCH] Add hacky way to not reload page when starting/ending session Partially fixes #52 --- CHANGELOG.md | 5 +++++ frontend/src/index.css | 3 ++- games/templates/base.html | 16 +++++++--------- games/templates/list_sessions.html | 9 ++++++--- 4 files changed, 20 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cbc4c4a..0b98098 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ * Improve form appearance * Add helper buttons next to datime fields +* Change recent session view to current year instead of last 30 days +* Fix bug when filtering only manual sessions (https://git.kucharczyk.xyz/lukas/timetracker/issues/51) +* Add copy button on Add session page to copy times between fields +* Use the same form when editing a session as when adding a session +* Add a hacky way not to reload a page when starting or ending a session (https://git.kucharczyk.xyz/lukas/timetracker/issues/52) ## 1.0.3 / 2023-02-20 17:16+01:00 diff --git a/frontend/src/index.css b/frontend/src/index.css index a1ae167..0b0bc34 100644 --- a/frontend/src/index.css +++ b/frontend/src/index.css @@ -28,7 +28,8 @@ textarea { } } -#session-table { +#session-table, +#session-table-head { display: grid; grid-template-columns: 3fr 2fr repeat(2, 1fr) 0.5fr 1fr; } diff --git a/games/templates/base.html b/games/templates/base.html index 12f43bb..2ef9dc6 100644 --- a/games/templates/base.html +++ b/games/templates/base.html @@ -2,16 +2,13 @@ {% load static %} - - - - - Timetracker - - {% block title %} - Untitled - {% endblock title %} - + + + + + Timetracker - {% block title %}Untitled{% endblock title %} + @@ -96,4 +93,5 @@ {% block scripts %} {% endblock scripts %} + diff --git a/games/templates/list_sessions.html b/games/templates/list_sessions.html index 2241c33..f48bedb 100644 --- a/games/templates/list_sessions.html +++ b/games/templates/list_sessions.html @@ -23,7 +23,7 @@ {% if purchase %}See all platforms{% endif %} {% endif %} {% if dataset.count >= 1 %} - + -
+
Purchase
Platform
Start
End
Duration
Manage
+
+
+ {% for data in dataset %}
{{ data.purchase.edition }} ({{ data.purchase.get_ownership_type_display }}) @@ -80,7 +83,7 @@ {% endif %}
{% if data.unfinished %} - +