Show the shared Supporter badge and document source delivery

This commit is contained in:
coyotte508 2026-10-04 11:27:57 +02:00
parent 6d05f81acd
commit e4422deb48
5 changed files with 29 additions and 1 deletions

View file

@ -11,3 +11,17 @@ Use English for code, identifiers, documentation, tests and source UI strings.
- Keep source assets separate from the source-code license. Do not upload the original production PDFs to the repository.
- Match BGS's emitter contract; do not implement a second postMessage bridge. Uplink payloads must be plain serializable values.
- The beta is not ready for publication until the platform clock and cooperative result concerns in `docs/bgs-integration.md` are resolved or explicitly bounded for a private test.
## BGS publication and Git delivery
Whenever changes are published to BGS, commit the corresponding source, tests,
dependency/lockfile changes and version bumps, then push them to this repository's
`main` or `master` release branch in the same task. A BGS upload or a push only to
a feature branch does not complete delivery. This is standing authorization to
commit and push published changes without asking for separate confirmation.
Fetch and integrate the latest release-branch changes, run the relevant repository
checks, and push without force. Update any public mirrors required by this repo's
existing workflow too. Keep credentials, generated artifacts excluded by the repo,
and unrelated unfinished work out of the commit. Verify the remote branch contains
the delivered commit and report any blocker instead of claiming delivery.

View file

@ -666,7 +666,12 @@
class="teammate-name"
data-bgs-player={i}
onclick={() => (store.local ? store.selectSeat(i) : store.clickPlayer(i))}
>{p.name}{#if seat === i}<small>YOU</small>{/if}</button
>{p.name}{#if store.appearance.players?.[i]?.pro && store.appearance.supporterBadge}<img
class="supporter-badge"
src={store.appearance.supporterBadge.url}
alt={store.appearance.supporterBadge.label}
title={store.appearance.supporterBadge.label}
/>{/if}{#if seat === i}<small>YOU</small>{/if}</button
><span class="role-name" title=""
><button
type="button"

View file

@ -2,6 +2,7 @@ import { ChatController } from "@boardgamers/protocol/chat";
import { SoundDesign, type SoundCue } from "./sound";
import type { View, Move } from "fuji-engine";
export class Store {
appearance = $state<{ players?: { pro?: boolean }[]; supporterBadge?: { url: string; label: string } }>({});
analysis = $state(false);
chatNotifications = $state(true);
chat = new ChatController();

View file

@ -137,6 +137,13 @@ h3 {
min-width: 0;
flex: 1;
}
.teammate-name .supporter-badge {
width: 14px;
height: 14px;
flex-shrink: 0;
vertical-align: -2px;
margin-left: 4px;
}
.teammate-name {
font-size: 13px;
display: flex;

View file

@ -39,6 +39,7 @@ registerViewer<View, Move>(
if (!(await localization.setLocale(preferences.locale))) {
return;
}
store.appearance = (preferences.bgs ?? {}) as typeof store.appearance;
store.analysis = preferences.analysis === true;
store.chatNotifications = preferences.chatNotifications !== false;
store.colorblind = preferences.colorBlind === true;