mirror of
https://github.com/Retropex/custom-ocean.xyz-dashboard.git
synced 2025-05-12 19:20:45 +02:00

Updated `MiningDashboardService` to calculate and display the `pool_fees_percentage` metric, reflecting earnings lost to pool fees. Enhanced error handling for earnings processing. Updated styles in `dashboard.css` for the new metric and added corresponding HTML elements in `dashboard.html` to ensure proper display and conditional rendering.
218 lines
4.2 KiB
CSS
218 lines
4.2 KiB
CSS
/* Specific styles for the main dashboard */
|
|
|
|
#graphContainer {
|
|
background-color: #000;
|
|
padding: 0.5rem;
|
|
margin-bottom: 1rem;
|
|
height: 230px;
|
|
border: 1px solid var(--primary-color);
|
|
box-shadow: 0 0 10px rgba(247, 147, 26, 0.2);
|
|
position: relative;
|
|
}
|
|
|
|
/* Add scanline effect to graph */
|
|
#graphContainer::after {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: repeating-linear-gradient(
|
|
0deg,
|
|
rgba(0, 0, 0, 0.1),
|
|
rgba(0, 0, 0, 0.1) 1px,
|
|
transparent 1px,
|
|
transparent 2px
|
|
);
|
|
pointer-events: none;
|
|
z-index: 1;
|
|
}
|
|
|
|
/* Override for Payout & Misc card */
|
|
#payoutMiscCard {
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
/* Row equal height for card alignment */
|
|
.row.equal-height {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.row.equal-height > [class*="col-"] {
|
|
display: flex;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.row.equal-height > [class*="col-"] .card {
|
|
width: 100%;
|
|
}
|
|
|
|
/* Arrow indicator styles */
|
|
.arrow {
|
|
display: inline-block;
|
|
font-weight: bold;
|
|
margin-left: 0.5rem;
|
|
}
|
|
|
|
/* Bounce animations for indicators */
|
|
@keyframes bounceUp {
|
|
0% { transform: translateY(0); }
|
|
25% { transform: translateY(-2px); }
|
|
50% { transform: translateY(0); }
|
|
75% { transform: translateY(-2px); }
|
|
100% { transform: translateY(0); }
|
|
}
|
|
|
|
@keyframes bounceDown {
|
|
0% { transform: translateY(0); }
|
|
25% { transform: translateY(2px); }
|
|
50% { transform: translateY(0); }
|
|
75% { transform: translateY(2px); }
|
|
100% { transform: translateY(0); }
|
|
}
|
|
|
|
.bounce-up {
|
|
animation: bounceUp 1s infinite;
|
|
}
|
|
|
|
.bounce-down {
|
|
animation: bounceDown 1s infinite;
|
|
}
|
|
|
|
.chevron {
|
|
font-size: 0.8rem;
|
|
position: relative;
|
|
}
|
|
|
|
/* Refresh timer container */
|
|
#refreshUptime {
|
|
text-align: center;
|
|
margin-top: 0.5rem;
|
|
}
|
|
|
|
#refreshContainer {
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
align-items: center;
|
|
width: 100%;
|
|
}
|
|
|
|
#uptimeTimer strong {
|
|
font-weight: bold;
|
|
}
|
|
|
|
#uptimeTimer {
|
|
margin-top: 0;
|
|
}
|
|
|
|
/* Metric styling by category */
|
|
.metric-value {
|
|
color: var(--text-color);
|
|
font-weight: bold;
|
|
text-shadow: 0 0 6px #32cd32;
|
|
}
|
|
|
|
/* Yellow color family (BTC price, sats metrics, time to payout) */
|
|
#btc_price,
|
|
#daily_mined_sats,
|
|
#monthly_mined_sats,
|
|
#estimated_earnings_per_day_sats,
|
|
#estimated_earnings_next_block_sats,
|
|
#estimated_rewards_in_window_sats,
|
|
#est_time_to_payout {
|
|
color: #ffd700;
|
|
text-shadow: 0 0 6px rgba(255, 215, 0, 0.6);
|
|
}
|
|
|
|
/* Green color family (profits, earnings) */
|
|
#unpaid_earnings,
|
|
#daily_revenue,
|
|
#daily_profit_usd,
|
|
#monthly_profit_usd {
|
|
color: #32CD32;
|
|
text-shadow: 0 0 6px rgba(50, 205, 50, 0.6);
|
|
}
|
|
|
|
/* Red color family (costs) */
|
|
#daily_power_cost {
|
|
color: #ff5555 !important;
|
|
text-shadow: 0 0 6px rgba(255, 85, 85, 0.6);
|
|
}
|
|
|
|
/* White metrics (general stats) */
|
|
.metric-value.white,
|
|
#block_number,
|
|
#network_hashrate,
|
|
#difficulty,
|
|
#workers_hashing,
|
|
#last_share,
|
|
#blocks_found,
|
|
#last_block_height,
|
|
#pool_fees_percentage {
|
|
color: #ffffff;
|
|
text-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
|
|
}
|
|
|
|
/* Blue metrics (time data) */
|
|
#last_block_time {
|
|
color: #00dfff;
|
|
text-shadow: 0 0 6px rgba(0, 223, 255, 0.6);
|
|
}
|
|
|
|
.card-body strong {
|
|
color: var(--primary-color);
|
|
margin-right: 0.25rem;
|
|
text-shadow: 0 0 2px var(--primary-color);
|
|
}
|
|
|
|
.card-body p {
|
|
margin: 0.25rem 0;
|
|
line-height: 1.2;
|
|
}
|
|
|
|
/* Hidden Congrats Message */
|
|
#congratsMessage {
|
|
display: none;
|
|
position: fixed;
|
|
top: 20px;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
z-index: 1000;
|
|
background: #f7931a;
|
|
color: #000;
|
|
padding: 10px;
|
|
border-radius: 5px;
|
|
box-shadow: 0 0 15px rgba(247, 147, 26, 0.7);
|
|
text-transform: uppercase;
|
|
}
|
|
/* Add bottom padding to accommodate minimized system monitor */
|
|
.container-fluid {
|
|
padding-bottom: 60px !important; /* Enough space for minimized monitor */
|
|
}
|
|
|
|
/* Add these styles to dashboard.css */
|
|
@keyframes pulse-block-marker {
|
|
0% {
|
|
transform: translate(-50%, -50%) rotate(45deg) scale(1);
|
|
opacity: 1;
|
|
}
|
|
|
|
50% {
|
|
transform: translate(-50%, -50%) rotate(45deg) scale(1.3);
|
|
opacity: 0.8;
|
|
}
|
|
|
|
100% {
|
|
transform: translate(-50%, -50%) rotate(45deg) scale(1);
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
.chart-container-relative {
|
|
position: relative;
|
|
}
|