fix: ui tweaks for advices

This commit is contained in:
jane400 2024-08-28 15:07:32 +02:00 committed by jane400
parent cd2bc321cd
commit f3732051af
2 changed files with 10 additions and 9 deletions

View file

@ -82,9 +82,9 @@ struct SendungsInfo {
sendungsliste: Option<String>,
}
#[derive(Deserialize)]
#[derive(Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
struct SendungsVerlaufEvent {
pub struct SendungsVerlaufEvent {
pub datum: String,
ort: Option<String>,
pub ruecksendung: bool,
@ -102,18 +102,18 @@ impl SendungsVerlaufEvent {
}
}
#[derive(Deserialize)]
#[derive(Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
struct SendungsVerlauf {
pub struct SendungsVerlauf {
kurz_status: Option<String>,
icon_id: Option<String>,
datum_aktueller_status: Option<String>,
aktueller_status: Option<String>,
events: Option<Vec<SendungsVerlaufEvent>>,
pub events: Option<Vec<SendungsVerlaufEvent>>,
farbe: u32,
fortschritt: u32,
maximal_fortschritt: u32,
pub fortschritt: u32,
pub maximal_fortschritt: u32,
}
#[derive(Deserialize)]
@ -321,6 +321,7 @@ pub struct Shipment {
pub special: ShipmentSpecialDetails,
pub history: SendungsVerlauf,
pub error: Option<ShipmentNotFoundError>,
}
@ -367,6 +368,7 @@ impl From<Sendung> for Shipment {
None
}
},
history: value.sendungsdetails.sendungsverlauf,
special: ShipmentSpecialDetails {
abholcode_available,
benachrichtigt_in_filiale,

View file

@ -49,6 +49,7 @@ impl FactoryComponent for AppAdvice {
add_overlay = &gtk::Box {
add_css_class: relm4::css::OSD,
add_css_class: relm4::css::TOOLBAR,
add_css_class: relm4::css::NUMERIC,
set_valign: gtk::Align::End,
@ -57,8 +58,6 @@ impl FactoryComponent for AppAdvice {
set_margin_all: 8,
gtk::Label {
set_margin_all: 4,
set_label: self.metadata.date.as_str(),
},
},