Widen character sheet modal

This commit is contained in:
2026-07-10 11:58:34 -07:00
parent bf800a06db
commit 2210bcd48e
4 changed files with 22 additions and 8 deletions

14
TODO.md
View File

@@ -1,11 +1,15 @@
## DevOps/Maintenance ## Polish
- [x] **Logging**: Add some logging to the backend. The Nix service should log to /var/log/pirats.log by default (but be configurable). At very least, stderr should go there, plus important server-side events, like: - [x] The character sheet modal popup is narrower than it needs to be on wide screens. I think it could safely be like 90% as wide as the non-modal UI.
- [x] **Purge old finished/inactive games**: Add a periodic task (daily is good enough, but make the interval configurable through an env variable/the nix flake) to purge games that have finished more than two weeks ago, or have had no moves played within the last month. These time windows should also be configurable. Log all purges, including crew names/uuids and how much disk space they recovered. - [ ] Popping out the event log should leave a close button where the "Event Log" open button is, so that you don't have to move your mouse to quickly toggle it. The existing close button can remain.
- [x] **Defensive coding.** While we trust our players, this app is exposed on the open internet. I'd like to take basic precautions like making sure we're safe against SQL injection (SQLModel should handle this?), doing some basic sanitizing of free inputs from players (valid unicode only + generous character limit should be enough), and making sure that every game action API call is specific and constrained enough that it can't just do arbitrary database updates. - [ ] Use the same vertical UI for the player list in all phases
- [ ] In the admin panel, if a pi-rat doesn't have a name yet, it should show something like 'not chosen yet' rather than the player name
- [ ] In the admin panel, the "Open" and "Copy" buttons should be the same size
- [ ] Store the player name in local storage and pre-populate it when joining a new game (but don't force it, let the player edit it if they'd prefer a different name)
- [ ] If a player tries to rejoin a game that has ended or that they've been kicked from, they should get an error message and it should be removed from the list of re-joinable games
- [ ] Games should have join codes in addition to join links. Join codes should be a sequence of 5 alphanumeric characters (upper case letters only, no ambiguous letters like 0/O/1/I). Add a panel to the home page for joining a game via code, and display the join code on the admin page
## Words Words Words (Waiting for Fable to come back) ## Words Words Words (Waiting for Fable to come back)
- [ ] **TLDR rules**. A one page summary sheet of the rulebook, for the impatient - [ ] **TLDR rules**. A one page summary sheet of the rulebook, for the impatient
- [ ] **Suggestions.** Take a pass through all of the suggestions in suggestions.js, rewrite ones that are stiff, awkward, or don't fit the theme/setting as described in the rulebook. Move the suggestion pool from suggestions.js into a backend API endpoint. - [ ] **Suggestions.** Take a pass through all of the suggestions in suggestions.js, rewrite ones that are stiff, awkward, or don't fit the theme/setting as described in the rulebook. Move the suggestion pool from suggestions.js into a backend API endpoint.

View File

@@ -447,6 +447,10 @@
text-align: left; text-align: left;
} }
.modal-box.character-sheet-modal {
max-width: 1260px;
}
.modal-close { .modal-close {
position: absolute; position: absolute;
top: 0.6rem; top: 0.6rem;
@@ -544,4 +548,3 @@
color: var(--accent); color: var(--accent);
font-weight: 700; font-weight: 700;
} }

View File

@@ -72,7 +72,7 @@
<svelte:window on:keydown={(e) => e.key === 'Escape' && close()} /> <svelte:window on:keydown={(e) => e.key === 'Escape' && close()} />
<div class="modal-backdrop" on:click|self={close}> <div class="modal-backdrop" on:click|self={close}>
<div class="modal-box sheet-modal glass-panel"> <div class="modal-box sheet-modal character-sheet-modal glass-panel">
<button class="modal-close" on:click={close} aria-label="Close">×</button> <button class="modal-close" on:click={close} aria-label="Close">×</button>
<h3> <h3>

View File

@@ -6,10 +6,17 @@
// - Add a CHANGELOG entry only when a commit changes something players can // - Add a CHANGELOG entry only when a commit changes something players can
// see. Skip refactors, tests, and tooling. Keep wording player-facing. // see. Skip refactors, tests, and tooling. Keep wording player-facing.
export const VERSION = 12; export const VERSION = 13;
// Newest first. Each entry: { version, date: 'YYYY-MM-DD', changes: [string, ...] }. // Newest first. Each entry: { version, date: 'YYYY-MM-DD', changes: [string, ...] }.
export const CHANGELOG = [ export const CHANGELOG = [
{
version: 13,
date: '2026-07-10',
changes: [
'Character sheets now make better use of the available space on wide screens.',
],
},
{ {
version: 8, version: 8,
date: '2026-06-15', date: '2026-06-15',