Skip to content

Commit

Permalink
Optimize imports and clean up code in geph5-client-gui, remove unused…
Browse files Browse the repository at this point in the history
… proxy settings in dashboard module
  • Loading branch information
nullchinchilla committed May 13, 2024
1 parent 799f4b9 commit 4716110
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
6 changes: 3 additions & 3 deletions binaries/geph5-client-gui/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ mod tabs;

use std::time::Duration;

use egui::{style::Spacing, FontData, FontDefinitions, FontFamily, IconData, Visuals};
use egui::{FontData, FontDefinitions, FontFamily, IconData, Visuals};
use l10n::l10n;
use logs::LogLayer;
use native_dialog::MessageType;
use once_cell::sync::Lazy;

use prefs::{pref_read, pref_write};
use settings::USERNAME;
use tabs::{dashboard::Dashboard, login::Login, logs::Logs, settings::render_settings};
use tracing_subscriber::{layer::SubscriberExt as _, util::SubscriberInitExt, EnvFilter};

use crate::{settings::PASSWORD, store_cell::StoreCell};


// 0123456789

Expand Down
4 changes: 1 addition & 3 deletions binaries/geph5-client-gui/src/tabs/dashboard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ use std::time::Duration;
use crate::{
daemon::{start_daemon, stop_daemon, DAEMON},
l10n::l10n,
pac::{set_http_proxy, unset_http_proxy},
settings::{get_config, PROXY_AUTOCONF},
};

pub struct Dashboard {}
Expand All @@ -16,7 +14,7 @@ impl Dashboard {
pub fn render(&mut self, ui: &mut egui::Ui) -> anyhow::Result<()> {
ui.columns(2, |columns| {
columns[0].label(l10n("status"));
let mut daemon = DAEMON.lock();
let daemon = DAEMON.lock();
match daemon.as_ref() {
Some(daemon) => {
columns[1].colored_label(egui::Color32::DARK_GREEN, l10n("connected"));
Expand Down
2 changes: 1 addition & 1 deletion binaries/geph5-client-gui/src/tabs/login.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::time::Duration;


use egui::{Align, Layout};
use geph5_broker_protocol::{BrokerClient, Credential};
Expand Down

0 comments on commit 4716110

Please sign in to comment.