feat: add selectable icon styles

This commit is contained in:
Georg Bauer
2026-07-30 18:13:42 +02:00
parent 8c383e3672
commit d8a63c00f5
5 changed files with 326 additions and 66 deletions

View File

@@ -96,5 +96,26 @@ mod tests {
"https://gitea.example.com|octo/demo"
);
assert_eq!(Preferences::default().pull_status, "open");
assert_eq!(
Preferences::default().icon_style,
crate::domain::IconStyle::Outline
);
assert_eq!(
serde_json::from_str::<Preferences>(r#"{"icon_style":"duotone"}"#)
.unwrap()
.icon_style,
crate::domain::IconStyle::Duotone
);
assert_eq!(
serde_json::from_str::<Preferences>(r#"{"icon_style":"future-style"}"#)
.unwrap()
.icon_style,
crate::domain::IconStyle::Outline
);
assert_eq!(
crate::domain::IconStyle::from_index(2),
Some(crate::domain::IconStyle::Bold)
);
assert_eq!(crate::domain::IconStyle::from_index(3), None);
}
}