Website: one page in six languages, downloads via the server, download statistics
Some checks are pending
CI / check (push) Waiting to run
CI / windows-build (push) Waiting to run
CI / macos-build (push) Waiting to run

Rust server (axum) with server-side translations, OS-aware download buttons,
/download/<platform> redirecting to the latest GitHub release asset and logging
platform, version and geolocated region (no IP stored), password-protected /stats
and /stats.csv. Docker compose setup behind nginx. Ten screenshots taken with new
dev hooks (CP_FILTER, CP_PANE, CP_SORT, CP_BOARD).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
vrubelroman 2026-10-19 11:00:10 +03:00
parent cb55ddea29
commit 265d9d794b
90 changed files with 5073 additions and 4 deletions

View file

@ -263,14 +263,39 @@ impl LargeView {
if let Ok(p) = std::env::var("CP_FILTER_PLAYER") {
form.player.text = p;
}
let (board, pane) = match SearchBoard::from_env() {
// `CP_FILTER="player=carlsen;years=2015-2026;elo=2600"` (screenshots).
if let Ok(spec) = std::env::var("CP_FILTER") {
for part in spec.split(';') {
let Some((k, v)) = part.split_once('=') else { continue };
match k.trim() {
"player" => form.player.text = v.to_string(),
"years" => {
let (a, b) = v.split_once('-').unwrap_or((v, ""));
form.year_from = a.to_string();
form.year_to = b.to_string();
}
"elo" => form.elo_min = v.to_string(),
_ => {}
}
}
}
let (board, mut pane) = match SearchBoard::from_env() {
Some(b) => (b, Pane::Board),
None => (SearchBoard::new(), Pane::Filters),
};
if std::env::var("CP_PANE").as_deref() == Ok("hidden") {
pane = Pane::Hidden;
}
// `CP_SORT=date`: newest games first (screenshots).
let sort = if std::env::var("CP_SORT").as_deref() == Ok("date") {
(SortKey::Date, false)
} else {
(SortKey::Number, true)
};
LargeView {
form,
sort: (SortKey::Number, true),
sort_chosen: false,
sort,
sort_chosen: sort.0 != SortKey::Number,
view: Vec::new(),
shown: None,
outcome: None,