Commit Graph

40 Commits

Author SHA1 Message Date
DJObleezy
e9825c9006 Refactor hashrate normalization and improve error handling
- Refactored `normalizeHashrate` function to use a lookup table for unit conversion, enhancing error handling and logging for unrecognized units.
- Updated `ArrowIndicator` class to utilize the new global `normalizeHashrate` function for consistency.
- Enhanced `updateChartWithNormalizedData` with better error handling for 24-hour averages and current hashrate data, including checks for unreasonable values.
- Improved historical data handling with validation and anomaly detection.
- Encapsulated single data point display logic in `useSingleDataPoint` for better error management.
- Refined low hashrate indicator display logic to show only when necessary and updated its appearance based on the current theme.
- Overall improvements enhance robustness, maintainability, and user experience.
2025-04-26 06:39:55 -07:00
DJObleezy
24c46f058b Add last block earnings display to UI
Updated `updateUI()` in `main.js` to show last block earnings with a "+" prefix and "SATS" suffix. Modified `dashboard.html` to include a new span element that conditionally displays the earnings or defaults to "+0 SATS".
2025-04-26 06:13:58 -07:00
DJObleezy
e0c5f085cc Enhance data handling and UI responsiveness
- Updated `save_graph_state` in `state_manager.py` to include unit preservation for `arrow_history` and `metrics_log`, with improved data size logging and exception handling.
- Modified `notifications.css` for better mobile responsiveness, including a grid layout for `.filter-buttons` and adjusted button sizes.
- Changed value display in `initializeChart` to use 'PH' for petahashes, aligning with new unit standards.
- Ensured consistent unit formatting in `updateChartWithNormalizedData` for the 24-hour average line.
- Enhanced precision in `updateUI` for unpaid earnings display.
- Simplified y-axis label in chart configuration and updated value formatting to reflect new unit standards.
2025-04-25 22:13:01 -07:00
DJObleezy
6ba7545278 Remove text-shadow for cleaner UI across stylesheets
This commit removes `text-shadow` properties from various CSS classes in `blocks.css`, `boot.css`, `common.css`, `dashboard.css`, `error.css`, `retro-refresh.css`, and `workers.css`, enhancing readability and reducing visual clutter.

In `main.js`, the inline styles for profit value elements are updated to eliminate `text-shadow`, simplifying styling logic.

Additionally, `theme.js` sees the removal of `text-shadow` from headers and interface elements, with adjustments made to box-shadow values for improved visual depth.

These changes reflect a design decision to create a more modern and streamlined interface.
2025-04-23 23:00:06 -07:00
DJObleezy
00d3bbdee9 Update deployment instructions and chart indicator style
- Changed repository cloning instructions to use `DeepSea-Dashboard`.
- Adjusted the position of the `lowHashrateIndicator` in `main.js` from bottom to top right.
- Added a background color to the indicator for improved visibility.
2025-04-23 18:47:50 -07:00
DJObleezy
a71a6ce03a Add theme change listener and first startup handling
- Implement `setupThemeChangeListener` in `main.js` to detect theme changes across tabs, save font configurations, and recreate the chart with appropriate styles for mobile and desktop.
- Introduce new functions in `theme.js` to manage theme preferences on first startup, including setting the DeepSea theme as default and checking for previous app launches.
2025-04-23 13:55:19 -07:00
DJObleezy
f617342c23 Add theme loading styles and improve theme management
Updated `theme-toggle.css` with new styles for DeepSea and Bitcoin themes, including a loading screen. Introduced `isApplyingTheme` flag in `main.js` to manage theme application state. Modified `applyDeepSeaTheme` and `toggleTheme` functions in `theme.js` to enhance theme switching experience with dynamic loading messages. Enhanced `base.html` to preload styles and prevent flickering during theme transitions.
2025-04-23 13:26:07 -07:00
DJObleezy
f5e93f436b Implement DeepSea theme with CSS enhancements
Replaced the `applyDeepSeaTheme` function in `main.js` to apply a cohesive DeepSea theme, including extensive CSS variable definitions for UI elements.

In `theme.js`, updated styles to ensure visibility of pool hashrate text, enhanced button hover effects, and added direct DOM manipulation for consistent styling.

These changes improve the overall visual consistency and user experience of the application.
2025-04-22 20:10:10 -07:00
DJObleezy
0d0a707019 Add responsive theme toggle and dynamic styling
Introduces a responsive theme toggle button with styles for desktop and mobile views in `theme-toggle.css`. Updates `BitcoinProgressBar.js` to support dynamic theme changes and adds a new `updateTheme` method. Enhances `main.js` for theme management based on user preferences in `localStorage`. Modifies `base.html` and other HTML files to include the theme toggle button and necessary scripts. Introduces `theme.js` for managing theme constants and applying the DeepSea theme.
2025-04-22 17:43:46 -07:00
DJObleezy
231a56b18a Remove pool_luck metric and UI indicator
Updated the ArrowIndicator class to exclude the "pool_luck" metric while keeping "estimated_rewards_in_window_sats" and "workers_hashing". Removed the corresponding UI elements in the updateUI function, as the visual representation for "pool_luck" is no longer necessary.
2025-04-22 08:30:03 -07:00
DJObleezy
ce3b186dc5 Cleaned up Earning Efficiency, Time To Block, and Block Odds in the Pool Hashrates card. Also fixed a display error on the Last Block line in the Payout Info card. 2025-04-21 22:54:45 -07:00
DJObleezy
eab3e89a11 Update spacing for block odds in UI
Increased margin-left for the `probSpan` element in the
`updateUI` function from 10px to 17px for better spacing.
Removed the inline margin-left style from the `block_odds_3hr`
span in `dashboard.html`, promoting a more consistent style
management through JavaScript.
2025-04-21 10:17:33 -07:00
DJObleezy
7267244e94 Enhance block finding metrics and UI display
Updated CSS for improved styling, added functions to calculate block finding probability and time, and modified UI to display these metrics based on the 24-hour hashrate. New HTML elements added to the dashboard for better user visibility of block odds.
2025-04-21 10:04:54 -07:00
DJObleezy
6d07060b7e Add API for resetting chart data and update frontend
Implemented a new API endpoint `/api/reset-chart-data` in `App.py` to clear chart data history and save state to Redis. Updated the `resetDashboardChart` function in `main.js` to make an AJAX call to this endpoint, providing immediate user feedback. Removed previous logic for handling latest metrics to streamline the reset process.
2025-04-18 12:27:20 -07:00
DJObleezy
97fe19d61d Add configurable timezone support throughout the app
Updated the application to use a configurable timezone instead of hardcoding "America/Los_Angeles". This change impacts the dashboard, API endpoints, and worker services. Timezone is now fetched from a configuration file or environment variable, enhancing flexibility in time display. New API endpoints for available timezones and the current configured timezone have been added. The frontend now allows users to select their timezone from a dropdown menu, which is stored in local storage for future use. Timestamps in the UI have been updated to reflect the selected timezone.
2025-04-18 11:08:35 -07:00
DJObleezy
c3de5544ef Enhance negative profit styling with text shadow
Added a `text-shadow` property to the styling of
`dailyProfitElement` and `monthlyProfitElement`
to improve visibility when profit values are negative.
Existing styles for color and font-weight remain unchanged.
2025-04-11 22:56:49 -07:00
DJObleezy
6f5b2ec359 Improve style handling in updateUI function
Updated the `updateUI` function to use `setAttribute` for applying styles with `!important` to `dailyProfitElement` and `monthlyProfitElement`. Changed the reset logic to remove the entire style attribute instead of setting it to an empty string, ensuring complete style clearance for positive profit values.
2025-04-11 22:52:45 -07:00
DJObleezy
08034ea9a7 Enhance profit color visibility in updateUI function
Updated the `style.color` property for negative profit
elements in the `updateUI` function to include the
`!important` flag. This change ensures that the red color
(`#ff5555`) takes precedence over conflicting styles,
improving the visibility of negative profit indicators
in the user interface.
2025-04-11 22:47:01 -07:00
DJObleezy
9681077fbd Enhance UI updates for revenue and notifications
Updated `updateUI` to display daily revenue and power cost with conditional formatting for negative profits. Removed previous profit updates. Introduced `updateNotificationBadge` function to fetch unread notifications count via AJAX.
2025-04-11 22:37:00 -07:00
DJObleezy
05033f12ad
Update main.js 2025-04-10 16:40:57 -07:00
DJObleezy
a98c488eb6
Update main.js 2025-04-09 13:17:20 -07:00
DJObleezy
4be19833d7
Add files via upload 2025-04-09 11:46:24 -07:00
DJObleezy
d374bc3ba1
Delete static directory 2025-04-09 11:43:06 -07:00
DJObleezy
35dd182eb2
Update main.js 2025-04-04 14:20:44 -07:00
DJObleezy
c7e0af6431
Update main.js 2025-04-02 13:39:57 -07:00
DJObleezy
1a99c93ec9
Update main.js 2025-04-01 06:00:47 -07:00
DJObleezy
58cbc2a02c
Update main.js 2025-03-30 15:25:13 -07:00
DJObleezy
830ea8e917
Update main.js 2025-03-30 09:00:40 -07:00
DJObleezy
2cc3d16830
Update main.js 2025-03-30 06:21:44 -07:00
DJObleezy
115e59b8ed
Update main.js 2025-03-29 20:33:03 -07:00
DJObleezy
6331ea2737
Update main.js 2025-03-28 19:57:46 -07:00
DJObleezy
401655c3ae
Update main.js 2025-03-28 19:13:21 -07:00
DJObleezy
44ffdba522
Update main.js 2025-03-27 09:49:55 -07:00
DJObleezy
58397c2c9b
Update main.js 2025-03-26 11:04:09 -07:00
DJObleezy
7b7f386a2d
Update main.js 2025-03-26 08:16:30 -07:00
DJObleezy
03fa18e361
Update main.js 2025-03-25 13:32:30 -07:00
DJObleezy
9d96ca334f
Update main.js 2025-03-25 08:19:26 -07:00
DJObleezy
29ecc7732b
Add files via upload
v0.3 Update
2025-03-23 23:39:04 -07:00
DJObleezy
bd11f1285d
Delete static directory 2025-03-23 23:37:02 -07:00
DJObleezy
5312b11132
Re-adding files via upload 2025-03-23 13:38:57 -07:00