mirror of
https://github.com/veeso/termscp.git
synced 2025-12-07 09:36:00 -08:00
tui-realm 0.3.2
This commit is contained in:
@@ -24,6 +24,11 @@ Released on FIXME: ??
|
|||||||
|
|
||||||
> 🏄 Summer update 2021🌴
|
> 🏄 Summer update 2021🌴
|
||||||
|
|
||||||
|
- Bugfix:
|
||||||
|
- Fixed broken input cursor when typing UTF8 characters (tui-realm 0.3.2)
|
||||||
|
- Dependencies:
|
||||||
|
- Updated `tui-realm` to `0.3.2`
|
||||||
|
|
||||||
## 0.5.0
|
## 0.5.0
|
||||||
|
|
||||||
Released on 23/05/2021
|
Released on 23/05/2021
|
||||||
|
|||||||
4
Cargo.lock
generated
4
Cargo.lock
generated
@@ -1439,9 +1439,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tuirealm"
|
name = "tuirealm"
|
||||||
version = "0.3.0"
|
version = "0.3.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "aad880656efa943543c8048a28e1fa1d0ea6b5c4bf7f53636492ef8a49ec681f"
|
checksum = "a7c0026d8e0c649dbd9416466777a584d06ac569283683c396f08f8a69832559"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"crossterm",
|
"crossterm",
|
||||||
"textwrap",
|
"textwrap",
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ tempfile = "3.1.0"
|
|||||||
textwrap = "0.13.4"
|
textwrap = "0.13.4"
|
||||||
thiserror = "^1.0.0"
|
thiserror = "^1.0.0"
|
||||||
toml = "0.5.8"
|
toml = "0.5.8"
|
||||||
tuirealm = { version = "0.3.0", features = [ "with-components" ] }
|
tuirealm = { version = "0.3.2", features = [ "with-components" ] }
|
||||||
whoami = "1.1.1"
|
whoami = "1.1.1"
|
||||||
wildmatch = "2.0.0"
|
wildmatch = "2.0.0"
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ use crate::utils::git;
|
|||||||
|
|
||||||
// Includes
|
// Includes
|
||||||
use crossterm::terminal::{disable_raw_mode, enable_raw_mode};
|
use crossterm::terminal::{disable_raw_mode, enable_raw_mode};
|
||||||
use tuirealm::View;
|
use tuirealm::{Update, View};
|
||||||
|
|
||||||
// -- components
|
// -- components
|
||||||
const COMPONENT_TEXT_H1: &str = "TEXT_H1";
|
const COMPONENT_TEXT_H1: &str = "TEXT_H1";
|
||||||
|
|||||||
@@ -36,16 +36,16 @@ use super::{
|
|||||||
};
|
};
|
||||||
use crate::ui::keymap::*;
|
use crate::ui::keymap::*;
|
||||||
use tuirealm::components::InputPropsBuilder;
|
use tuirealm::components::InputPropsBuilder;
|
||||||
use tuirealm::{Msg, Payload, PropsBuilder, Value};
|
use tuirealm::{Msg, Payload, PropsBuilder, Update, Value};
|
||||||
|
|
||||||
// -- update
|
// -- update
|
||||||
|
|
||||||
impl AuthActivity {
|
impl Update for AuthActivity {
|
||||||
/// ### update
|
/// ### update
|
||||||
///
|
///
|
||||||
/// Update auth activity model based on msg
|
/// Update auth activity model based on msg
|
||||||
/// The function exits when returns None
|
/// The function exits when returns None
|
||||||
pub(super) fn update(&mut self, msg: Option<(String, Msg)>) -> Option<(String, Msg)> {
|
fn update(&mut self, msg: Option<(String, Msg)>) -> Option<(String, Msg)> {
|
||||||
let ref_msg: Option<(&str, &Msg)> = msg.as_ref().map(|(s, msg)| (s.as_str(), msg));
|
let ref_msg: Option<(&str, &Msg)> = msg.as_ref().map(|(s, msg)| (s.as_str(), msg));
|
||||||
// Match msg
|
// Match msg
|
||||||
match ref_msg {
|
match ref_msg {
|
||||||
@@ -339,7 +339,9 @@ impl AuthActivity {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl AuthActivity {
|
||||||
fn update_input_port(&mut self, port: u16) -> Option<(String, Msg)> {
|
fn update_input_port(&mut self, port: u16) -> Option<(String, Msg)> {
|
||||||
match self.view.get_props(COMPONENT_INPUT_PORT) {
|
match self.view.get_props(COMPONENT_INPUT_PORT) {
|
||||||
None => None,
|
None => None,
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ use crate::system::sshkey_storage::SshKeyStorage;
|
|||||||
// Ext
|
// Ext
|
||||||
use std::env;
|
use std::env;
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
|
use tuirealm::Update;
|
||||||
|
|
||||||
const LOG_CAPACITY: usize = 256;
|
const LOG_CAPACITY: usize = 256;
|
||||||
|
|
||||||
|
|||||||
@@ -48,17 +48,17 @@ use tuirealm::{
|
|||||||
components::progress_bar::ProgressBarPropsBuilder,
|
components::progress_bar::ProgressBarPropsBuilder,
|
||||||
props::{PropsBuilder, TableBuilder, TextSpan, TextSpanBuilder},
|
props::{PropsBuilder, TableBuilder, TextSpan, TextSpanBuilder},
|
||||||
tui::style::Color,
|
tui::style::Color,
|
||||||
Msg, Payload, Value,
|
Msg, Payload, Update, Value,
|
||||||
};
|
};
|
||||||
|
|
||||||
impl FileTransferActivity {
|
impl Update for FileTransferActivity {
|
||||||
// -- update
|
// -- update
|
||||||
|
|
||||||
/// ### update
|
/// ### update
|
||||||
///
|
///
|
||||||
/// Update auth activity model based on msg
|
/// Update auth activity model based on msg
|
||||||
/// The function exits when returns None
|
/// The function exits when returns None
|
||||||
pub(super) fn update(&mut self, msg: Option<(String, Msg)>) -> Option<(String, Msg)> {
|
fn update(&mut self, msg: Option<(String, Msg)>) -> Option<(String, Msg)> {
|
||||||
let ref_msg: Option<(&str, &Msg)> = msg.as_ref().map(|(s, msg)| (s.as_str(), msg));
|
let ref_msg: Option<(&str, &Msg)> = msg.as_ref().map(|(s, msg)| (s.as_str(), msg));
|
||||||
// Match msg
|
// Match msg
|
||||||
match ref_msg {
|
match ref_msg {
|
||||||
@@ -652,7 +652,9 @@ impl FileTransferActivity {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl FileTransferActivity {
|
||||||
/// ### update_local_filelist
|
/// ### update_local_filelist
|
||||||
///
|
///
|
||||||
/// Update local file list
|
/// Update local file list
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ extern crate tuirealm;
|
|||||||
use super::{Activity, Context, ExitReason};
|
use super::{Activity, Context, ExitReason};
|
||||||
// Ext
|
// Ext
|
||||||
use crossterm::terminal::{disable_raw_mode, enable_raw_mode};
|
use crossterm::terminal::{disable_raw_mode, enable_raw_mode};
|
||||||
use tuirealm::View;
|
use tuirealm::{Update, View};
|
||||||
|
|
||||||
// -- components
|
// -- components
|
||||||
const COMPONENT_TEXT_HELP: &str = "TEXT_HELP";
|
const COMPONENT_TEXT_HELP: &str = "TEXT_HELP";
|
||||||
|
|||||||
@@ -37,14 +37,14 @@ use super::{
|
|||||||
use crate::ui::keymap::*;
|
use crate::ui::keymap::*;
|
||||||
|
|
||||||
// ext
|
// ext
|
||||||
use tuirealm::{Msg, Payload, Value};
|
use tuirealm::{Msg, Payload, Update, Value};
|
||||||
|
|
||||||
impl SetupActivity {
|
impl Update for SetupActivity {
|
||||||
/// ### update
|
/// ### update
|
||||||
///
|
///
|
||||||
/// Update auth activity model based on msg
|
/// Update auth activity model based on msg
|
||||||
/// The function exits when returns None
|
/// The function exits when returns None
|
||||||
pub(super) fn update(&mut self, msg: Option<(String, Msg)>) -> Option<(String, Msg)> {
|
fn update(&mut self, msg: Option<(String, Msg)>) -> Option<(String, Msg)> {
|
||||||
let ref_msg: Option<(&str, &Msg)> = msg.as_ref().map(|(s, msg)| (s.as_str(), msg));
|
let ref_msg: Option<(&str, &Msg)> = msg.as_ref().map(|(s, msg)| (s.as_str(), msg));
|
||||||
// Match msg
|
// Match msg
|
||||||
match ref_msg {
|
match ref_msg {
|
||||||
|
|||||||
Reference in New Issue
Block a user