From ee3cd780e21260257b401c3f5cbababd9e27a15a Mon Sep 17 00:00:00 2001 From: Joe Carstairs Date: Wed, 13 Aug 2025 07:50:21 +0000 Subject: task-073 Co-authored-by: Joe Carstairs Reviewed-on: https://git.joeac.net/joeac/schist/pulls/1 Co-authored-by: Joe Carstairs Co-committed-by: Joe Carstairs --- .../src/gui/components/bucket_name_and_balance.rs | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 schist_desktop_gui/src/gui/components/bucket_name_and_balance.rs (limited to 'schist_desktop_gui/src/gui/components/bucket_name_and_balance.rs') diff --git a/schist_desktop_gui/src/gui/components/bucket_name_and_balance.rs b/schist_desktop_gui/src/gui/components/bucket_name_and_balance.rs new file mode 100644 index 0000000..fa2dcac --- /dev/null +++ b/schist_desktop_gui/src/gui/components/bucket_name_and_balance.rs @@ -0,0 +1,24 @@ +use iced::{ + widget::{row, text}, + Element, +}; +use schist_models::bucket::Bucket; + +use crate::gui::components::navigation; + +#[derive(Clone, Debug, PartialEq)] +pub struct BucketNameAndBalance { + pub bucket: Bucket, +} + +impl BucketNameAndBalance { + pub fn new(bucket: Bucket) -> Self { + Self { bucket } + } +} + +impl<'a> Into>> for BucketNameAndBalance { + fn into(self) -> Element<'a, navigation::Message> { + row![text(self.bucket.name.clone()), text(self.bucket.balance)].into() + } +} -- cgit v1.2.3