gui: change date time format
This commit is contained in:
parent
36d4968ebb
commit
fd67c5dea8
@ -86,7 +86,9 @@ fn tx_list_view<'a>(i: usize, tx: &HistoryTransaction) -> Element<'a, Message> {
|
||||
Container::new(
|
||||
text(format!(
|
||||
"{}",
|
||||
NaiveDateTime::from_timestamp_opt(t as i64, 0).unwrap(),
|
||||
NaiveDateTime::from_timestamp_opt(t as i64, 0)
|
||||
.unwrap()
|
||||
.format("%b. %d, %Y - %T"),
|
||||
))
|
||||
.small(),
|
||||
)
|
||||
@ -147,7 +149,9 @@ pub fn tx_view<'a>(cache: &Cache, tx: &'a HistoryTransaction) -> Element<'a, Mes
|
||||
.push(card::simple(
|
||||
Column::new()
|
||||
.push_maybe(tx.time.map(|t| {
|
||||
let date = NaiveDateTime::from_timestamp_opt(t as i64, 0).unwrap();
|
||||
let date = NaiveDateTime::from_timestamp_opt(t as i64, 0)
|
||||
.unwrap()
|
||||
.format("%b. %d, %Y - %T");
|
||||
Row::new()
|
||||
.width(Length::Fill)
|
||||
.push(Container::new(text("Date:").bold()).width(Length::Fill))
|
||||
|
||||
@ -39,10 +39,13 @@ pub fn confirmed_outgoing_event<'a, T: Clone + 'a>(
|
||||
Container::new(
|
||||
button(
|
||||
row!(
|
||||
row!(badge::spend(), text::p2_regular(date.to_string()))
|
||||
.spacing(10)
|
||||
.align_items(Alignment::Center)
|
||||
.width(Length::Fill),
|
||||
row!(
|
||||
badge::spend(),
|
||||
text::p2_regular(date.format("%b. %d, %Y - %T").to_string())
|
||||
)
|
||||
.spacing(10)
|
||||
.align_items(Alignment::Center)
|
||||
.width(Length::Fill),
|
||||
row!(text::p1_regular("-"), amount::amount(amount))
|
||||
.spacing(5)
|
||||
.align_items(Alignment::Center),
|
||||
@ -87,10 +90,13 @@ pub fn confirmed_incoming_event<'a, T: Clone + 'a>(
|
||||
Container::new(
|
||||
button(
|
||||
row!(
|
||||
row!(badge::receive(), text::p2_regular(date.to_string()))
|
||||
.spacing(10)
|
||||
.align_items(Alignment::Center)
|
||||
.width(Length::Fill),
|
||||
row!(
|
||||
badge::receive(),
|
||||
text::p2_regular(date.format("%b. %d, %Y - %T").to_string())
|
||||
)
|
||||
.spacing(10)
|
||||
.align_items(Alignment::Center)
|
||||
.width(Length::Fill),
|
||||
row!(text::p1_regular("+"), amount::amount(amount))
|
||||
.spacing(5)
|
||||
.align_items(Alignment::Center),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user