Merge #1668: Small fixes and improvements to the Recovery panel UI
356301c79c6f621e8329287f70a112ddbb16d43d feat: add brief overview of recovery feature (Michael Mallan) 30aedb3e5b8b10cb0df9f937a5d362fccb91bf34 fix: use singular for one coin (Michael Mallan) eb45d6ef8f50ea4384b1f5ce9fd4f0c0aaf98237 fix: show tooltip above to improve legibility (Michael Mallan) ea8e8453d7ae59862f326f8e5111fd3d0b5ea9cc fix: clarify available recovery paths wording (Michael Mallan) Pull request description: This fixes and implements the items from #1664, except for the alias refresh, which is covered by #1667. ACKs for top commit: edouardparis: utACK 356301c79c6f621e8329287f70a112ddbb16d43d Tree-SHA512: ca5c71d214126e9447e48be5be9294c72b046136223f5b7848ee458c726ebf316042c612763a5c1a146450c15a566e56a2521bd2f0c2b6e0a04c7dcbc40163f7
This commit is contained in:
commit
3da69f0cec
@ -34,28 +34,40 @@ pub fn recovery<'a>(
|
||||
warning: Option<&Error>,
|
||||
) -> Element<'a, Message> {
|
||||
let no_recovery_paths = recovery_paths.is_empty();
|
||||
const INFO_TEXT: &str = "Recover your funds by sending them to another wallet if you have lost access to your primary spending path.";
|
||||
dashboard(
|
||||
&Menu::Recovery,
|
||||
cache,
|
||||
warning,
|
||||
Column::new()
|
||||
.push(Container::new(h3("Recovery")).width(Length::Fill))
|
||||
.push(Container::new(text(INFO_TEXT)))
|
||||
.push(Space::with_height(Length::Fixed(20.0)))
|
||||
.push(if no_recovery_paths {
|
||||
Container::new(text("No recovery path is currently available"))
|
||||
} else {
|
||||
.push(
|
||||
Container::new(
|
||||
Column::new()
|
||||
.spacing(20)
|
||||
.push(text(format!(
|
||||
"{} recovery paths will be available at the next block, select one:",
|
||||
recovery_paths.len()
|
||||
)))
|
||||
.push(
|
||||
text(if no_recovery_paths {
|
||||
"No recovery path is currently available.".to_string()
|
||||
} else {
|
||||
format!(
|
||||
"{} recovery path{} available:",
|
||||
recovery_paths.len(),
|
||||
if recovery_paths.len() > 1 {
|
||||
"s are"
|
||||
} else {
|
||||
" is"
|
||||
},
|
||||
)
|
||||
})
|
||||
.width(Length::Fill),
|
||||
)
|
||||
.push_maybe((!no_recovery_paths).then_some(Space::with_height(20)))
|
||||
.push(Column::with_children(recovery_paths).spacing(20)),
|
||||
)
|
||||
.style(theme::card::simple)
|
||||
.padding(20)
|
||||
})
|
||||
.padding(20),
|
||||
)
|
||||
.push_maybe(if no_recovery_paths {
|
||||
None
|
||||
} else {
|
||||
@ -113,7 +125,7 @@ pub fn recovery_path_view<'a>(
|
||||
.padding(5)
|
||||
.style(theme::pill::simple),
|
||||
liana_ui::widget::Text::new(fg.to_string()),
|
||||
tooltip::Position::Bottom,
|
||||
tooltip::Position::Top,
|
||||
)
|
||||
.style(theme::card::simple),
|
||||
)
|
||||
@ -132,7 +144,7 @@ pub fn recovery_path_view<'a>(
|
||||
.push(text(format!(
|
||||
"{} coin{} totalling",
|
||||
number_of_coins,
|
||||
if number_of_coins > 0 { "s" } else { "" }
|
||||
if number_of_coins > 1 { "s" } else { "" }
|
||||
)))
|
||||
.push(amount(&total_amount)),
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user