diff --git a/radicle-tui/src/app.rs b/radicle-tui/src/app.rs index 8d861c66..eadc8c41 100644 --- a/radicle-tui/src/app.rs +++ b/radicle-tui/src/app.rs @@ -16,7 +16,7 @@ use radicle_tui::ui; use radicle_tui::ui::components::container::{GlobalListener, LabeledContainer, Tabs}; use radicle_tui::ui::components::context::{ContextBar, Shortcuts}; use radicle_tui::ui::components::list::PropertyList; -use radicle_tui::ui::components::workspace::{Browser, PatchActivity, PatchFiles}; +use radicle_tui::ui::components::workspace::{Browser, IssueBrowser, PatchActivity, PatchFiles}; use radicle_tui::ui::layout; use radicle_tui::ui::theme::{self, Theme}; use radicle_tui::ui::widget::Widget; @@ -230,7 +230,7 @@ impl ViewPage for Home { let navigation = ui::home_navigation(theme).to_boxed(); let dashboard = ui::dashboard(theme, &context.id, &context.project).to_boxed(); - let issue_browser = Box::::default(); + let issue_browser = ui::issue_browser(&theme).to_boxed(); let patch_browser = ui::patch_browser(theme, &context.patches, &context.profile).to_boxed(); let shortcuts = ui::shortcuts( @@ -430,6 +430,12 @@ impl tuirealm::Component for Widget for Widget { + fn on(&mut self, _event: Event) -> Option { + None + } +} + impl tuirealm::Component for Widget { fn on(&mut self, event: Event) -> Option { match event { diff --git a/radicle-tui/src/ui.rs b/radicle-tui/src/ui.rs index 86fb6a1c..fad82751 100644 --- a/radicle-tui/src/ui.rs +++ b/radicle-tui/src/ui.rs @@ -22,7 +22,7 @@ use widget::Widget; use self::cob::patch; use self::components::context::ContextBar; use self::components::list::{List, Table}; -use self::components::workspace::{Browser, PatchActivity, PatchFiles}; +use self::components::workspace::{Browser, IssueBrowser, PatchActivity, PatchFiles}; use self::theme::Theme; pub fn global_listener() -> Widget { @@ -121,6 +121,13 @@ pub fn table(theme: &theme::Theme, items: &[impl List], profile: &Profile) -> Wi .highlight(theme.colors.item_list_highlighted_bg) } +pub fn issue_browser(theme: &theme::Theme) -> Widget { + let not_implemented = label("not implemented").foreground(theme.colors.default_fg); + let browser = IssueBrowser::new(not_implemented); + + Widget::new(browser) +} + pub fn patch_browser( theme: &theme::Theme, items: &[(PatchId, Patch)], diff --git a/radicle-tui/src/ui/components/workspace.rs b/radicle-tui/src/ui/components/workspace.rs index dc6003ae..cda2954d 100644 --- a/radicle-tui/src/ui/components/workspace.rs +++ b/radicle-tui/src/ui/components/workspace.rs @@ -44,6 +44,36 @@ impl WidgetComponent for Browser { } } +pub struct IssueBrowser { + label: Widget