Skip to content

Commit

Permalink
Merge revault#290: Fix call to action in home view
Browse files Browse the repository at this point in the history
a5c580a fix wrong message in stakeholder home view (edouard)
e142b57 Remove call to action for manager in home view (edouard)

Pull request description:

ACKs for top commit:
  darosior:
    ACK a5c580a -- tested with aquarium i don't have the call to action for managers anymore, and the button redirects to the deposit screen.

Tree-SHA512: e11ea25b792699866adc058ee3a704f84e2f9fc763813b17bbdeefc62bea9ec6c7a5fb6e5686a9bd59599edb80e77329aa991fd5b8dd1408c0276cfe90e6b11b
  • Loading branch information
edouardparis committed Dec 16, 2021
2 parents f3d3b57 + a5c580a commit 02e480c
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions src/app/view/home.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,13 @@ use crate::{
#[derive(Debug)]
pub struct ManagerHomeView {
dashboard: layout::Dashboard,
deposit_button: iced::button::State,
history_button: iced::button::State,
}

impl ManagerHomeView {
pub fn new() -> Self {
ManagerHomeView {
dashboard: layout::Dashboard::new(),
deposit_button: iced::button::State::default(),
history_button: iced::button::State::default(),
}
}
Expand Down Expand Up @@ -59,26 +57,6 @@ impl ManagerHomeView {
)
}

if active_funds == 0 && inactive_funds == 0 && latest_events.is_empty() {
content = content.push(card::simple(
Row::new()
.push(
Container::new(Text::new(
"No vaults yet, start using Revault by making a deposit",
))
.width(Length::Fill),
)
.push(
button::primary(
&mut self.deposit_button,
button::button_content(None, "Deposit"),
)
.on_press(Message::Menu(Menu::Deposit)),
)
.align_items(iced::Align::Center),
))
}

if !moving_vaults.is_empty() {
content = content
.push(Text::new("Funds are moving:"))
Expand Down Expand Up @@ -192,7 +170,7 @@ impl StakeholderHomeView {
&mut self.deposit_button,
button::button_content(None, "Deposit"),
)
.on_press(Message::Menu(Menu::CreateVaults)),
.on_press(Message::Menu(Menu::Deposit)),
)
.align_items(iced::Align::Center),
)))
Expand Down

0 comments on commit 02e480c

Please sign in to comment.