- 24 Feb, 2026 1 commit
-
-
Stefy Lanza (nextime / spora ) authored
-
- 23 Feb, 2026 1 commit
-
-
Stefy Lanza (nextime / spora ) authored
- Add parse_timezone_offset() helper to parse timezone strings (UTC+3, Africa/Johannesburg, etc.) - Add get_date_range_in_timezone() helper to calculate date ranges with proper timezone conversion - Update reports(), export_reports(), client_report_detail(), match_report_detail(), export_client_report(), and export_match_report() to use timezone-aware date filtering - Users can now select their timezone and date filters will correctly convert local time boundaries to UTC for database queries
-
- 20 Feb, 2026 4 commits
-
-
Stefy Lanza (nextime / spora ) authored
The proxyFetch() function adds the script root prefix, but Flask's url_for() already includes the script root when generating URLs. This caused the proxy path to be duplicated (e.g., /mbetterd/mbetterd/...). Changed all proxyFetch() calls to use fetch() directly since url_for() already handles the proxy prefix correctly.
-
Stefy Lanza (nextime / spora ) authored
Bootstrap's JavaScript modal system was interfering with our custom modals because both used the .modal class. Renamed all modal-related classes to use custom- prefix: - .modal -> .custom-modal - .modal-dialog -> .custom-modal-dialog - .modal-header -> .custom-modal-header - .modal-body -> .custom-modal-body - .modal-footer -> .custom-modal-footer - .modal-title -> .custom-modal-title This prevents Bootstrap from trying to manage our custom modals.
-
Stefy Lanza (nextime / spora ) authored
The previous fix using closest() was incorrect because closest('.modal') would always return the modal for any click inside it (including dialog). The correct approach is to check if e.target IS the modal element itself, which only happens when clicking directly on the backdrop overlay, not when clicking on elements inside the dialog. -
Stefy Lanza (nextime / spora ) authored
The modal was closing when clicking on input fields or trying to type because the click event handler was checking if e.target.classList.contains('modal') which could incorrectly trigger when clicking on certain elements. Fixed by using closest() to properly detect if the click happened inside a .modal-dialog element. The modal now only closes when clicking on the backdrop (outside the dialog), not when interacting with form elements.
-
- 14 Feb, 2026 6 commits
-
-
Stefy Lanza (nextime / spora ) authored
The 512KB chunks were still too large for some nginx configurations. Reduced to 256KB to ensure compatibility with restrictive client_max_body_size settings.
-
Stefy Lanza (nextime / spora ) authored
The nginx proxy was returning 413 (Request Entity Too Large) errors for 1MB chunks. Reduced chunk size to 512KB to work with common nginx client_max_body_size configurations. Note: For production, the nginx configuration should also be updated to allow larger request bodies: client_max_body_size 100M;
-
Stefy Lanza (nextime / spora ) authored
The admin_users.html template is a standalone page that doesn't extend base.html, so it was missing the proxyFetch function definition needed for admin user management operations. Added the SCRIPT_ROOT variable and proxyFetch/buildUrl helper functions directly to the template to support proxy-aware URL generation.
-
Stefy Lanza (nextime / spora ) authored
The match_detail.html template is a standalone page that doesn't extend base.html, so it was missing the proxyFetch function definition needed for chunked uploads. Added the SCRIPT_ROOT variable and proxyFetch/buildUrl helper functions directly to the template to support proxy-aware URL generation.
-
Stefy Lanza (nextime / spora ) authored
The fixture_detail.html template is a standalone page that doesn't extend base.html, so it was missing the proxyFetch function definition needed for chunked uploads. Added the SCRIPT_ROOT variable and proxyFetch/buildUrl helper functions directly to the template to support proxy-aware URL generation.
-
Stefy Lanza (nextime / spora ) authored
The zip.html template is a standalone page that doesn't extend base.html, so it was missing the proxyFetch function definition needed for chunked uploads. Added the SCRIPT_ROOT variable and proxyFetch/buildUrl helper functions directly to the template to support proxy-aware URL generation.
-
- 10 Feb, 2026 2 commits
-
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
- Updated ProxyFix configuration to handle all proxy headers (x_for, x_proto, x_host, x_port, x_prefix) - Added template context processor to inject script_root and url_root into all templates - Created JavaScript helper functions in base template for proxy-aware URL generation: - buildUrl() - Build URLs with correct proxy prefix - proxyFetch() - Make fetch requests with proxy-aware URLs - navigateTo() - Navigate to URLs with proxy prefix - getCurrentUrl() - Get current URL with proxy prefix - buildUrlWithParams() - Build URLs with query parameters - Updated all templates with hardcoded JavaScript URLs to use proxyFetch(): - admin_settings.html - admin_users.html - admin_migrations.html - match_detail.html - fixture_detail.html - upload/zip.html - user_tokens.html - Updated templates with window.location.href to use navigateTo(): - clients.html - reports.html - client_report_detail.html - Updated templates using window.location.href for URL manipulation to use getCurrentUrl(): - match_report_detail.html - bet_detail.html - reports.html - client_report_detail.html - Created PROXY_SUPPORT.md documentation file This implementation ensures all URLs generated and managed in the web dashboard correctly handle the root path when behind an nginx proxy with X-Forwarded-Prefix header (e.g., /mbetterc).
-
- 03 Feb, 2026 13 commits
-
-
Stefy Lanza (nextime / spora ) authored
- Fixed version incompatibility between weasyprint 60.2 and pydyf 0.12.1 - pydyf 0.12.1 changed PDF.__init__() to only accept 1 positional argument - weasyprint 68.0 is compatible with current pydyf version - Updated requirements.txt to reflect new weasyprint version
-
Stefy Lanza (nextime / spora ) authored
- Shortened headers in match_report_detail.html: Bet UUID→UUID, Date/Time→Date, Total Amount→Amount, Bet Count→Count, Paid Out→Payout - Shortened headers in client_report_detail.html: Date/Time→Date, Total Bets→Bets, Winning→Win, Losing→Loss, Pending→Pend, Extraction→Extract, CAP Balance→CAP Bal, Shortfall→Short - Shortened headers in reports.html: Shortfall→Short - Shortened headers in bet_detail.html: Win Amount→Win Amt
-
Stefy Lanza (nextime / spora ) authored
Remove print button styles and print media queries from reports template since they are now handled in base template
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
-
- 02 Feb, 2026 13 commits
-
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
- Fix MatchReport creation for incremental syncs with empty extraction_stats - When extraction_stats is empty but bets exist, create MatchReport from bets data - Fix duplicate client_id parameter error in reports template - Create separate detail_filters dict to avoid duplicate parameter
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
- Create reusable timezone options partial with all IANA timezones - Include 400+ timezone options organized by region (Africa, America, Antarctica, Arctic, Asia, Atlantic, Australia, Europe, Indian, Pacific) - Each timezone displays only the city name for cleaner UI - Update all reports pages to use the timezone options partial - Timezone options include: Auto (Browser Local), UTC, and all major world timezones
-
Stefy Lanza (nextime / spora ) authored
- Add timezone selector with auto-detection of browser local timezone - Add manual timezone selection options for major world timezones - Implement client-side timezone conversion using JavaScript Intl.DateTimeFormat - Update all datetime displays to use data-utc-datetime attribute for automatic conversion - All reports pages now support timezone filtering and display - Timezone options: Auto (Browser Local), UTC, and 14 major world timezones
-
Stefy Lanza (nextime / spora ) authored
- Repositioned summary cards to 2 rows (3 cards in first row, 2 in second row) - Changed table headers from 'Number of Matches' to 'Matches' and 'Number of Bets' to 'Bets' - Added professional styling with gradient headers, hover effects, and enhanced card design - Implemented full-width layout for reports page - Added per-page selector (10, 20, 50, 100 options, default 50) with pagination - Fixed 'View Details' button to properly navigate to client report detail page - Created match report detail page with match information and bets list - Created bet detail page with bet information and bet details breakdown - Added breadcrumb navigation throughout all detail pages - All pages maintain consistent professional styling and preserve filters
-
Stefy Lanza (nextime / spora ) authored
- If client_id is missing or null in sync request, derive it from ClientActivity table - Look up most recent client activity for the API token to get rustdesk_id - Use derived client_id throughout the sync process (ReportSync, Bet, ExtractionStats, MatchReport) - Prevents database error: 'Column client_id cannot be null' - Ensures server uses same client identifier that client uses - Returns client_id_used in response for debugging - Fixes issue where client sends null client_id but server needs valid identifier
-
Stefy Lanza (nextime / spora ) authored
- When client doesn't send client_id parameter, look up rustdesk_id from ClientActivity table - This ensures server uses same client_id that client uses when syncing - Fixes issue where server derived 'token_66' but client was syncing with '8d95b8a115c19857' - Server now correctly finds existing sync records and returns requires_full_sync=False
-
Stefy Lanza (nextime / spora ) authored
- Fixed TypeError: jinja2.runtime.Context.call() got multiple values for keyword argument 'client_id' - Removed explicit client_id=client.client_id from url_for call since it's already in **filters - This fixes the template rendering error on the reports page
-
Stefy Lanza (nextime / spora ) authored
- Log the complete JSON response being sent back to the client - This helps debug what the client is receiving - Shows requires_full_sync flag and all response fields in formatted JSON
-
Stefy Lanza (nextime / spora ) authored
- When client_id is not provided, derive a unique client_id from the API token (token_{api_token.id}) - This ensures each API token has its own unique client identifier for sync purposes - Fixes issue where client was receiving status for all clients instead of just itself - Allows the server to correctly signal requires_full_sync=True when the database is empty for that specific client -
Stefy Lanza (nextime / spora ) authored
- Add detailed logging for client_id, user, and API token information - Log counts of bets, extraction_stats, and match_reports for each client - Log requires_full_sync flag value for each client - Log response being sent to client - Add requires_full_sync: False to responses when sync records exist - This will help diagnose why client keeps sending incremental sync requests instead of full sync
-
Stefy Lanza (nextime / spora ) authored
- Add Bet, ExtractionStats, and MatchReport model imports to api_get_last_sync function - Fixes 'name Bet is not defined' error when querying last sync status
-