From 550daa3681fe82d5d374b676773350279cd0cb4c Mon Sep 17 00:00:00 2001 From: Cyrix126 Date: Tue, 31 Dec 2024 22:21:28 +0100 Subject: [PATCH] feat: add headers for P2Pool and Xmrig --- src/app/panels/middle/p2pool/mod.rs | 8 ++++++++ src/app/panels/middle/xmrig.rs | 8 ++++++++ src/utils/constants.rs | 2 ++ 3 files changed, 18 insertions(+) diff --git a/src/app/panels/middle/p2pool/mod.rs b/src/app/panels/middle/p2pool/mod.rs index a92728c..b33067a 100644 --- a/src/app/panels/middle/p2pool/mod.rs +++ b/src/app/panels/middle/p2pool/mod.rs @@ -22,6 +22,7 @@ use log::*; use std::sync::{Arc, Mutex}; +use super::common::header_tab::header_tab; use super::common::list_poolnode::PoolNode; mod advanced; @@ -45,6 +46,13 @@ impl P2pool { // debug!("P2Pool Tab | Rendering [Console]"); let mut api_lock = api.lock().unwrap(); // let mut prefer_local_node = api.lock().unwrap().prefer_local_node; + header_tab( + ui, + None, + &[("P2Pool", P2POOL_URL, "")], + Some("Decentralized pool for Monero mining"), + true, + ); egui::ScrollArea::vertical().show(ui, |ui| { let text = &api_lock.output; ui.group(|ui| { diff --git a/src/app/panels/middle/xmrig.rs b/src/app/panels/middle/xmrig.rs index 062066f..dc6a043 100644 --- a/src/app/panels/middle/xmrig.rs +++ b/src/app/panels/middle/xmrig.rs @@ -16,6 +16,7 @@ // along with this program. If not, see . use crate::app::panels::middle::common::console::{console, input_args_field, start_options_field}; +use crate::app::panels::middle::common::header_tab::header_tab; use crate::app::panels::middle::common::list_poolnode::list_poolnode; use crate::app::panels::middle::common::state_edit_field::{ monero_address_field, slider_state_field, @@ -46,6 +47,13 @@ impl Xmrig { _ctx: &egui::Context, ui: &mut egui::Ui, ) { + header_tab( + ui, + None, + &[("XMRig", XMRIG_URL, "")], + Some("High performant miner for RandomX"), + true, + ); debug!("XMRig Tab | Rendering [Console]"); egui::ScrollArea::vertical().show(ui, |ui| { ui.group(|ui| { diff --git a/src/utils/constants.rs b/src/utils/constants.rs index 302be67..6e5f088 100644 --- a/src/utils/constants.rs +++ b/src/utils/constants.rs @@ -432,6 +432,7 @@ pub const P2POOL_PATH_NOT_FILE: &str = "P2Pool binary not found at the given PAT pub const P2POOL_PATH_NOT_VALID: &str = "P2Pool binary at the given PATH in the Gupaxx tab doesn't look like P2Pool! To fix: goto the [Gupaxx Advanced] tab, select [Open] and specify where P2Pool is located."; pub const P2POOL_PATH_OK: &str = "P2Pool was found at the given PATH"; pub const P2POOL_PATH_EMPTY: &str = "P2Pool PATH is empty! To fix: goto the [Gupaxx Advanced] tab, select [Open] and specify where P2Pool is located."; +pub const P2POOL_URL: &str = "https://github.com/SChernykh/p2pool"; // Node/Pool list pub const LIST_ADD: &str = "Add the current values to the list"; @@ -498,6 +499,7 @@ pub const XMRIG_NAME: &str = "Add a unique name to identify this pool; Only [A-Z pub const XMRIG_IP: &str = "Specify the pool IP to connect to with XMRig; It must be a valid IPv4 address or a valid domain name; Max length = 255 characters"; pub const XMRIG_PORT: &str = "Specify the port of the pool; [1-65535]"; pub const XMRIG_RIG: &str = "Add an optional rig ID. This will be the name shown on the pool; Only [A-Za-z0-9-_] and spaces allowed; Max length = 30 characters"; +pub const XMRIG_URL: &str = "https://github.com/xmrig/xmrig"; #[cfg(not(target_os = "linux"))] pub const XMRIG_PAUSE: &str = "THIS SETTING IS DISABLED IF SET TO [0]. Pause mining if user is active, resume after";