mirror of
https://github.com/veeso/termscp.git
synced 2025-12-07 09:36:00 -08:00
fix: tuirealm 2.x (#299)
This commit is contained in:
committed by
GitHub
parent
4e63093d25
commit
7eb913ec7b
@@ -7,7 +7,7 @@ use std::time::{Duration, SystemTime};
|
||||
|
||||
use chrono::prelude::*;
|
||||
use remotefs::fs::UnixPexClass;
|
||||
use tuirealm::tui::style::Color;
|
||||
use tuirealm::ratatui::style::Color;
|
||||
use unicode_width::UnicodeWidthStr;
|
||||
|
||||
/// Convert permissions bytes of permissions value into ls notation (e.g. rwx,-wx,--x)
|
||||
|
||||
@@ -9,7 +9,7 @@ use std::str::FromStr;
|
||||
// Ext
|
||||
use bytesize::ByteSize;
|
||||
use lazy_regex::{Lazy, Regex};
|
||||
use tuirealm::tui::style::Color;
|
||||
use tuirealm::ratatui::style::Color;
|
||||
use tuirealm::utils::parser as tuirealm_parser;
|
||||
|
||||
#[cfg(smb)]
|
||||
|
||||
@@ -2,13 +2,16 @@
|
||||
//!
|
||||
//! `Utils` implements utilities functions to work with layouts
|
||||
|
||||
use tuirealm::terminal::TerminalBridge;
|
||||
use tuirealm::terminal::{TerminalAdapter, TerminalBridge};
|
||||
|
||||
/// Read a secret from tty with customisable prompt
|
||||
pub fn read_secret_from_tty(
|
||||
terminal_bridge: &mut TerminalBridge,
|
||||
pub fn read_secret_from_tty<T>(
|
||||
terminal_bridge: &mut TerminalBridge<T>,
|
||||
prompt: impl ToString,
|
||||
) -> std::io::Result<Option<String>> {
|
||||
) -> std::io::Result<Option<String>>
|
||||
where
|
||||
T: TerminalAdapter,
|
||||
{
|
||||
let _ = terminal_bridge.disable_raw_mode();
|
||||
let _ = terminal_bridge.leave_alternate_screen();
|
||||
let res = match rpassword::prompt_password(prompt) {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//!
|
||||
//! `Utils` implements utilities functions to work with layouts
|
||||
|
||||
use tuirealm::tui::layout::{Constraint, Direction, Layout, Rect};
|
||||
use tuirealm::ratatui::layout::{Constraint, Direction, Layout, Rect};
|
||||
|
||||
/// Size type for UI renders
|
||||
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
|
||||
|
||||
Reference in New Issue
Block a user