mirror of
https://github.com/veeso/termscp.git
synced 2026-09-25 21:41:20 -07:00
Fixed new version check
This commit is contained in:
@@ -131,7 +131,7 @@ impl Update {
|
|||||||
new_version,
|
new_version,
|
||||||
cargo_crate_version!()
|
cargo_crate_version!()
|
||||||
);
|
);
|
||||||
if new_version.as_str() > "cargo_crate_version!()" {
|
if new_version.as_str() > cargo_crate_version!() {
|
||||||
Some(r) // New version is available
|
Some(r) // New version is available
|
||||||
} else {
|
} else {
|
||||||
None // No new version
|
None // No new version
|
||||||
|
|||||||
@@ -164,7 +164,9 @@ impl AuthActivity {
|
|||||||
// Umount release notes
|
// Umount release notes
|
||||||
self.umount_release_notes();
|
self.umount_release_notes();
|
||||||
// Mount wait box
|
// Mount wait box
|
||||||
self.mount_wait("Installing update. Please wait…");
|
self.mount_wait("Installing update. Please wait…", Color::LightYellow);
|
||||||
|
// Refresh UI
|
||||||
|
self.view();
|
||||||
// Install update
|
// Install update
|
||||||
let result = Update::default().show_progress(false).upgrade();
|
let result = Update::default().show_progress(false).upgrade();
|
||||||
// Umount wait
|
// Umount wait
|
||||||
|
|||||||
@@ -579,10 +579,10 @@ impl AuthActivity {
|
|||||||
Box::new(Paragraph::new(
|
Box::new(Paragraph::new(
|
||||||
ParagraphPropsBuilder::default()
|
ParagraphPropsBuilder::default()
|
||||||
.with_borders(Borders::ALL, BorderType::Thick, color)
|
.with_borders(Borders::ALL, BorderType::Thick, color)
|
||||||
|
.with_foreground(color)
|
||||||
.bold()
|
.bold()
|
||||||
.with_text_alignment(Alignment::Center)
|
.with_text_alignment(Alignment::Center)
|
||||||
.with_texts(vec![TextSpan::from(text.as_ref().to_string())])
|
.with_texts(vec![TextSpan::from(text.as_ref().to_string())])
|
||||||
.with_foreground(color)
|
|
||||||
.build(),
|
.build(),
|
||||||
)),
|
)),
|
||||||
);
|
);
|
||||||
@@ -600,13 +600,14 @@ impl AuthActivity {
|
|||||||
/// ### mount_error
|
/// ### mount_error
|
||||||
///
|
///
|
||||||
/// Mount wait box
|
/// Mount wait box
|
||||||
pub(super) fn mount_wait(&mut self, text: &str) {
|
pub(super) fn mount_wait(&mut self, text: &str, color: Color) {
|
||||||
// Mount
|
// Mount
|
||||||
self.view.mount(
|
self.view.mount(
|
||||||
super::COMPONENT_TEXT_WAIT,
|
super::COMPONENT_TEXT_WAIT,
|
||||||
Box::new(Paragraph::new(
|
Box::new(Paragraph::new(
|
||||||
ParagraphPropsBuilder::default()
|
ParagraphPropsBuilder::default()
|
||||||
.with_borders(Borders::ALL, BorderType::Thick, Color::Reset)
|
.with_borders(Borders::ALL, BorderType::Thick, color)
|
||||||
|
.with_foreground(color)
|
||||||
.bold()
|
.bold()
|
||||||
.with_text_alignment(Alignment::Center)
|
.with_text_alignment(Alignment::Center)
|
||||||
.with_texts(vec![TextSpan::from(text)])
|
.with_texts(vec![TextSpan::from(text)])
|
||||||
|
|||||||
Reference in New Issue
Block a user