refac: remove select button at the choose template step

This commit is contained in:
edouardparis 2024-10-30 11:52:23 +01:00
parent 2eddbbd700
commit 36af35fae3

View File

@ -6,10 +6,8 @@ use iced::{alignment, Alignment, Length};
use liana_ui::{
color,
component::{
button, card,
text::{h3, p1_regular, p2_regular},
},
component::text::{h3, p1_regular, p2_regular},
theme,
widget::*,
};
@ -26,64 +24,55 @@ pub fn choose_descriptor_template(progress: (usize, usize)) -> Element<'static,
.align_items(Alignment::Start)
.push(Container::new(
p1_regular("What do you want your wallet for? This depends on the amount of funds you have, the more funds, the higher the security should be. Not sure about the wallet type? We can help you.")
.style(color::GREY_2)
.horizontal_alignment(alignment::Horizontal::Left)
.style(color::GREY_2)
.horizontal_alignment(alignment::Horizontal::Left)
).align_x(alignment::Horizontal::Left).width(Length::Fill))
.push(
card::simple(
Row::new()
.align_items(Alignment::Center)
.push(
Column::new()
.align_items(Alignment::Start)
.push(h3("Simple inheritance"))
.push(p2_regular("Two keys required, one for yourself to spend and another for your heir.").style(color::GREY_2))
.width(Length::Fill)
)
.push(button::secondary(None, "Select").on_press(
Message::SelectDescriptorTemplate(
context::DescriptorTemplate::SimpleInheritance,
),
)),
Button::new(
Column::new()
.align_items(Alignment::Start)
.push(h3("Simple inheritance"))
.push(p2_regular("Two keys required, one for yourself to spend and another for your heir.").style(color::GREY_2))
.width(Length::Fill)
)
.padding(15)
.on_press(
Message::SelectDescriptorTemplate(
context::DescriptorTemplate::SimpleInheritance,
)
).style(theme::Button::Secondary)
.width(Length::Fill),
)
.push(
card::simple(
Row::new()
.align_items(Alignment::Center)
.push(
Column::new()
.align_items(Alignment::Start)
.push(h3("Multisig security wallet"))
.push(p2_regular("A secure scheme requiring stricter multiparty signature and recovery.").style(color::GREY_2))
.width(Length::Fill)
)
.push(button::secondary(None, "Select").on_press(
Message::SelectDescriptorTemplate(
context::DescriptorTemplate::MultisigSecurity,
),
)),
Button::new(
Column::new()
.align_items(Alignment::Start)
.push(h3("Multisig security wallet"))
.push(p2_regular("A secure scheme requiring stricter multiparty signature and recovery.").style(color::GREY_2))
.width(Length::Fill)
)
.padding(15)
.on_press(
Message::SelectDescriptorTemplate(
context::DescriptorTemplate::MultisigSecurity,
)
).style(theme::Button::Secondary)
.width(Length::Fill),
)
.push(
card::simple(
Row::new()
.align_items(Alignment::Center)
.push(
Column::new()
.align_items(Alignment::Start)
.push(h3("Custom (choose your own)"))
.push(p2_regular("Create a custom setup that fits all your needs").style(color::GREY_2))
.width(Length::Fill)
)
.push(button::secondary(None, "Select").on_press(
Message::SelectDescriptorTemplate(
context::DescriptorTemplate::Custom ,
),
)),
Button::new(
Column::new()
.align_items(Alignment::Start)
.push(h3("Custom (choose your own)"))
.push(p2_regular("Create a custom setup that fits all your needs.").style(color::GREY_2))
.width(Length::Fill)
)
.padding(15)
.on_press(
Message::SelectDescriptorTemplate(
context::DescriptorTemplate::Custom,
)
).style(theme::Button::Secondary)
.width(Length::Fill),
)
.spacing(20),