diff --git a/.github/workflows/matrix.yml b/.github/workflows/matrix.yml index 5438be7fbd..6e908d62fe 100644 --- a/.github/workflows/matrix.yml +++ b/.github/workflows/matrix.yml @@ -280,10 +280,10 @@ jobs: - run: rustup default ${{ matrix.rustup }} - run: | cargo install --path . --force - if: matrix.os == 'windows-latest' && matrix.rustup == 'nightly' + #if: matrix.os == 'windows-latest' && matrix.rustup == 'nightly' - run: | make cargo-install || sudo make cargo-install - if: matrix.os != 'windows-latest' && matrix.rustup == 'nightly' + #if: matrix.os != 'windows-latest' && matrix.rustup == 'nightly' - run: V=1 sudo make docs || true if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true && matrix.os == 'ubuntu-matrix' diff --git a/src/lib/chat/ui.rs b/src/lib/chat/ui.rs index 345332fcbb..7421884787 100644 --- a/src/lib/chat/ui.rs +++ b/src/lib/chat/ui.rs @@ -1,5 +1,7 @@ use crate::blockheight::blockheight_sync; use crate::chat::msg; +use crate::weeble::weeble_sync; +use crate::wobble::wobble_sync; use ratatui::{ backend::{Backend, CrosstermBackend}, crossterm::{ @@ -15,6 +17,7 @@ use ratatui::{ }; use std::{ + env, error::Error, io, sync::{Arc, Mutex}, @@ -134,6 +137,9 @@ fn run_app(terminal: &mut Terminal, app: &mut App) -> io::Result< terminal.draw(|f| ui(f, &app))?; if !event::poll(tick_rate)? { + //env::set_var("BLOCKHEIGHT", blockheight_sync()); + env::set_var("WEEBLE", weeble_sync().unwrap().to_string()); + env::set_var("WOBBLE", wobble_sync().unwrap().to_string()); continue; } @@ -181,7 +187,13 @@ fn run_app(terminal: &mut Terminal, app: &mut App) -> io::Result< //TODO refresh and query topic nostr DMs let m = msg::Msg::default() //default Msg type Chat .set_content( - " forward slash modal trigger".to_string(), + format!( + "{}/{}/{}>{}", + &env::var("WEEBLE").unwrap(), + &env::var("BLOCKHEIGHT").unwrap(), + &env::var("WOBBLE").unwrap(), + "".to_string() + ), 0 as usize, ); app.add_message(m.clone()); @@ -203,7 +215,13 @@ fn run_app(terminal: &mut Terminal, app: &mut App) -> io::Result< //TODO refresh and query topic nostr DMs let m = msg::Msg::default() //default Msg type Chat .set_content( - "<\\> back slash modal trigger".to_string(), + format!( + "{}/{}/{}>{}", + &env::var("WEEBLE").unwrap(), + &env::var("BLOCKHEIGHT").unwrap(), + &env::var("WOBBLE").unwrap(), + "<\\>".to_string() + ), 0 as usize, ); app.add_message(m.clone()); @@ -223,12 +241,17 @@ fn run_app(terminal: &mut Terminal, app: &mut App) -> io::Result< } } else { //TODO refresh and query topic nostr DMs - let m = - msg::Msg::default() //default Msg type Chat - .set_content( - "<:> vim like command prompt".to_string(), - 0 as usize, - ); + let m = msg::Msg::default() //default Msg type Chat + .set_content( + format!( + "{}/{}/{}>{}", + &env::var("WEEBLE").unwrap(), + &env::var("BLOCKHEIGHT").unwrap(), + &env::var("WOBBLE").unwrap(), + "<:>".to_string() + ), + 0 as usize, + ); app.add_message(m.clone()); if let Some(ref mut hook) = app._on_input_enter { hook(m); @@ -268,9 +291,11 @@ fn run_app(terminal: &mut Terminal, app: &mut App) -> io::Result< //TODO refresh and query topic nostr DMs let m = msg::Msg::default().set_content( format!( - "{}:{}", - &blockheight_sync(), - "test message ".to_string() + "{}/{}/{}>{}", + &env::var("WEEBLE").unwrap(), + &env::var("BLOCKHEIGHT").unwrap(), + &env::var("WOBBLE").unwrap(), + "".to_string() ), 0 as usize, ); @@ -287,9 +312,11 @@ fn run_app(terminal: &mut Terminal, app: &mut App) -> io::Result< app.input.reset(); let m = msg::Msg::default().set_content( format!( - "{}:{}", - &blockheight_sync(), - "".to_string() + "{}/{}/{}>{}", + &env::var("WEEBLE").unwrap(), + &env::var("BLOCKHEIGHT").unwrap(), + &env::var("WOBBLE").unwrap(), + "".to_string() ), 0 as usize, );