fix: modification on visual for status colomn xvb

This commit is contained in:
Louis-Marie Baer 2024-03-04 15:52:04 +01:00
parent 6a40683de7
commit 9e0ef7a6c3
3 changed files with 13 additions and 21 deletions

View file

@ -365,7 +365,7 @@ fn xvb(ui: &mut Ui, min_height: f32, width: f32, height: f32, xvb_api: &Arc<Mute
ui.add_sized( ui.add_sized(
[width, height], [width, height],
Label::new( Label::new(
RichText::new("[XvB]") RichText::new("[XvB Raffle]")
.color(LIGHT_GRAY) .color(LIGHT_GRAY)
.text_style(TextStyle::Name("MonospaceLarge".into())), .text_style(TextStyle::Name("MonospaceLarge".into())),
), ),
@ -383,7 +383,7 @@ fn xvb(ui: &mut Ui, min_height: f32, width: f32, height: f32, xvb_api: &Arc<Mute
ui.add_sized( ui.add_sized(
[width, height], [width, height],
Label::new( Label::new(
RichText::new("Raffle Round Time Remaining") RichText::new("Round Time Remaining")
.underline() .underline()
.color(BONE), .color(BONE),
), ),
@ -402,7 +402,7 @@ fn xvb(ui: &mut Ui, min_height: f32, width: f32, height: f32, xvb_api: &Arc<Mute
ui.add_sized( ui.add_sized(
[width, height], [width, height],
Label::new(format!( Label::new(format!(
"Bonus HR\n{}kH/s\n+\n{}kH/s\ndonated by\n{} donors\n with\n{} miners", "{}kH/s\n+\n{}kH/s\ndonated by\n{} donors\n with\n{} miners",
api.bonus_hr, api.donate_hr, api.donate_miners, api.donate_workers api.bonus_hr, api.donate_hr, api.donate_miners, api.donate_workers
)), )),
); );
@ -440,24 +440,14 @@ fn xvb(ui: &mut Ui, min_height: f32, width: f32, height: f32, xvb_api: &Arc<Mute
) )
.on_hover_text(STATUS_XVB_BLOCK_REWARD); .on_hover_text(STATUS_XVB_BLOCK_REWARD);
ui.add_sized([width, height], Label::new(format!("{}", api.block_reward))); ui.add_sized([width, height], Label::new(format!("{}", api.block_reward)));
//block height
ui.add_sized(
[width, height],
Label::new(RichText::new("Block Height").underline().color(BONE)),
)
.on_hover_text(STATUS_XVB_BLOCK_HEIGHT);
ui.add_sized([width, height], Label::new(format!("{}", api.block_height)));
// block hash
ui.add_sized(
[width, height],
Label::new(RichText::new("Block Hash").underline().color(BONE)),
)
.on_hover_text(STATUS_XVB_BLOCK_HASH);
ui.add_sized([width, height], Label::new(format!("{}", api.block_hash)));
// reward yearly // reward yearly
ui.add_sized( ui.add_sized(
[width, height], [width, height],
Label::new(RichText::new("Reward Yearly").underline().color(BONE)), Label::new(
RichText::new("Est. Reward (Yearly)")
.underline()
.color(BONE),
),
) )
.on_hover_text(STATUS_XVB_YEARLY); .on_hover_text(STATUS_XVB_YEARLY);
if api.reward_yearly.is_empty() { if api.reward_yearly.is_empty() {

View file

@ -94,14 +94,18 @@ pub struct PubXvbApi {
#[derive(Debug, Clone, Default, Display, Deserialize)] #[derive(Debug, Clone, Default, Display, Deserialize)]
pub enum XvbRound { pub enum XvbRound {
#[default] #[default]
#[display(fmt = "VIP")]
#[serde(alias = "vip")] #[serde(alias = "vip")]
Vip, Vip,
#[serde(alias = "donor")] #[serde(alias = "donor")]
Donor, Donor,
#[display(fmt = "VIP Donor")]
#[serde(alias = "donor_vip")] #[serde(alias = "donor_vip")]
DonorVip, DonorVip,
#[display(fmt = "Whale Donor")]
#[serde(alias = "donor_whale")] #[serde(alias = "donor_whale")]
DonorWhale, DonorWhale,
#[display(fmt = "Mega Donor")]
#[serde(alias = "donor_mega")] #[serde(alias = "donor_mega")]
DonorMega, DonorMega,
} }

View file

@ -190,9 +190,7 @@ pub const STATUS_XVB_DONATED_HR: &str = "Hashrate donated to the raffle";
pub const STATUS_XVB_WINNER: &str = "Current Raffle Winner"; pub const STATUS_XVB_WINNER: &str = "Current Raffle Winner";
pub const STATUS_XVB_SHARE: &str = "Share effort"; pub const STATUS_XVB_SHARE: &str = "Share effort";
pub const STATUS_XVB_BLOCK_REWARD: &str = "Block reward"; pub const STATUS_XVB_BLOCK_REWARD: &str = "Block reward";
pub const STATUS_XVB_BLOCK_HEIGHT: &str = "height of the current block"; pub const STATUS_XVB_YEARLY: &str = "Estimated Reward (Yearly)";
pub const STATUS_XVB_BLOCK_HASH: &str = "hash of the block that is being worked on";
pub const STATUS_XVB_YEARLY: &str = "Average yearly reward per round type";
// Status Submenus // Status Submenus
pub const STATUS_SUBMENU_PROCESSES: &str = pub const STATUS_SUBMENU_PROCESSES: &str =
"View the status of process related data for [Gupax|P2Pool|XMRig]"; "View the status of process related data for [Gupax|P2Pool|XMRig]";