UI improvements
This contains:
- identity management (front-end only)
- darkmode (applied depending on the preferred color scheme set by the browser)
- some js style improvements
- automatically collect all variables passed via meta from heist to the html in the
injectedVariables
object
This shouldn't be merged yet. I want to extend the dark mode after @RobinStoll's changes have been merged, they seem to include some styling. Further, the identity management acts weird if the "me" player gets deleted, I should fix that. This is now handled "well enough". For elaboration see 891bb527.
Right now, you cannot set a player to be 'me' when creating them, since the player-id does not exist yet. Since one doesn't often create players I think this is a won't fix.
On the back-end, it would be nice to send player names with their ids attached (something like create a player splice returning
<span data-player-id="${player-id}">${player-name}</span>
then I can dynamically create css to style each occurence of "my" name. But this is out of my expertise.
Update: I think this is ready to be merged. Additionally to the initial features, this now further contains:
- Highlighting "my" name pretty much everywhere
- The padding on the bottom of the mobile version of modify-player is now set dynamically and only when the tooltip is open, so doesn't bother us when the tooltip is closed.
- The form to create new games was much to wide on mobile and had weird scrolling effects since the first input field gets auto-focused.
The last two points came from user comments over the weekend. I also tried to make the table in modify-player scroll on its own and not scroll the whole page, but that broke the floating tooltips and wasn't worth the hassle.