mirror of
https://github.com/nelsbrock/disbahn.git
synced 2026-08-14 14:22:07 +02:00
improve category tags
This commit is contained in:
+6
-3
@@ -57,18 +57,21 @@ impl Item<'_> {
|
||||
|
||||
fn tag(&self) -> Cow<'static, str> {
|
||||
match self.icon {
|
||||
"HIM0" => "\u{2139}\u{FE0F} Information".into(),
|
||||
"HIM1" => "\u{1F6A7} Bauarbeiten".into(),
|
||||
"HIM2" => "\u{26A0}\u{FE0F} Störung".into(),
|
||||
"HIM3" => "\u{270A} Streik".into(),
|
||||
other => format!("\u{2139}\u{FE0F} Information ({other})").into(),
|
||||
other => format!("\u{1F937} Unbekannte Kategorie {other:?}").into(),
|
||||
}
|
||||
}
|
||||
|
||||
fn colour(&self) -> u32 {
|
||||
match self.icon {
|
||||
"HIM0" => 0x154889,
|
||||
"HIM1" => 0xf5c211,
|
||||
"HIM2" | "HIM3" => 0xc1121c,
|
||||
_ => 0x154889,
|
||||
"HIM2" => 0xc1121c,
|
||||
"HIM3" => 0xff6a00,
|
||||
_ => 0xffffff,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user