From 4696eeb509f5e9ef07e20df8f0c181e004c36c9c Mon Sep 17 00:00:00 2001 From: insects Date: Tue, 11 Feb 2025 15:49:29 +0100 Subject: [PATCH] show decimal place for patches --- src/changelog.rs | 1 + src/templates.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/changelog.rs b/src/changelog.rs index 22ff6d3..6b0020f 100644 --- a/src/changelog.rs +++ b/src/changelog.rs @@ -10,6 +10,7 @@ pub fn changelog_page() -> Markup { h2 { "1.4.0" } ul { li { "Implemented support for Fisher's Intuition" } + li { "Fixed .0 patches showing without the decimal place (e.g. 6.0 would display as 6)" } } } diff --git a/src/templates.rs b/src/templates.rs index 695b853..048bc3e 100644 --- a/src/templates.rs +++ b/src/templates.rs @@ -119,7 +119,7 @@ pub fn fish_display(fish: &CombinedFish, data: &ViewData) -> Markup { div.name { h3 { (fish.meta.name_en) - span class=(format!("patch patch-{}", fish.entry.patch as u32)) { (fish.entry.patch) } + span class=(format!("patch patch-{}", fish.entry.patch as u32)) { (format!("{:.1}", fish.entry.patch)) } .subtitle { span { "Rarity: " (format!("{:.2}", fish.rarity * 100.)) "%" }