1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
// use anyhow::Result;
// use termion::event::Key;
// use ratatui::{Frame, Viewport};
// use radicle_tui as tui;
// use tui::store;
// use tui::ui::im::widget::Window;
// use tui::ui::im::Show;
// use tui::ui::im::{Borders, Context};
// use tui::{Channel, Exit};
// const ALIEN: &str = r#"
// /// /// ,---------------------------------.
// /// /// | Hey there, press (q) to quit... |
// // // '---------------------------------'
// //,,,///,,,// ..
// /////////////////// .
// //////@@@@@//////@@@@@///
// //////@@###//////@@###///
// ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
// ,,, /// /// ,,,
// ,,, /// /// ,,,
// /// ///
// ///// /////
// "#;
// #[derive(Clone, Debug)]
// struct App {
// alien: String,
// }
// #[derive(Clone, Debug)]
// enum Message {
// Quit,
// }
// impl store::Update<Message> for App {
// type Return = ();
// fn update(&mut self, message: Message) -> Option<tui::Exit<()>> {
// match message {
// Message::Quit => Some(Exit { value: None }),
// }
// }
// }
// impl Show<Message> for App {
// fn show(&self, ctx: &Context<Message>, frame: &mut Frame) -> Result<()> {
// Window::default().show(ctx, |ui| {
// ui.text_view(frame, self.alien.clone(), &mut (0, 0), Some(Borders::None));
// if ui.input_global(|key| key == Key::Char('q')) {
// ui.send_message(Message::Quit);
// }
// });
// Ok(())
// }
// }
// #[tokio::main]
// pub async fn main() -> Result<()> {
// let app = App {
// alien: ALIEN.to_string(),
// };
// tui::im(app, Viewport::default(), Channel::default()).await?;
// Ok(())
// }
use Result;
use Key;
use ;
use radicle_tui as tui;
use store;
use Window;
use Show;
use ;
use ;
pub async