feat: XvB Tab, add link to rules

This commit is contained in:
Louis-Marie Baer 2024-03-15 00:34:58 +01:00
parent 066fd5bda5
commit c7f0785d95
2 changed files with 9 additions and 1 deletions

View file

@ -7,7 +7,7 @@ use log::debug;
use crate::helper::xvb::PubXvbApi;
use crate::utils::constants::{
GREEN, LIGHT_GRAY, ORANGE, RED, XVB_DONATED_1H_FIELD, XVB_DONATED_24H_FIELD, XVB_FAILURE_FIELD,
XVB_HELP, XVB_HERO_SELECT, XVB_TOKEN_FIELD, XVB_TOKEN_LEN,
XVB_HELP, XVB_HERO_SELECT, XVB_TOKEN_FIELD, XVB_TOKEN_LEN, XVB_URL_RULES,
};
use crate::utils::macros::lock;
use crate::utils::regex::Regexes;
@ -163,5 +163,11 @@ impl crate::disk::state::Xvb {
.response
});
});
// Rules link help
ui.add_space(ui.available_height() / 4.0);
ui.vertical_centered(|ui| {
ui.hyperlink_to("Rules", XVB_URL_RULES)
.on_hover_text("Click here to read the rules and understand how the raffle works.");
});
}
}

View file

@ -411,6 +411,8 @@ pub const XMRIG_PATH_EMPTY: &str = "XMRig PATH is empty! To fix: goto the [G
pub const XVB_HELP: &str = "You need to register an account by clicking on the link above to get your token with the same p2pool XMR address you use for payment.";
pub const XVB_URL: &str = "https://xmrvsbeast.com";
pub const XVB_URL_PUBLIC_API: &str = "https://xmrvsbeast.com/p2pool/stats";
pub const XVB_URL_RULES: &str = "https://xmrvsbeast.com/p2pool/rules.html";
pub const XVB_TOKEN_LEN: usize = 9;
pub const XVB_HERO_SELECT: &str =
"Donate all spared hashrate to the raffle, even if there is more than enough to be in the most highest round type possible";