Skip to content

Commit 4f724b9

Browse files
authored
Merge pull request #107 from GyulyVGC/v1.1.2
v1.1.2
2 parents b0b5a87 + da5dbcc commit 4f724b9

File tree

10 files changed

+69
-26
lines changed

10 files changed

+69
-26
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22
All Sniffnet releases with the relative changes are documented in this file.
33

44

5+
## [1.1.2] - 2023-03-18
6+
7+
- Added new translations of the GUI, bringing the total number of supported languages to 8!
8+
* German 🇩🇪 ([#87](https://github.com/GyulyVGC/sniffnet/pull/87))
9+
* Simplified Chinese 🇨🇳 ([#89](https://github.com/GyulyVGC/sniffnet/pull/89) - [#93](https://github.com/GyulyVGC/sniffnet/pull/93))
10+
* Ukrainian 🇺🇦 ([#94](https://github.com/GyulyVGC/sniffnet/pull/94))
11+
- Added keyboard shortcuts to make the whole experience more enjoyable and efficient:
12+
check out issue [#97](https://github.com/GyulyVGC/sniffnet/issues/97) to see all the available hotkeys or to suggest new ones!
13+
- Changed GUI font to `sarasa-gothic-mono` to support the introduction of Simplified Chinese language
14+
- Minor improvements to Overview page proportions and paddings
15+
16+
517
## [1.1.1] - 2023-02-25
618

719
- Added new translations of the GUI!

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "sniffnet"
3-
version = "1.1.1"
3+
version = "1.1.2"
44
authors = ["Giuliano Bellini"]
55
edition = "2021"
66
description = "Application to comfortably monitor your network traffic"
@@ -21,6 +21,7 @@ icon = ["./resources/logos/icon.ico"]
2121
[profile.release]
2222
opt-level = 3
2323
lto = true
24+
strip = true
2425

2526

2627
[dependencies]

README.md

Lines changed: 38 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ Multithreaded, cross-platform, reliable
1414
<div align="center">
1515

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

2020
</div>
2121

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

6363

6464
</details>
@@ -219,6 +219,39 @@ sudo apt-get install libfontconfig libfontconfig1-dev
219219
</details>
220220

221221

222+
## Keyboard shortcuts
223+
224+
<details>
225+
226+
<summary>See details</summary>
227+
228+
<br>
229+
230+
Some keyboard shortcuts are available to improve the efficiency of use and the overall user experience.
231+
232+
If you want to suggest a different key combination for one of the existing shortcuts or if you want to propose a new shortcut,
233+
give a look at [this](https://github.com/GyulyVGC/sniffnet/issues/97) issue.
234+
235+
The currently usable hotkeys are reported in the following:
236+
237+
<div align="center">
238+
239+
| Event | Shortcut keys |
240+
|--|--|
241+
| Quit the application | ctrl+Q (cmd+Q on macOS) |
242+
| Open full report | ctrl+O (cmd+O on macOS) |
243+
| Open settings | ctrl+S (cmd+S on macOS) |
244+
| Clear all notifications | ctrl+D (cmd+D on macOS) |
245+
| Start the analysis and confirm modal actions | enter |
246+
| Interrupt the ongoing analysis | backspace |
247+
| Close settings and modal popups | esc |
248+
| Switch from a tab to the next (or previous) one | tab (or shift+tab) |
249+
250+
</div>
251+
252+
</details>
253+
254+
222255
## Troubleshooting
223256

224257
<details>

src/gui/app.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,6 @@ impl Application for Sniffer {
432432
}
433433

434434
fn subscription(&self) -> Subscription<Message> {
435-
let status = *self.status_pair.0.lock().unwrap();
436435
const NO_MODIFIER: iced_native::keyboard::Modifiers =
437436
iced_native::keyboard::Modifiers::empty();
438437
let hot_keys_subscription =
@@ -484,7 +483,7 @@ impl Application for Sniffer {
484483
}) => Some(Message::CtrlDPressed),
485484
_ => None,
486485
});
487-
let time_subscription = match status {
486+
let time_subscription = match *self.status_pair.0.lock().unwrap() {
488487
Status::Running => {
489488
iced::time::every(Duration::from_millis(PERIOD_RUNNING)).map(|_| Message::TickRun)
490489
}

src/gui/components/modal.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ fn get_modal_header(
8686
title: String,
8787
) -> Container<'static, Message> {
8888
let font = get_font(style);
89-
let mut tooltip = hide_translation(language).to_string();
90-
tooltip.push_str(" [esc]");
89+
let tooltip = hide_translation(language).to_string();
90+
//tooltip.push_str(" [esc]");
9191
Container::new(
9292
Row::new()
9393
.push(horizontal_space(Length::FillPortion(1)))

src/gui/pages/initial_page.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ pub fn button_start(style: StyleType, language: Language) -> Tooltip<'static, Me
123123
.style(StyleTuple(style, ElementType::Standard).into())
124124
.on_press(Message::Start);
125125

126-
let mut tooltip = start_translation(language).to_string();
127-
tooltip.push_str(" [⏎]");
126+
let tooltip = start_translation(language).to_string();
127+
//tooltip.push_str(" [⏎]");
128128
Tooltip::new(content, tooltip, Position::Top)
129129
.gap(5)
130130
.font(get_font(style))

src/gui/pages/overview_page.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ use crate::structs::style_tuple::StyleTuple;
2121
use crate::utility::countries::{get_flag_from_country_code, FLAGS_WIDTH};
2222
use crate::utility::get_formatted_strings::{
2323
get_active_filters_string, get_active_filters_string_nobr, get_app_count_string,
24-
get_command_key, get_connection_color, get_formatted_bytes_string, get_percentage_string,
25-
get_report_path,
24+
get_connection_color, get_formatted_bytes_string, get_percentage_string, get_report_path,
2625
};
2726
use crate::utility::style_constants::{get_font, HEIGHT_BODY, ICONS, SARASA_MONO_SC_BOLD};
2827
use crate::utility::translations::{
@@ -297,9 +296,8 @@ pub fn overview_page(sniffer: &Sniffer) -> Container<Message> {
297296
)),
298297
);
299298

300-
let mut open_report_translation =
301-
open_report_translation(sniffer.language).to_string();
302-
open_report_translation.push_str(&format!(" [{}+O]", get_command_key()));
299+
let open_report_translation = open_report_translation(sniffer.language).to_string();
300+
//open_report_translation.push_str(&format!(" [{}+O]", get_command_key()));
303301
let report_path = get_report_path().to_string_lossy().to_string();
304302
let open_report_tooltip = format!(
305303
"{:^len$}\n{report_path}",

src/gui/pages/settings_notifications_page.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,8 +438,8 @@ fn volume_slider(language: Language, style: StyleType, volume: u8) -> Container<
438438

439439
pub fn settings_header(style: StyleType, language: Language) -> Container<'static, Message> {
440440
let font = get_font(style);
441-
let mut tooltip = hide_translation(language).to_string();
442-
tooltip.push_str(" [esc]");
441+
let tooltip = hide_translation(language).to_string();
442+
//tooltip.push_str(" [esc]");
443443
Container::new(
444444
Row::new()
445445
.push(horizontal_space(Length::FillPortion(1)))

src/utility/get_formatted_strings.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,9 @@ pub fn print_cli_welcome_message() {
221221
);
222222
}
223223

224-
pub fn get_command_key() -> String {
225-
#[cfg(target_os = "macos")]
226-
return "⌘".to_string();
227-
#[cfg(not(target_os = "macos"))]
228-
return "ctrl".to_string();
229-
}
224+
// pub fn get_command_key() -> String {
225+
// #[cfg(target_os = "macos")]
226+
// return "⌘".to_string();
227+
// #[cfg(not(target_os = "macos"))]
228+
// return "ctrl".to_string();
229+
// }

0 commit comments

Comments
 (0)