Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add events for input #161

Open
wants to merge 1 commit into
base: feat/treasury-plugins
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/components/molecules/actions/transfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ pub fn TransferAction(props: VotingProps) -> Element {
},
on_keypress: move |_| {},
on_click: move |_| {},
on_focus: move |_| {}, on_blur: move |_| {}
}
Input {
message: (transfer.value / KUSAMA_PRECISION_DECIMALS).to_string(),
Expand All @@ -65,6 +66,7 @@ pub fn TransferAction(props: VotingProps) -> Element {
},
on_keypress: move |_| {},
on_click: move |_| {},
on_focus: move |_| {}, on_blur: move |_| {}
}
}
IconButton {
Expand Down
2 changes: 2 additions & 0 deletions src/components/molecules/actions/treasury.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ pub fn TreasuryAction(props: VotingProps) -> Element {
},
on_keypress: move |_| {},
on_click: move |_| {},
on_focus: move |_| {}, on_blur: move |_| {}
}
if index_meta > 0 {
Input {
Expand All @@ -97,6 +98,7 @@ pub fn TreasuryAction(props: VotingProps) -> Element {
},
on_keypress: move |_| {},
on_click: move |_| {},
on_focus: move |_| {}, on_blur: move |_| {}
}
}
}
Expand Down
1 change: 1 addition & 0 deletions src/components/molecules/actions/voting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ pub fn VotingAction(props: VotingProps) -> Element {
},
on_keypress: move |_| {},
on_click: move |_| {},
on_focus: move |_| {}, on_blur: move |_| {}
}
}
div {
Expand Down
8 changes: 5 additions & 3 deletions src/components/molecules/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,11 @@ pub fn Header() -> Element {
for account in accounts.get().into_iter() {
let address = account.address();

items.push(rsx!(
AccountButton { title: account.name(), description: address.clone(), on_click: move |_| {} }
))
items.push(rsx!(AccountButton {
title: account.name(),
description: address.clone(),
on_click: move |_| { log::info!("click") }
}))
}

let on_handle_account = use_coroutine(move |mut rx: UnboundedReceiver<u8>| async move {
Expand Down
3 changes: 2 additions & 1 deletion src/components/molecules/initiative/info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ pub fn InitiativeInfo(error: bool) -> Element {
}
},
on_keypress: move |_| {},
on_click: move |_| {}
on_click: move |_| {},
on_focus: move |_| {}, on_blur: move |_| {}
}
}
hr { class: "form__divider" }
Expand Down
6 changes: 4 additions & 2 deletions src/components/molecules/onboarding/basics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ pub fn OnboardingBasics(error: bool) -> Element {
}
},
on_keypress: move |_| {},
on_click: move |_| {}
on_click: move |_| {},
on_focus: move |_| {}, on_blur: move |_| {}
}
TextareaInput {
value: onboard.get_basics().description,
Expand Down Expand Up @@ -94,7 +95,8 @@ pub fn OnboardingBasics(error: bool) -> Element {
onboard.basics_mut().with_mut(|basics| basics.industry = event.value());
},
on_keypress: move |_| {},
on_click: move |_| {}
on_click: move |_| {},
on_focus: move |_| {}, on_blur: move |_| {}
}
}
)
Expand Down
11 changes: 8 additions & 3 deletions src/components/molecules/sidebar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ use crate::{
Icon, IconButton, OnOff, Star,
},
hooks::{
use_accounts::use_accounts, use_communities::use_communities,
use_our_navigator::use_our_navigator, use_tooltip::use_tooltip,
use_accounts::use_accounts,
use_communities::use_communities,
use_our_navigator::use_our_navigator,
use_tabs::{use_tabs, Tab},
use_tooltip::use_tooltip,
},
};
#[component]
Expand All @@ -18,6 +21,7 @@ pub fn Sidebar() -> Element {
let nav = use_our_navigator();
let mut tooltip = use_tooltip();
let accounts = use_accounts();
let mut tabs = use_tabs();

let mut is_active = use_signal(|| false);

Expand Down Expand Up @@ -133,7 +137,8 @@ pub fn Sidebar() -> Element {
class: if active_community.id == community.id { "sidebar__item--active" },
onclick: move |_| {
if let Ok(_) = communities.set_community(community_id) {
let path = format!("/dao/{}/initiatives", community_id);
let path = format!("/dao/{}/plugins", community_id);
tabs.push(Tab { name: "Home".to_string(), path: path.clone() });
nav.push(vec![], &path);
};
},
Expand Down