Compare commits
No commits in common. "cee861758df56be9838427f2034d944028a2bc0e" and "66b14ed85513590f7b5ef11c4130eb082b2102a8" have entirely different histories.
cee861758d
...
66b14ed855
2 changed files with 48 additions and 37 deletions
|
@ -1,44 +1,49 @@
|
|||
use std::io;
|
||||
// use std::io;
|
||||
|
||||
use app::App;
|
||||
use crossterm::event::{self, KeyCode, KeyEventKind};
|
||||
use ratatui::{style::Stylize, widgets::Paragraph, DefaultTerminal};
|
||||
// use app::App;
|
||||
// use crossterm::event::{self, KeyCode, KeyEventKind};
|
||||
// use ratatui::{style::Stylize, widgets::Paragraph, DefaultTerminal};
|
||||
|
||||
fn main() -> io::Result<()> {
|
||||
let mut term = ratatui::init();
|
||||
term.clear()?;
|
||||
// let mut term = ratatui::init();
|
||||
// term.clear()?;
|
||||
|
||||
let r = App::default().run(&mut term);
|
||||
ratatui::restore();
|
||||
r
|
||||
// let r = App::default().run(&mut term);
|
||||
// ratatui::restore();
|
||||
// r
|
||||
let mut teststr = String::from("Hello! ää");
|
||||
}
|
||||
|
||||
mod app {
|
||||
|
||||
use std::io;
|
||||
|
||||
use ratatui::{DefaultTerminal, Frame};
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct App {
|
||||
exit: bool,
|
||||
fn rev_in_place(s: &mut String) {
|
||||
s.ch
|
||||
}
|
||||
|
||||
impl App {
|
||||
pub fn run(&mut self, terminal: &mut DefaultTerminal) -> io::Result<()> {
|
||||
while !self.exit {
|
||||
terminal.draw(|frame| self.draw(frame))?;
|
||||
self.handle_events()?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
// mod app {
|
||||
|
||||
fn draw(&self, frame: &mut Frame) {
|
||||
todo!()
|
||||
}
|
||||
// use std::io;
|
||||
|
||||
fn handle_events(&mut self) -> io::Result<()> {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
}
|
||||
// use ratatui::{DefaultTerminal, Frame};
|
||||
|
||||
// #[derive(Default)]
|
||||
// pub struct App {
|
||||
// exit: bool,
|
||||
// }
|
||||
|
||||
// impl App {
|
||||
// pub fn run(&mut self, terminal: &mut DefaultTerminal) -> io::Result<()> {
|
||||
// while !self.exit {
|
||||
// terminal.draw(|frame| self.draw(frame))?;
|
||||
// self.handle_events()?;
|
||||
// }
|
||||
// Ok(())
|
||||
// }
|
||||
|
||||
// fn draw(&self, frame: &mut Frame) {
|
||||
// todo!()
|
||||
// }
|
||||
|
||||
// fn handle_events(&mut self) -> io::Result<()> {
|
||||
// todo!()
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
|
6
crates/backend/src/stat.rs
Normal file
6
crates/backend/src/stat.rs
Normal file
|
@ -0,0 +1,6 @@
|
|||
use std::sync::Arc;
|
||||
|
||||
use axum::{extract::State, routing::get, Json, Router};
|
||||
use sqlx::{types::Uuid, Pool, Postgres};
|
||||
|
||||
use crate::{model::Chat, state::AppState};
|
Loading…
Reference in a new issue