Merge #1693: gui: review primary buttons in the application
8e98f828a0b61f6a2b2a988118e8557dd33f9d59 gui: review primary buttons in the application (Thomas Ballivet) Pull request description: You can see below the updated GUI. If needed I can make the panel's "Broadcast" button secondary when the broadcast modal is displayed.          ACKs for top commit: edouardparis: utACK 8e98f828a0b61f6a2b2a988118e8557dd33f9d59 Tree-SHA512: 80bed065f3eca6c92273aaa9fd62fd61f31121e14e66325efbcac3b95d2898f52982872debf4d8cf8238f2dd4f37d8858c644f240784888ea63b73a61d0cf487
This commit is contained in:
commit
13709aa302
@ -63,6 +63,7 @@ fn coin_list_view<'a>(
|
||||
let outpoint = coin.outpoint.to_string();
|
||||
let address = coin.address.to_string();
|
||||
let txid = coin.outpoint.txid.to_string();
|
||||
let seq = remaining_sequence(coin, blockheight, timelock);
|
||||
Container::new(
|
||||
Column::new()
|
||||
.push(
|
||||
@ -120,7 +121,6 @@ fn coin_list_view<'a>(
|
||||
} else if coin.block_height.is_none() {
|
||||
badge::unconfirmed()
|
||||
} else {
|
||||
let seq = remaining_sequence(coin, blockheight, timelock);
|
||||
coin_sequence_label(seq, timelock as u32)
|
||||
})
|
||||
.spacing(10)
|
||||
@ -298,12 +298,18 @@ fn coin_list_view<'a>(
|
||||
.spacing(5)
|
||||
} else {
|
||||
Column::new().push(
|
||||
Row::new().push(Space::with_width(Length::Fill)).push(
|
||||
button::secondary(Some(icon::arrow_repeat()), "Refresh coin")
|
||||
.on_press(Message::Menu(Menu::RefreshCoins(vec![
|
||||
coin.outpoint,
|
||||
]))),
|
||||
),
|
||||
Row::new().push(Space::with_width(Length::Fill)).push({
|
||||
let (icon, label) =
|
||||
(Some(icon::arrow_repeat()), "Refresh coin");
|
||||
let refresh_btn = if seq == 0 {
|
||||
button::primary(icon, label)
|
||||
} else {
|
||||
button::secondary(icon, label)
|
||||
};
|
||||
refresh_btn.on_press(Message::Menu(Menu::RefreshCoins(vec![
|
||||
coin.outpoint,
|
||||
])))
|
||||
}),
|
||||
)
|
||||
}),
|
||||
)
|
||||
|
||||
@ -174,10 +174,9 @@ pub fn home_view<'a>(
|
||||
.width(Length::Fill),
|
||||
)
|
||||
.push(
|
||||
button::secondary(Some(icon::arrow_repeat()), "Refresh coins")
|
||||
.on_press(Message::Menu(Menu::RefreshCoins(
|
||||
expiring_coins.to_owned(),
|
||||
))),
|
||||
button::primary(Some(icon::arrow_repeat()), "Refresh coins").on_press(
|
||||
Message::Menu(Menu::RefreshCoins(expiring_coins.to_owned())),
|
||||
),
|
||||
),
|
||||
)
|
||||
.padding(25)
|
||||
|
||||
@ -215,7 +215,7 @@ pub fn broadcast_action<'a>(
|
||||
})
|
||||
.push(
|
||||
Row::new().push(Column::new().width(Length::Fill)).push(
|
||||
button::secondary(None, "Broadcast")
|
||||
button::primary(None, "Broadcast")
|
||||
.on_press(Message::Spend(SpendTxMessage::Confirm)),
|
||||
),
|
||||
),
|
||||
@ -383,13 +383,13 @@ pub fn spend_overview_view<'a>(
|
||||
.push(Space::with_width(Length::Fill))
|
||||
.push_maybe(if tx.path_ready().is_none() {
|
||||
Some(
|
||||
button::secondary(None, "Sign")
|
||||
button::primary(None, "Sign")
|
||||
.on_press(Message::Spend(SpendTxMessage::Sign))
|
||||
.width(Length::Fixed(150.0)),
|
||||
)
|
||||
} else {
|
||||
Some(
|
||||
button::secondary(None, "Broadcast")
|
||||
button::primary(None, "Broadcast")
|
||||
.on_press(Message::Spend(SpendTxMessage::Broadcast))
|
||||
.width(Length::Fixed(150.0)),
|
||||
)
|
||||
|
||||
@ -44,7 +44,7 @@ pub fn receive<'a>(
|
||||
.align_y(Alignment::Center)
|
||||
.push(Container::new(h3("Receive")).width(Length::Fill))
|
||||
.push(
|
||||
button::secondary(Some(icon::plus_icon()), "Generate address")
|
||||
button::primary(Some(icon::plus_icon()), "Generate address")
|
||||
.on_press(Message::Next),
|
||||
),
|
||||
)
|
||||
|
||||
@ -75,7 +75,7 @@ pub fn recovery<'a>(
|
||||
Row::new()
|
||||
.push(Space::with_width(Length::Fill))
|
||||
.push(
|
||||
button::secondary(None, "Next")
|
||||
button::primary(None, "Next")
|
||||
.on_press_maybe(selected_path.map(|_| Message::Next))
|
||||
.width(Length::Fixed(200.0)),
|
||||
)
|
||||
|
||||
@ -915,7 +915,7 @@ pub fn rescan<'a>(
|
||||
&& is_ok_and(&u32::from_str(&day.value), |&v| v > 0 && v <= 31))
|
||||
{
|
||||
Row::new().push(Column::new().width(Length::Fill)).push(
|
||||
button::secondary(None, "Start rescan")
|
||||
button::primary(None, "Start rescan")
|
||||
.on_press(SettingsEditMessage::Confirm)
|
||||
.width(Length::Shrink),
|
||||
)
|
||||
|
||||
@ -334,7 +334,7 @@ pub fn create_spend_tx<'a>(
|
||||
|| recovery_timelock.is_some()
|
||||
|| Some(&Amount::from_sat(0)) == amount_left)
|
||||
{
|
||||
button::secondary(None, "Next")
|
||||
button::primary(None, "Next")
|
||||
.on_press(Message::CreateSpend(CreateSpendMessage::Generate))
|
||||
.width(Length::Fixed(100.0))
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user