mirror of
https://codeberg.org/unspeaker/tek.git
synced 2026-07-17 15:56:57 +02:00
restruct: 40e
This commit is contained in:
parent
027f69cd50
commit
8b6ab2fd08
8 changed files with 331 additions and 290 deletions
11
src/app.rs
11
src/app.rs
|
|
@ -82,7 +82,16 @@ impl App {
|
|||
pub fn new_shared (
|
||||
jack: &Jack<'static>, project: Arrangement, config: Config, mode: impl AsRef<str>
|
||||
) -> Arc<RwLock<Self>> {
|
||||
Arc::new(RwLock::new(App::new(jack, ":menu", config, project)))
|
||||
Arc::new(RwLock::new(App::new(jack, project, config, ":menu")))
|
||||
}
|
||||
|
||||
pub fn new_shared_run (
|
||||
exit: &Exit, jack: &Jack<'static>, project: Arrangement, config: Config, mode: impl AsRef<str>
|
||||
) -> Usually<(Task, Task)> {
|
||||
let state = Self::new_shared(&jack, project, config, mode);
|
||||
let keyboard = tui_input(&exit, &state, Duration::from_millis(100))?;
|
||||
let terminal = tui_output(&exit, &state, Duration::from_millis(10))?;
|
||||
Ok((keyboard, terminal))
|
||||
}
|
||||
|
||||
pub fn confirm (&mut self) -> Perhaps<AppCommand> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue