working multi
This commit is contained in:
@@ -11,7 +11,7 @@ use ratatui::{
|
||||
};
|
||||
use std::io;
|
||||
use crate::proto::multieko2::{AdresarRequest, adresar_client::AdresarClient};
|
||||
use crate::client::colors::DoomColors;
|
||||
use crate::client::colors::Theme;
|
||||
use crate::client::components::{form::render_form, preview_card::render_preview_card, command_line::render_command_line};
|
||||
|
||||
pub async fn run_client() -> Result<(), Box<dyn std::error::Error>> {
|
||||
@@ -48,6 +48,7 @@ pub async fn run_client() -> Result<(), Box<dyn std::error::Error>> {
|
||||
];
|
||||
let mut command_mode = false;
|
||||
let mut command_input = String::new();
|
||||
let theme = Theme::default();
|
||||
|
||||
loop {
|
||||
terminal.draw(|f| {
|
||||
@@ -72,6 +73,7 @@ pub async fn run_client() -> Result<(), Box<dyn std::error::Error>> {
|
||||
&firma, &kz, &drc, &ulica, &psc, &mesto, &stat, &banka,
|
||||
&ucet, &skladm, &ico, &kontakt, &telefon, &skladu, &fax,
|
||||
],
|
||||
&theme,
|
||||
);
|
||||
|
||||
// Right panel - Preview Card
|
||||
@@ -81,10 +83,11 @@ pub async fn run_client() -> Result<(), Box<dyn std::error::Error>> {
|
||||
&[
|
||||
&firma, &ulica, &mesto, &psc, &ico, &kontakt, &telefon,
|
||||
],
|
||||
&theme,
|
||||
);
|
||||
|
||||
// Command line
|
||||
render_command_line(f, root[1], &command_input, command_mode);
|
||||
render_command_line(f, root[1], &command_input, command_mode, &theme);
|
||||
})?;
|
||||
|
||||
if let Event::Key(key) = event::read()? {
|
||||
|
||||
Reference in New Issue
Block a user