diff options
| author | srdusr <[email protected]> | 2026-03-13 23:44:00 +0200 |
|---|---|---|
| committer | srdusr <[email protected]> | 2026-03-13 23:44:00 +0200 |
| commit | e37b76136e49ac90bef841e318bceeef76a07129 (patch) | |
| tree | 2b99369bceae6332965c91f8656e7e457431bdf0 /web/src/styles.css | |
| parent | 4ffaeda5cf0da756ea05b6d13913ce3d775990d6 (diff) | |
| download | typerpunk-e37b76136e49ac90bef841e318bceeef76a07129.tar.gz typerpunk-e37b76136e49ac90bef841e318bceeef76a07129.zip | |
Ship the store catalogue with the client
The store read its catalogue from the server and rendered nothing without
one: a heading, a sign-in prompt and an empty page, which reads as a fault
rather than as a shop that needs an account.
It now falls back to a copy that ships with the client, the same arrangement
the text packs already use: bundled here, served from the database, and the
served copy wins. With no server the store shows all 26 cosmetics, 4 bundles
and 6 merchandise items at their real prices.
Nothing pretends to work. The buy controls become a "Soon" label rather than
a button, because offline there is nothing to buy with and nowhere to sign in
to: sending someone to the account screen would be sending them to another
screen that needs the server they have not got. A line at the top says the
shop is not open yet.
scripts/export_store.js regenerates the file. Run it after changing prices or
adding items. It shells out to psql so it needs no dependencies, matching the
other scripts here.
Verified both ways. With no backend: 26 items, 4 bundles, 6 merch, 36 Soon
labels, no live buy controls, no page errors. With the backend running: the
same catalogue, 37 live buy controls, no Soon labels, no offline notice. 3
browser tests pass.
Diffstat (limited to 'web/src/styles.css')
| -rw-r--r-- | web/src/styles.css | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/web/src/styles.css b/web/src/styles.css index 375f257..19c391a 100644 --- a/web/src/styles.css +++ b/web/src/styles.css @@ -3133,6 +3133,24 @@ body::-webkit-scrollbar, .app::-webkit-scrollbar, #root::-webkit-scrollbar { white-space: normal; } +/* Stands in for a buy control while there is no server to buy through. A + label, not a button: there is nothing for a press to do. */ +.store-soon { + padding: 0.35rem 0.9rem; + border: var(--border-width) dashed var(--border-color); + border-radius: var(--radius); + color: var(--sub-color); + font-size: 0.75rem; + text-transform: uppercase; + letter-spacing: 1px; + white-space: nowrap; +} + +.store-offline-note { + justify-content: center; + text-align: center; +} + /* Physical goods. A card, like a bundle, because each one has a description, possibly a size to pick, and a postage line. */ .merch-note { |