mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2026-08-07 22:17:07 +02:00
big flat
This commit is contained in:
parent
94c26f06cc
commit
fc01fd6ad3
40 changed files with 2075 additions and 1807 deletions
|
|
@ -1,10 +1,12 @@
|
|||
//! Mode 01: Direct view, actions with history
|
||||
|
||||
use ::std::sync::{Arc, RwLock};
|
||||
use ::crossterm::event::{Event::*, KeyEvent, KeyCode::*};
|
||||
use ::ratatui::style::Color;
|
||||
use ::tengri::{*, lang::*};
|
||||
use itertools::Itertools;
|
||||
use ::tengri::{
|
||||
*,
|
||||
lang::*,
|
||||
crossterm::event::{Event::*, KeyEvent, KeyCode::*},
|
||||
ratatui::style::Color,
|
||||
};
|
||||
|
||||
tui_app!(State {
|
||||
/** Command history (undo/redo). */
|
||||
|
|
@ -29,7 +31,7 @@ tui_view!(self: State {
|
|||
let title = "Demo Mode 00";
|
||||
let items = self.history.iter().take(10).map(|x|format!("{x:?}")).join("\n");
|
||||
let history = format!("History: {}\n{items}", self.history.len());
|
||||
let cursor = format!("Cursor: {}", self.cursor);
|
||||
let cursor = format!("Counter: {}", self.cursor);
|
||||
north(
|
||||
east(title.align_sw(), ShowSize.align_se()),
|
||||
east(history.align_c(), cursor.align_c()),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue