mirror of
https://github.com/Retropex/custom-ocean.xyz-dashboard.git
synced 2025-05-12 19:20:45 +02:00
Revert "Update UI and functionality for wallet and fees"
This reverts commit 9ef1260347
.
This commit is contained in:
parent
9ef1260347
commit
b4465e5a5c
@ -1,10 +1,14 @@
|
|||||||
.footer {
|
.footer {
|
||||||
|
margin-top: 30px;
|
||||||
padding: 10px 0;
|
padding: 10px 0;
|
||||||
color: grey;
|
color: grey;
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
border-top: 1px solid rgba(128, 128, 128, 0.2);
|
border-top: 1px solid rgba(128, 128, 128, 0.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
</style >
|
||||||
|
<!-- Preload theme to prevent flicker -->
|
||||||
|
<style id="theme-preload" >
|
||||||
/* Theme-aware loading state */
|
/* Theme-aware loading state */
|
||||||
html.bitcoin-theme {
|
html.bitcoin-theme {
|
||||||
background-color: #111111;
|
background-color: #111111;
|
||||||
|
@ -184,7 +184,7 @@
|
|||||||
}
|
}
|
||||||
/* Add bottom padding to accommodate minimized system monitor */
|
/* Add bottom padding to accommodate minimized system monitor */
|
||||||
.container-fluid {
|
.container-fluid {
|
||||||
padding-bottom: 100px !important; /* Enough space for minimized monitor */
|
padding-bottom: 60px !important; /* Enough space for minimized monitor */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Add these styles to dashboard.css */
|
/* Add these styles to dashboard.css */
|
||||||
|
@ -2309,7 +2309,7 @@ $(document).ready(function () {
|
|||||||
y: {
|
y: {
|
||||||
title: {
|
title: {
|
||||||
display: true,
|
display: true,
|
||||||
text: 'HASHRATE (TH/S)',
|
text: 'HASHRATE',
|
||||||
color: theme.PRIMARY,
|
color: theme.PRIMARY,
|
||||||
font: {
|
font: {
|
||||||
family: "'VT323', monospace",
|
family: "'VT323', monospace",
|
||||||
@ -2644,97 +2644,6 @@ $(document).ready(function () {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Add keyboard event listener for Alt+W to reset wallet address
|
|
||||||
$(document).keydown(function (event) {
|
|
||||||
// Check if Alt+W is pressed (key code 87 is 'W')
|
|
||||||
if (event.altKey && event.keyCode === 87) {
|
|
||||||
resetWalletAddress();
|
|
||||||
|
|
||||||
// Prevent default browser behavior
|
|
||||||
event.preventDefault();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Function to reset wallet address in configuration and clear chart data
|
|
||||||
function resetWalletAddress() {
|
|
||||||
if (confirm("Are you sure you want to reset your wallet address? This will also clear all chart data and redirect you to the configuration page.")) {
|
|
||||||
// First clear chart data using the existing API endpoint
|
|
||||||
$.ajax({
|
|
||||||
url: '/api/reset-chart-data',
|
|
||||||
method: 'POST',
|
|
||||||
success: function () {
|
|
||||||
console.log("Chart data reset successfully");
|
|
||||||
|
|
||||||
// Then reset the chart display locally
|
|
||||||
if (trendChart) {
|
|
||||||
trendChart.data.labels = [];
|
|
||||||
trendChart.data.datasets[0].data = [];
|
|
||||||
trendChart.update('none');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Then reset wallet address
|
|
||||||
fetch('/api/config')
|
|
||||||
.then(response => response.json())
|
|
||||||
.then(config => {
|
|
||||||
// Reset the wallet address to default
|
|
||||||
config.wallet = "yourwallethere";
|
|
||||||
|
|
||||||
// Save the updated configuration
|
|
||||||
return fetch('/api/config', {
|
|
||||||
method: 'POST',
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json',
|
|
||||||
},
|
|
||||||
body: JSON.stringify(config)
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.then(response => response.json())
|
|
||||||
.then(data => {
|
|
||||||
console.log("Wallet address reset successfully:", data);
|
|
||||||
// Also clear arrow indicator states
|
|
||||||
arrowIndicator.clearAll();
|
|
||||||
// Redirect to the boot page for reconfiguration
|
|
||||||
window.location.href = window.location.origin + "/";
|
|
||||||
})
|
|
||||||
.catch(error => {
|
|
||||||
console.error("Error resetting wallet address:", error);
|
|
||||||
alert("There was an error resetting your wallet address. Please try again.");
|
|
||||||
});
|
|
||||||
},
|
|
||||||
error: function (xhr, status, error) {
|
|
||||||
console.error("Error clearing chart data:", error);
|
|
||||||
// Continue with wallet reset even if chart reset fails
|
|
||||||
resetWalletAddressOnly();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fallback function if chart reset fails
|
|
||||||
function resetWalletAddressOnly() {
|
|
||||||
fetch('/api/config')
|
|
||||||
.then(response => response.json())
|
|
||||||
.then(config => {
|
|
||||||
config.wallet = "yourwallethere";
|
|
||||||
return fetch('/api/config', {
|
|
||||||
method: 'POST',
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json',
|
|
||||||
},
|
|
||||||
body: JSON.stringify(config)
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.then(response => response.json())
|
|
||||||
.then(data => {
|
|
||||||
console.log("Wallet address reset successfully (without chart reset):", data);
|
|
||||||
window.location.href = window.location.origin + "/";
|
|
||||||
})
|
|
||||||
.catch(error => {
|
|
||||||
console.error("Error resetting wallet address:", error);
|
|
||||||
alert("There was an error resetting your wallet address. Please try again.");
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// Apply any saved arrows to DOM on page load
|
// Apply any saved arrows to DOM on page load
|
||||||
arrowIndicator.forceApplyArrows();
|
arrowIndicator.forceApplyArrows();
|
||||||
|
|
||||||
|
@ -135,7 +135,6 @@
|
|||||||
<!-- Footer -->
|
<!-- Footer -->
|
||||||
<footer class="footer text-center">
|
<footer class="footer text-center">
|
||||||
<p>Not affiliated with <a href="https://www.Ocean.xyz">Ocean.xyz</a></p>
|
<p>Not affiliated with <a href="https://www.Ocean.xyz">Ocean.xyz</a></p>
|
||||||
<p>v0.8.7 - Public Beta </p>
|
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -131,10 +131,10 @@ v.21
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="network-fee">
|
<label for="network-fee">
|
||||||
Firmware Fee (%)
|
Network Fee (%)
|
||||||
<span class="tooltip">
|
<span class="tooltip">
|
||||||
?
|
?
|
||||||
<span class="tooltip-text">Additional fees beyond pool fee, like Firmware fees from LuxOS and Vnish</span>
|
<span class="tooltip-text">Additional fees beyond pool fee, like Firmware fees</span>
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
<input type="number" id="network-fee" step="0.1" min="0" max="10" placeholder="0.0" value="">
|
<input type="number" id="network-fee" step="0.1" min="0" max="10" placeholder="0.0" value="">
|
||||||
|
Loading…
Reference in New Issue
Block a user