1
0
Commit Graph

109 Commits

Author SHA1 Message Date
55289557e1
document reasons for increased network load in README 2026-03-10 22:14:49 +01:00
f530706097
implement _yesscript css class
Elements with this class are only shown when JS is available, i.e. they
are (mostly) the opposite of the noscript element.

This replaces the previous implementation to do that, which was itself
based on JavaScript. It is now reusable, declarative and easier to grasp
at a glance.

As the entire site is built on JS this likely won't be used much beyond
its single current invocation.
2026-03-10 22:08:30 +01:00
085b3cca03
improve light mode accent color 2026-03-10 21:54:37 +01:00
c74395548b
add metadata to index html file 2026-03-10 21:54:18 +01:00
d3ed57227e
display warning that rules only affect new games 2026-03-10 20:56:56 +01:00
0342f6742d
move game rule cloning to game constructor
The rules not changing after a game has started is a invariant of the
`Game` model, not the `Session` model. As such, it should enforce it
itself, instead of relying on its users.
2026-03-10 19:19:05 +01:00
eb20849bd8
make main buttons redraw syncronously
By main buttons I mean the "new game", "they win" and "we win" buttons.
They have in common that they scroll to the bottom of the view, to make
sure the user can immediately see their effect.

This change fixes two bugs:

1. The scrolling did not work reliably. While it would always scroll a
   bit, it would usually not go to the bottom exactly. This meant that
   most of the time the bottom digits were only half visible. Now it
   scrolls reliably all the way.

2. When hitting the win buttons in rapid succession it was possible to
   trigger both within a single redraw cycle. This caused the UI to set
   a single rounds winner to both teams, which the round model rightly
   rejected. Now, by the time the second event is registered, the button
   has already been disabled, or the round been replaced by a new one.
2026-03-10 00:40:02 +01:00
04a84785f6
copy game rules on game creation 2026-03-10 00:11:38 +01:00
6f643f7070
add a service worker 2026-03-09 23:31:34 +01:00
30791ffe85
only try to persist in safari 2026-03-09 23:31:06 +01:00
c3dbf63419
improve safari error message 2026-03-09 21:43:47 +01:00
85b7c1530c
add key to sessions list 2026-03-09 21:35:43 +01:00
0b539b910f
ask for confirmation before deleting sessions 2026-03-09 21:28:03 +01:00
5fbcee89ee
clean up leftover CSS refactor styles 2026-03-09 21:22:32 +01:00
eebaaa7f0e
add no sessions message 2026-03-09 21:20:45 +01:00
69790b4716
implement persistence request for safari 2026-03-09 21:15:27 +01:00
cfcc0017aa
actually implement splash screens
I forgot to commit the style sheet before.
2026-03-09 21:02:50 +01:00
9561d7a05f
implement session deletion button in session list 2026-03-09 20:49:49 +01:00
7f393276a8
simplify session repo insertion method 2026-03-09 20:49:49 +01:00
fbe785c1c4
implement session deletion on data layer 2026-03-09 20:49:49 +01:00
1ef08a29a4
implement splash screen 2026-03-09 20:47:21 +01:00
a068895037
implement lighthouse suggestion for font loading 2026-03-09 20:47:11 +01:00
ca0f9f3f3a
switch to material icons 2026-03-07 17:13:11 +01:00
aa7fdfff11
improve info page a bit 2026-03-07 15:47:20 +01:00
05df37bf06
add info page 2026-03-05 22:14:21 +01:00
128cdebcd2
set font more explicitly 2026-03-05 03:02:25 +01:00
8ac6f8fede
redesign session list 2026-03-05 02:51:51 +01:00
32ab7594f1
refactor style sheets 2026-03-05 01:55:45 +01:00
f9c8882e9c
document principle trade-offs and violations in README 2026-03-04 23:07:51 +01:00
f9d33b746f
style session rules 2026-03-03 23:21:45 +01:00
d74c9ed798
only show rules button if necessary 2026-03-03 21:36:24 +01:00
e0ede4a503
refactor styles to make further additions easier 2026-03-03 20:29:04 +01:00
7fa1e2d35d
implement hover and focus highlights for buttons 2026-03-03 19:26:24 +01:00
061c04f74f
implement light mode 2026-03-03 01:59:15 +01:00
ff753f2e2f
switch session list to new localized terminology 2026-03-03 01:59:05 +01:00
7e7410a406
improve design of session view
This improves the design of the session view a lot. However, several
things still need to be done:

1. The rules section is not styled.

2. The session list is not styled.

3. The design is not responsive yet. This will take longer, as the base
   view will need to be overhauled substantially to take advantage of
   wider screens.

4. A light mode needs to be added.
2026-03-03 01:45:14 +01:00
d4536aadc1
allow editing session head data 2026-03-02 22:12:23 +01:00
4ef0737f4f
update README 2026-03-02 03:14:52 +01:00
493daa1cff
move test loading into test html file 2026-03-02 03:12:29 +01:00
bd79aa568a
switch session and game models to game rules
This is a more flexible system than the previous goal variable. It makes
it possible to conform to the association rules, without sacrificing
backwards compatibility. Also, it makes it easier to add other
changeable rules later on.
2026-03-02 02:52:19 +01:00
14aad4a73d
implement game rules model 2026-03-02 01:46:05 +01:00
542af83a5a
fix capitalization of round result tests 2026-03-01 22:41:55 +01:00
8a1140688e
improve in-memory change handling
The base view now does a better job at keeping the sessions list up to
date with the current session, without having to reload it all the time.

The purpose of this is to be able to show the list and the current
session at the same time, and keep them in sync without polling the
database.
2026-03-01 03:14:00 +01:00
de0fc8c917
enable history navigation
The previous implementation only looked at the URL (and state) during
initialization. This allowed users to open a specific session via URL
(e.g. when reloading the page).

History navigation, however, was completely ignored. I.e. if the user
pressed the back button the URL would change, but the content would
remain the same.

This has now been corrected.
2026-03-01 02:28:47 +01:00
b5ead20f0b
only reinsert all sessions if necessary
The purpose of this is data safety. If there ever was a broken model
that corrupted data previously it would have ruined everything if it
coincided with a schema migration. Now this is much less likely.
2026-02-28 18:23:48 +01:00
53e3b2539a
switch UI to time ordered session list 2026-02-27 23:28:54 +01:00
3695902041
add time ordered session db accessor 2026-02-27 23:28:53 +01:00
0065514885
improve session reinsertion testing 2026-02-27 23:28:53 +01:00
570588f885
add db index for update timestamp 2026-02-27 23:24:41 +01:00
4f5f4fbb28
make it possible to reinsert all sessions at once
This will be needed for database upgrades going forward. For example, an
old session without an update timestamp will not be visible in the index
that will soon be added. But since the UI will switch to that index, it
is paramount that all sessions are part of that.

The session model was built with that in mind, and has the corresponding
"update" logic. However, for that to matter old records first need to be
readded to the database.
2026-02-27 23:24:35 +01:00