mirror of
https://github.com/Cyrix126/gupaxx.git
synced 2025-01-08 23:19:26 +00:00
fix: add help texts for donation levels & xvb modes
This commit is contained in:
parent
b260f364e1
commit
b8501578d3
2 changed files with 30 additions and 8 deletions
|
@ -14,7 +14,9 @@ use crate::regex::num_lines;
|
||||||
use crate::utils::constants::{
|
use crate::utils::constants::{
|
||||||
GREEN, LIGHT_GRAY, ORANGE, RED, XVB_DONATED_1H_FIELD, XVB_DONATED_24H_FIELD, XVB_FAILURE_FIELD,
|
GREEN, LIGHT_GRAY, ORANGE, RED, XVB_DONATED_1H_FIELD, XVB_DONATED_24H_FIELD, XVB_FAILURE_FIELD,
|
||||||
XVB_HELP, XVB_ROUND_TYPE_FIELD, XVB_TOKEN_FIELD, XVB_TOKEN_LEN, XVB_URL_RULES,
|
XVB_HELP, XVB_ROUND_TYPE_FIELD, XVB_TOKEN_FIELD, XVB_TOKEN_LEN, XVB_URL_RULES,
|
||||||
XVB_WINNER_FIELD, XVB_HERO_SELECT
|
XVB_WINNER_FIELD, XVB_HERO_SELECT, XVB_MODE_MANUALLY_DONATE, XVB_MODE_MANUALLY_KEEP, XVB_MODE_MANUAL_DONATION_LEVEL,
|
||||||
|
XVB_DONATION_LEVEL_DONOR_HELP, XVB_DONATION_LEVEL_VIP_DONOR_HELP, XVB_DONATION_LEVEL_WHALE_DONOR_HELP,
|
||||||
|
XVB_DONATION_LEVEL_MEGA_DONOR_HELP
|
||||||
};
|
};
|
||||||
use crate::utils::macros::lock;
|
use crate::utils::macros::lock;
|
||||||
use crate::utils::regex::Regexes;
|
use crate::utils::regex::Regexes;
|
||||||
|
@ -153,9 +155,12 @@ impl crate::disk::state::Xvb {
|
||||||
.show_ui(ui, |ui| {
|
.show_ui(ui, |ui| {
|
||||||
ui.selectable_value(&mut self.mode, XvbMode::Auto, "Automatic");
|
ui.selectable_value(&mut self.mode, XvbMode::Auto, "Automatic");
|
||||||
ui.selectable_value(&mut self.mode, XvbMode::Hero, "Hero Mode");
|
ui.selectable_value(&mut self.mode, XvbMode::Hero, "Hero Mode");
|
||||||
ui.selectable_value(&mut self.mode, XvbMode::ManuallyDonate, "Manually Donate");
|
ui.selectable_value(&mut self.mode, XvbMode::ManuallyDonate, "Manually Donate")
|
||||||
ui.selectable_value(&mut self.mode, XvbMode::ManuallyKeep, "Manually Keep");
|
.on_hover_text(XVB_MODE_MANUALLY_DONATE);
|
||||||
ui.selectable_value(&mut self.mode, XvbMode::ManualDonationLevel, "Manual Donation Level");
|
ui.selectable_value(&mut self.mode, XvbMode::ManuallyKeep, "Manually Keep")
|
||||||
|
.on_hover_text(XVB_MODE_MANUALLY_KEEP);
|
||||||
|
ui.selectable_value(&mut self.mode, XvbMode::ManualDonationLevel, "Manual Donation Level")
|
||||||
|
.on_hover_text(XVB_MODE_MANUAL_DONATION_LEVEL);
|
||||||
});
|
});
|
||||||
if self.mode == XvbMode::ManuallyDonate || self.mode == XvbMode::ManuallyKeep {
|
if self.mode == XvbMode::ManuallyDonate || self.mode == XvbMode::ManuallyKeep {
|
||||||
|
|
||||||
|
@ -182,10 +187,14 @@ impl crate::disk::state::Xvb {
|
||||||
}
|
}
|
||||||
|
|
||||||
if self.mode == XvbMode::ManualDonationLevel {
|
if self.mode == XvbMode::ManualDonationLevel {
|
||||||
ui.radio_value(&mut self.manual_donation_level, ManualDonationLevel::Donor, "Donor");
|
ui.radio_value(&mut self.manual_donation_level, ManualDonationLevel::Donor, "Donor")
|
||||||
ui.radio_value(&mut self.manual_donation_level, ManualDonationLevel::DonorVIP, "DonorVIP");
|
.on_hover_text(XVB_DONATION_LEVEL_DONOR_HELP);
|
||||||
ui.radio_value(&mut self.manual_donation_level, ManualDonationLevel::DonorWhale, "DonorWhale");
|
ui.radio_value(&mut self.manual_donation_level, ManualDonationLevel::DonorVIP, "DonorVIP")
|
||||||
ui.radio_value(&mut self.manual_donation_level, ManualDonationLevel::DonorMega, "DonorMega");
|
.on_hover_text(XVB_DONATION_LEVEL_VIP_DONOR_HELP);
|
||||||
|
ui.radio_value(&mut self.manual_donation_level, ManualDonationLevel::DonorWhale, "DonorWhale")
|
||||||
|
.on_hover_text(XVB_DONATION_LEVEL_WHALE_DONOR_HELP);
|
||||||
|
ui.radio_value(&mut self.manual_donation_level, ManualDonationLevel::DonorMega, "DonorMega")
|
||||||
|
.on_hover_text(XVB_DONATION_LEVEL_MEGA_DONOR_HELP);
|
||||||
|
|
||||||
lock!(api).stats_priv.runtime_manual_donation_level = self.manual_donation_level.clone().into();
|
lock!(api).stats_priv.runtime_manual_donation_level = self.manual_donation_level.clone().into();
|
||||||
}
|
}
|
||||||
|
|
|
@ -441,6 +441,19 @@ pub const XVB_ROUND_DONOR_VIP_MIN_HR: u32 = 10000;
|
||||||
pub const XVB_ROUND_DONOR_WHALE_MIN_HR: u32 = 100000;
|
pub const XVB_ROUND_DONOR_WHALE_MIN_HR: u32 = 100000;
|
||||||
pub const XVB_ROUND_DONOR_MEGA_MIN_HR: u32 = 1000000;
|
pub const XVB_ROUND_DONOR_MEGA_MIN_HR: u32 = 1000000;
|
||||||
|
|
||||||
|
// Manual Mode
|
||||||
|
pub const XVB_MODE_MANUALLY_DONATE: &str = "Set the amount donated to XvB manually";
|
||||||
|
pub const XVB_MODE_MANUALLY_KEEP: &str = "Set the p2pool hashrate manually";
|
||||||
|
pub const XVB_MODE_MANUAL_DONATION_LEVEL: &str = "Set the XvB donation level manually";
|
||||||
|
|
||||||
|
|
||||||
|
// Manual Donation Levels
|
||||||
|
pub const XVB_DONATION_LEVEL_DONOR_HELP: &str = "To qualify you must be actively donating at least 1 kH/s (1hr and 24hr avg.)";
|
||||||
|
pub const XVB_DONATION_LEVEL_VIP_DONOR_HELP: &str = "To qualify you must be actively donating at least 10 kH/s (1hr and 24hr avg.)";
|
||||||
|
pub const XVB_DONATION_LEVEL_WHALE_DONOR_HELP: &str = "To qualify you must be actively donating at least 100 kH/s (1hr and 24hr avg.)";
|
||||||
|
pub const XVB_DONATION_LEVEL_MEGA_DONOR_HELP: &str = "To qualify you must be actively donating at least 1000 kH/s (1hr and 24hr avg.)";
|
||||||
|
|
||||||
|
|
||||||
// CLI argument messages
|
// CLI argument messages
|
||||||
pub const ARG_HELP: &str = r#"USAGE: ./gupaxx [--flag]
|
pub const ARG_HELP: &str = r#"USAGE: ./gupaxx [--flag]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue