Radish alpha
r
Radicle terminal user interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
bin: Use textview on all help pages
Erik Kundt committed 1 year ago
commit 5138f419f236a68ac44cbd5db9a6781765cd3e40
parent 24da1d01c43b07b09bd271c9e04c4638d27faa64
2 files changed +7 -8
modified bin/commands/issue/select.rs
@@ -314,7 +314,6 @@ fn help_page(_state: &State, channel: &Channel<Message>) -> Widget<State, Messag
                    TextViewProps::default()
                        .content(help_text())
                        .cursor(state.help.cursor)
-
                        .show_scroll_progress(true)
                        .to_boxed_any()
                        .into()
                }),
modified bin/commands/patch/select.rs
@@ -19,7 +19,7 @@ use termion::event::Key;
use tui::store;
use tui::ui::span;
use tui::ui::widget::container::{Column, Container, Footer, FooterProps, Header, HeaderProps};
-
use tui::ui::widget::input::{TextArea, TextAreaProps};
+
use tui::ui::widget::input::{TextView, TextViewProps};
use tui::ui::widget::window::{Page, PageProps, Shortcuts, ShortcutsProps, Window, WindowProps};
use tui::ui::widget::{ToWidget, Widget};

@@ -298,18 +298,18 @@ fn help_page(_state: &State, channel: &Channel<Message>) -> Widget<State, Messag
                .into()
        }))
        .content(
-
            TextArea::default()
+
            TextView::default()
                .to_widget(tx.clone())
                .on_event(|_, view_state, _| {
                    view_state
-
                        .and_then(|tv| tv.unwrap_textarea())
-
                        .map(|tas| Message::ScrollHelp {
-
                            scroll: tas.scroll,
-
                            cursor: tas.cursor,
+
                        .and_then(|tv| tv.unwrap_textview())
+
                        .map(|tvs| Message::ScrollHelp {
+
                            scroll: tvs.scroll,
+
                            cursor: tvs.cursor,
                        })
                })
                .on_update(|state: &State| {
-
                    TextAreaProps::default()
+
                    TextViewProps::default()
                        .content(help_text())
                        .cursor(state.help.cursor)
                        .to_boxed_any()