Skip to content

Commit

Permalink
Merge pull request #107 from GyulyVGC/v1.1.2
Browse files Browse the repository at this point in the history
v1.1.2
  • Loading branch information
GyulyVGC authored Mar 18, 2023
2 parents b0b5a87 + da5dbcc commit 4f724b9
Show file tree
Hide file tree
Showing 10 changed files with 69 additions and 26 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@
All Sniffnet releases with the relative changes are documented in this file.


## [1.1.2] - 2023-03-18

- Added new translations of the GUI, bringing the total number of supported languages to 8!
* German 🇩🇪 ([#87](https://github.com/GyulyVGC/sniffnet/pull/87))
* Simplified Chinese 🇨🇳 ([#89](https://github.com/GyulyVGC/sniffnet/pull/89) - [#93](https://github.com/GyulyVGC/sniffnet/pull/93))
* Ukrainian 🇺🇦 ([#94](https://github.com/GyulyVGC/sniffnet/pull/94))
- Added keyboard shortcuts to make the whole experience more enjoyable and efficient:
check out issue [#97](https://github.com/GyulyVGC/sniffnet/issues/97) to see all the available hotkeys or to suggest new ones!
- Changed GUI font to `sarasa-gothic-mono` to support the introduction of Simplified Chinese language
- Minor improvements to Overview page proportions and paddings


## [1.1.1] - 2023-02-25

- Added new translations of the GUI!
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sniffnet"
version = "1.1.1"
version = "1.1.2"
authors = ["Giuliano Bellini"]
edition = "2021"
description = "Application to comfortably monitor your network traffic"
Expand All @@ -21,6 +21,7 @@ icon = ["./resources/logos/icon.ico"]
[profile.release]
opt-level = 3
lto = true
strip = true


[dependencies]
Expand Down
43 changes: 38 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ Multithreaded, cross-platform, reliable
<div align="center">

Graphical interface translated in:<br>
🇬🇧 - 🇫🇷 - 🇪🇦 - 🇮🇹 - 🇵🇱 <br>
[More languages will be supported in the upcoming releases](https://github.com/GyulyVGC/sniffnet/issues/60)
🇬🇧 - 🇩🇪 - 🇪🇦 - 🇫🇷 - 🇮🇹 - 🇵🇱 - 🇺🇦 - 🇨🇳 <br>
[Would you like to add support for your native language?](https://github.com/GyulyVGC/sniffnet/issues/60)

</div>

Expand Down Expand Up @@ -56,9 +56,9 @@ cargo install sniffnet
You can install Sniffnet through the installers available in the [latest release](https://github.com/GyulyVGC/sniffnet/releases). <br>
Choose from a Windows installer, a macOS disk image, or a DEB package (depending on your operating system). <br>
Here for your convenience you can find the direct link to the downloads:
- [Windows](https://github.com/GyulyVGC/sniffnet/releases/download/v1.1.1/Sniffnet_Windows.msi) (7.8 MB)
- [macOS](https://github.com/GyulyVGC/sniffnet/releases/download/v1.1.1/Sniffnet_MacOS.dmg) (6.9 MB)
- [Linux .deb](https://github.com/GyulyVGC/sniffnet/releases/download/v1.1.1/Sniffnet_Linux.deb) (5.6 MB)
- [Windows](https://github.com/GyulyVGC/sniffnet/releases/download/v1.1.2/Sniffnet_Windows.msi) (7.5 MB)
- [macOS](https://github.com/GyulyVGC/sniffnet/releases/download/v1.1.2/Sniffnet_MacOS.dmg) (6.2 MB)
- [Linux .deb](https://github.com/GyulyVGC/sniffnet/releases/download/v1.1.2/Sniffnet_Linux.deb) (4.8 MB)


</details>
Expand Down Expand Up @@ -219,6 +219,39 @@ sudo apt-get install libfontconfig libfontconfig1-dev
</details>


## Keyboard shortcuts

<details>

<summary>See details</summary>

<br>

Some keyboard shortcuts are available to improve the efficiency of use and the overall user experience.

If you want to suggest a different key combination for one of the existing shortcuts or if you want to propose a new shortcut,
give a look at [this](https://github.com/GyulyVGC/sniffnet/issues/97) issue.

The currently usable hotkeys are reported in the following:

<div align="center">

| Event | Shortcut keys |
|--|--|
| Quit the application | ctrl+Q (cmd+Q on macOS) |
| Open full report | ctrl+O (cmd+O on macOS) |
| Open settings | ctrl+S (cmd+S on macOS) |
| Clear all notifications | ctrl+D (cmd+D on macOS) |
| Start the analysis and confirm modal actions | enter |
| Interrupt the ongoing analysis | backspace |
| Close settings and modal popups | esc |
| Switch from a tab to the next (or previous) one | tab (or shift+tab) |

</div>

</details>


## Troubleshooting

<details>
Expand Down
3 changes: 1 addition & 2 deletions src/gui/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,6 @@ impl Application for Sniffer {
}

fn subscription(&self) -> Subscription<Message> {
let status = *self.status_pair.0.lock().unwrap();
const NO_MODIFIER: iced_native::keyboard::Modifiers =
iced_native::keyboard::Modifiers::empty();
let hot_keys_subscription =
Expand Down Expand Up @@ -484,7 +483,7 @@ impl Application for Sniffer {
}) => Some(Message::CtrlDPressed),
_ => None,
});
let time_subscription = match status {
let time_subscription = match *self.status_pair.0.lock().unwrap() {
Status::Running => {
iced::time::every(Duration::from_millis(PERIOD_RUNNING)).map(|_| Message::TickRun)
}
Expand Down
4 changes: 2 additions & 2 deletions src/gui/components/modal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ fn get_modal_header(
title: String,
) -> Container<'static, Message> {
let font = get_font(style);
let mut tooltip = hide_translation(language).to_string();
tooltip.push_str(" [esc]");
let tooltip = hide_translation(language).to_string();
//tooltip.push_str(" [esc]");
Container::new(
Row::new()
.push(horizontal_space(Length::FillPortion(1)))
Expand Down
4 changes: 2 additions & 2 deletions src/gui/pages/initial_page.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ pub fn button_start(style: StyleType, language: Language) -> Tooltip<'static, Me
.style(StyleTuple(style, ElementType::Standard).into())
.on_press(Message::Start);

let mut tooltip = start_translation(language).to_string();
tooltip.push_str(" [⏎]");
let tooltip = start_translation(language).to_string();
//tooltip.push_str(" [⏎]");
Tooltip::new(content, tooltip, Position::Top)
.gap(5)
.font(get_font(style))
Expand Down
8 changes: 3 additions & 5 deletions src/gui/pages/overview_page.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ use crate::structs::style_tuple::StyleTuple;
use crate::utility::countries::{get_flag_from_country_code, FLAGS_WIDTH};
use crate::utility::get_formatted_strings::{
get_active_filters_string, get_active_filters_string_nobr, get_app_count_string,
get_command_key, get_connection_color, get_formatted_bytes_string, get_percentage_string,
get_report_path,
get_connection_color, get_formatted_bytes_string, get_percentage_string, get_report_path,
};
use crate::utility::style_constants::{get_font, HEIGHT_BODY, ICONS, SARASA_MONO_SC_BOLD};
use crate::utility::translations::{
Expand Down Expand Up @@ -297,9 +296,8 @@ pub fn overview_page(sniffer: &Sniffer) -> Container<Message> {
)),
);

let mut open_report_translation =
open_report_translation(sniffer.language).to_string();
open_report_translation.push_str(&format!(" [{}+O]", get_command_key()));
let open_report_translation = open_report_translation(sniffer.language).to_string();
//open_report_translation.push_str(&format!(" [{}+O]", get_command_key()));
let report_path = get_report_path().to_string_lossy().to_string();
let open_report_tooltip = format!(
"{:^len$}\n{report_path}",
Expand Down
4 changes: 2 additions & 2 deletions src/gui/pages/settings_notifications_page.rs
Original file line number Diff line number Diff line change
Expand Up @@ -438,8 +438,8 @@ fn volume_slider(language: Language, style: StyleType, volume: u8) -> Container<

pub fn settings_header(style: StyleType, language: Language) -> Container<'static, Message> {
let font = get_font(style);
let mut tooltip = hide_translation(language).to_string();
tooltip.push_str(" [esc]");
let tooltip = hide_translation(language).to_string();
//tooltip.push_str(" [esc]");
Container::new(
Row::new()
.push(horizontal_space(Length::FillPortion(1)))
Expand Down
12 changes: 6 additions & 6 deletions src/utility/get_formatted_strings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,9 @@ pub fn print_cli_welcome_message() {
);
}

pub fn get_command_key() -> String {
#[cfg(target_os = "macos")]
return "⌘".to_string();
#[cfg(not(target_os = "macos"))]
return "ctrl".to_string();
}
// pub fn get_command_key() -> String {
// #[cfg(target_os = "macos")]
// return "⌘".to_string();
// #[cfg(not(target_os = "macos"))]
// return "ctrl".to_string();
// }

0 comments on commit 4f724b9

Please sign in to comment.