Phase 3's acceptance criterion 1, made real. Three things, one review: **The dead bindings.** `client/src/api/client.js` still carried ~190 lines of UO namespaces — `shard`, `atlas`, the two SSE URLs, `admin.shard/shardOps/atlas/ userShard`, the uo-link and town-crier calls, `player.shard` — with zero core consumers since slice 3 deleted the views. module-uo vendors its own bindings. The five assertions core's `apiClient.test.js` made about those URLs moved with them (Module-uo#5); the encoding test that used `governorHistory` now uses a core route. **The copy.** Core is the platform, not one game's site, so its words are game-neutral now: `About`, `Screenshots`, `Website`'s cards, `Status` (which was never about a game server at all — it reports site mode), `Wiki`, `SiteFooter`, the default hero, `brand.js`'s tagline and description, the seeded wiki categories, and two user-visible NavEditor strings that named a module's admin screen by its proper name. Which game an instance is for is the operator's to say — BRAND_* vars, the hero editor, CMS pages — and every real instance already does: `.env.uomysticmoon.example` sets both brand strings explicitly, so nothing live changes wording. Wiki page SLUGS are untouched: `seedDefault*` only inserts what is absent, so renaming one adds a duplicate page to every install. Also gone: an orphan comment block in `schema.sql` describing the spawn-atlas tables slice 1 took away, and the two settings rows core seeded for a module (`game_account_signup`, `uo_link_protocol_3_migrated`). The second was a live defect — see Module-uo#5, which takes ownership of both and repairs the one-shot migration core's ordering had disabled. **The check.** `scripts/checkModuleIdentifiers.js` + `npm run check:modules`, first step of the server-tests job because it needs no dependencies. It reads CODE, not prose — file names, import specifiers, route path literals, declared identifiers and property names — per §5.2, so core's English may still say "shard" where saying it is worth more than the word costs. Two things it gets right only because getting them wrong was tried first: it matches WHOLE WORDS (a substring pass flags `defaultImage`, which contains "ultIma", four times in this repo), and it strips comments and string bodies in one character walk (a comment contains quotes, a string contains `//`) — the `checkImports.js` lesson. It has its own 17-test suite, because a boundary check that silently stops checking is worse than none. The three §6.5 grandfathering allowlists are exempt by name, and an exemption that stops matching fails the build rather than lingering. BREAKING CHANGE: core no longer seeds `game_account_signup` or `uo_link_protocol_3_migrated`; module-uo's schema fragment does. An install running core without module-uo keeps whatever rows it already has and gains no new ones — nothing in core reads either key. Deferred to slice 5, deliberately: README.md's 48 UO mentions, including a `## Shard integration (uo-link)` section and the architecture diagram. That is documentation, which §5.2 does not cover, and it belongs with the phase-closing docs pass rather than half-done here. Co-Authored-By: Claude <noreply@anthropic.com>
66 lines
2.5 KiB
JavaScript
66 lines
2.5 KiB
JavaScript
import { Link } from 'react-router-dom'
|
|
import { useSite } from '../contexts/SiteContext.jsx'
|
|
import Slot from '../modules/Slot.jsx'
|
|
|
|
const FOOTER_SLOT = 'site.footer.status'
|
|
|
|
// Handed to the extension rather than left for it to guess. A module rendering
|
|
// its own link in this row should look like the row, and the alternative is
|
|
// every module restating core's colours and then drifting from them the next
|
|
// time this footer is themed.
|
|
const LINK_STYLE = { color: 'var(--accent)', textDecoration: 'none' }
|
|
|
|
export default function SiteFooter() {
|
|
const { contactEmail, siteTitle } = useSite()
|
|
return (
|
|
<footer
|
|
className="sans site-footer"
|
|
style={{
|
|
borderTop: '1px solid var(--line)',
|
|
padding: '28px 16px',
|
|
color: 'var(--muted)',
|
|
fontSize: '0.9rem',
|
|
background: 'rgba(9,13,18,0.6)',
|
|
}}
|
|
>
|
|
<div className="site-footer-inner">
|
|
<div className="site-footer-badge">
|
|
<img src="/assets/img/runic-emblem.png" alt="" aria-hidden="true" />
|
|
<span>
|
|
Powered by
|
|
<br />
|
|
<a
|
|
href="https://gitea.whitlocktech.com/RunicGateway"
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
className="site-footer-brand-link"
|
|
>
|
|
<strong>Runic Gateway</strong>
|
|
</a>
|
|
</span>
|
|
</div>
|
|
<div className="site-footer-info">
|
|
<span>{siteTitle} is an independent, privately-run game server.</span>
|
|
<span style={{ color: 'var(--dim)', fontSize: '0.84rem' }}>
|
|
<a href={`mailto:${contactEmail}`} style={{ color: 'var(--accent)', textDecoration: 'none' }}>
|
|
{contactEmail}
|
|
</a>
|
|
{/* A module's spot in the footer, and core supplies only the
|
|
position and the styling: the label, the target and whether
|
|
anything renders at all are the module's (MODULE_API.md §3.7).
|
|
The separator goes through `wrap` rather than sitting beside the
|
|
slot, so it shares the extension's fate — no module installed and
|
|
a module whose link throws both render nothing here, rather than
|
|
the second leaving a stray middot behind. */}
|
|
<Slot name={FOOTER_SLOT} linkStyle={LINK_STYLE} wrap={(link) => <> · {link}</>} />
|
|
·
|
|
<Link to="/admin/login" style={{ color: '#5d6b7d', textDecoration: 'none' }}>
|
|
Admin
|
|
</Link>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
)
|
|
}
|