chore: cargo fmt across workspace; add analytics domain to CSP
Build and Deploy / build-and-push (push) Successful in 4m46s
Build and Deploy / build-and-push (push) Successful in 4m46s
- Apply cargo fmt to solitaire_engine, solitaire_server formatting. - solitaire_server/src/lib.rs: add https://analytics.aleshym.co to script-src, img-src, and connect-src so the analytics beacon loads without a CSP violation. - docs and README updates. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -269,7 +269,10 @@ pub fn compute_layout(
|
||||
5 => Tableau::Tableau6,
|
||||
_ => Tableau::Tableau7,
|
||||
};
|
||||
pile_positions.insert(KlondikePile::Tableau(tableau), Vec2::new(col_x(i), tableau_y));
|
||||
pile_positions.insert(
|
||||
KlondikePile::Tableau(tableau),
|
||||
Vec2::new(col_x(i), tableau_y),
|
||||
);
|
||||
}
|
||||
|
||||
// Adaptive tableau fan fraction. On height-limited (desktop) windows the
|
||||
@@ -339,7 +342,9 @@ mod tests {
|
||||
Tableau::Tableau7,
|
||||
] {
|
||||
assert!(
|
||||
layout.pile_positions.contains_key(&KlondikePile::Tableau(tableau)),
|
||||
layout
|
||||
.pile_positions
|
||||
.contains_key(&KlondikePile::Tableau(tableau)),
|
||||
"missing tableau {tableau:?}"
|
||||
);
|
||||
}
|
||||
@@ -758,7 +763,11 @@ mod tests {
|
||||
let window = Vec2::new(360.0, 800.0);
|
||||
let without = compute_layout(window, 0.0, 0.0, true);
|
||||
let with_inset = compute_layout(window, 0.0, 48.0, true);
|
||||
for pile in [KlondikePile::Stock, KlondikePile::Tableau(Tableau::Tableau1), KlondikePile::Tableau(Tableau::Tableau7)] {
|
||||
for pile in [
|
||||
KlondikePile::Stock,
|
||||
KlondikePile::Tableau(Tableau::Tableau1),
|
||||
KlondikePile::Tableau(Tableau::Tableau7),
|
||||
] {
|
||||
assert!(
|
||||
(without.pile_positions[&pile].x - with_inset.pile_positions[&pile].x).abs() < 1e-3,
|
||||
"{pile:?} x-position must not change with safe_area_bottom",
|
||||
|
||||
Reference in New Issue
Block a user