Commit graph

607 commits

Author SHA1 Message Date
Peter Goodhall
8e741b5d36 Improve search with exact match and recent history
Refactors the callsign/gridsquare search to support exact match toggling, partial/broad match fallback, and a recent searches history stored in localStorage. Search terms are now passed via GET parameters (bookmarkable URLs) instead of POST. The advanced filter panel gains result count badges, a clear button, and persists query rules across page loads. DataTable initialization is extracted into reusable helpers.
2026-08-06 15:05:04 +01:00
Peter Goodhall
7c50480cce Load Leaflet assets on search pages
Add the `search` route to the shared Leaflet include checks in the main and mini headers plus the footer. This ensures search pages load the map CSS and scripts needed for Leaflet-based UI elements.
2026-08-06 14:48:05 +01:00
Peter Goodhall
fb9ffdb3ad Enable Leaflet maps in logbookadvanced
Add 'logbookadvanced' controller to the list of routes that require Leaflet map assets. Also conditionally load easyprint.js only when Leaflet is enabled to reduce unnecessary script loading.

#3453 Fixed
2026-07-11 16:45:29 +01:00
Peter Goodhall
8439798799 Lazy-load Leaflet and fix QRB modal map
Leaflet CSS/JS assets are now loaded conditionally in shared headers/footers so map libraries are only included on pages that need them. For the QRB calculator dialog, Leaflet is loaded on demand in `common.js`, and the `newpath` map-rendering function was moved into the QRB view so the modal still works when global map scripts are skipped. Also adds a small HTMX updating indicator to the dashboard’s Today’s QSOs section.
2026-07-06 17:18:39 +01:00
Peter Goodhall
a0f953dfa8 Add CAT cache and satellite lookup helper
Introduce window.cloudlogLastCatData and window.cloudlogLastCatRadioId to cache the last CAT response and radio ID, set on successful CAT poll and cleared on UI reset. Add isSatelliteLookupContext() in qso.js to centralize logic for detecting satellite lookup context using UI fields or the cached CAT data, and replace scattered sat_name checks with this helper. This makes satellite lookups more reliable when CAT populates fields and avoids duplicated logic across handlers.
2026-06-23 11:35:51 +01:00
Peter Goodhall
ab219e8cb4 Prevent duplicate Escape handling and fix SAT reset
Avoid double-processing of the Escape key by setting a timestamp (window.cloudlogQsoEscHandledAt) when handling the QSO-escape keydown and short-circuiting subsequent handlers within 500ms. Also broaden the SAT field restore logic in resetQsoEntryOnEscape to restore sat_name/sat_mode when preSatMode exists or when the previous propagation mode was SAT (not just when preSatName is present). These changes prevent accidental duplicate resets and ensure SAT fields are correctly restored.
2026-05-28 22:19:53 +01:00
Peter Goodhall
538f6ccf8a Clear selectPropagation when prop_mode empty
Trim and store data.prop_mode into propModeFromCat and use it to decide how to update the propagation select. If the value is empty, clear #selectPropagation and remove its stored catValue to avoid carrying stale propagation settings; otherwise call cat2UI with the trimmed value. This prevents leftover propagation mode when CAT provides no prop_mode.
2026-05-27 22:27:52 +01:00
Peter Goodhall
c610e1e378 Preserve satellite fields & save radio default
Prevent CAT polling from overwriting user-entered satellite fields by introducing lockSatelliteFieldsToUserInput and only updating #sat_name, #sat_mode and propagation when not locked. Clear stale sat fields if CAT returns empty values. Reset the lock on radio changes and when UI is reset, and set the lock dynamically on user input (or when propagation is SAT).

Also persist the selected radio as a post-save default: include radio in postSaveDefaults, restore it in reapplyPostSaveDefaults (update selects and localStorage), and trigger sat_name input after restore so the locking logic reacts to restored satellite fields.
2026-05-27 22:04:14 +01:00
Peter Goodhall
7c0c7515a5 Add experimental Remote Operation feature
Introduce an experimental browser-based remote audio feature: bump migration version to 270 and add a migration to add a remote_operation flag to the users table. Add server-side support to User and QSO controllers/models to read/save the remote_operation option (stored via user_options_model) and expose isRemoteOperationEnabled to views and session updates. Add UI: a Remote Operation card on the QSO page, a modal component for detailed settings, a toggle in the user edit page, and conditional loading of assets/js/remote-operation.js. Add a large client-side implementation (assets/js/remote-operation.js) implementing WebRTC signalling, device selection, level meters and diagnostics. Minor session/session-update and helper changes to keep UI state in sync.
2026-05-16 13:44:09 +01:00
Peter Goodhall
cc7593c892 Add WinKey relay settings API and UI persistence
Introduce server endpoints to get/save WinKey WebSocket relay settings and token (winkeyrelaysettings_json, winkeyrelaysettings_save, winkeyrelaytoken_json, winkeyrelaytoken_save) using the user_options_model. Add client-side changes to load settings from the account (with a localStorage fallback), save settings to the account, validate URL/token (ws:// or wss:// and token ≥ 8 chars), and clear legacy localStorage keys after a successful save. Defer WebSocket connect until account settings are loaded and update UI text to reflect that relay settings are stored in the user account and follow login across devices.
2026-05-15 14:19:48 +01:00
Peter Goodhall
64c97e71fd Add Winkey Relay support and settings UI
Introduce optional Winkey Relay transport for CW commands and a browser-based settings UI. Adds localStorage-backed relay config (enabled, url, token, room), a modal to edit/save settings, and validation for URL/token/room. WebSocket logic now switches between direct localhost connection and relay mode, handles relay protocol messages (join, frame, error), authenticates/join on open, and wraps sends via sendWinkeyCommand to support framed relay messages. Updates UI: new Relay button/modal, changed Settings button label/icon, socket status badge updates, and reconnect on save. Keeps compatibility with direct WebSocket server and retains logging and sidetone playback behavior.
2026-05-15 13:48:34 +01:00
Peter Goodhall
d7da056ce3 Enable Enter key to send sendText messages
Add Enter key handling for the CW free-text input (sendText) so pressing Enter sends the message. Replaced the old 'message' keypress handler in footer.php with a DOMContentLoaded listener that binds keydown on #sendText and calls sendMyMessage() (preventing default). Also added matching keydown handling in assets/js/winkey.js to call clickSend() when Enter is pressed on the sendText element.
2026-05-14 22:36:19 +01:00
Peter Goodhall
11ccec5901 Add CW speaker sidetone and UI controls
Introduce a client-side CW sidetone feature: add assets/js/cw-sidetone.js (AudioContext-based morse generator with persistence for enabled/frequency), and wire it into the UI and existing send flows. Include the new script in the footer and add speaker sidetone controls (enable checkbox + frequency slider) to the QSO view. Update winkey.js and websocket macro send handlers to compute a single textToSend, send it as before, and call window.cloudlogCwSidetone.playText(...) when available; also add defensive element existence checks. This provides audible sidetone feedback for CW macros and manual sends while preserving backwards compatibility when the sidetone module is not present.
2026-05-14 22:34:51 +01:00
Peter Goodhall
0fe9cf7ba7 Defer input focus to next event loop
Replace direct sendTextEl.focus() with setTimeout(..., 0) so the input is focused on the next tick. This avoids timing issues where an immediate focus call can be overridden by synchronous handlers (e.g. blur/submit) and ensures the message input reliably regains focus after sending.
2026-05-12 17:10:56 +01:00
Peter Goodhall
0aaf722b6e Focus input after sending message
When sending a WebSocket message, the input clearing logic now caches the sendText element, clears its value and calls focus() so the user can immediately start typing the next message. This improves UX by returning focus to the input and slightly refactors the DOM access into a local constant.
2026-05-12 17:04:20 +01:00
Peter Goodhall
7e40a0288e Add resilient CAT polling with backoff and warnings
Replace the fixed 3s setInterval CAT updater with a scheduled poller that supports exponential backoff, failure counting, and UI warnings. Introduces consecutiveCatPollFailures, catPollTimer, lastSuccessfulCatUpdateAt, and constants for base/max intervals and warning threshold. Adds helper functions to compute delays, schedule polls, handle success/failure, show/clear warning banners, and only poll the currently selected radio. Clears warnings on login error/reset/selection changes and resets failure counters when selection changes to maintain responsive UI.
2026-05-01 10:23:08 +01:00
Peter Goodhall
e6f6dd2265 Disable caching for radio JSON; use $.ajax
Add no-cache HTTP headers in Radio::json to prevent cached responses. Replace client-side $.getJSON with $.ajax(url, {dataType:'json', cache:false}) and preserve the stale-response checks while updating lastProcessedCatRequest only when a response is applied. Also ensure login errors return early. These changes ensure fresh CAT data and avoid stale or cached responses affecting the UI.
2026-05-01 10:22:11 +01:00
Peter Goodhall
0a49b83318 Refactor timeline UI and details modal
Replace the old timeline dialog with a Bootstrap 5 modal (with HTMX support and jQuery fallback) and move AJAX content into the modal body. Add initTimelineDetailsTable to initialize/destroy DataTables for detail views and guard DataTable initialization when tables are absent. Revamp the timeline index: convert filters into a Bootstrap card with improved form layout, add Reset button, show a summary badge/count and a DXCC info alert for DXCC award, and embed the details modal markup. Convert timeline tables to responsive containers, use semantic <th> headers, and replace text links with accessible buttons that call displayTimelineContacts. Minor UI tweaks: change empty-result alert to warning and add a CSS class (menuOnResultTab) to the dropdown-menu in log_ajax for result-row actions.
2026-04-26 18:12:58 +01:00
Peter Goodhall
c7b0a75055 Pause auto-refresh during callsign lookup
Prevent the logbook auto-refresh from overwriting callsign lookup results by introducing a previousContactsLookupMode flag and pauseAutoRefresh()/resumeAutoRefresh() helpers that remove/restore the htmx hx-trigger on the qso list element. Clear and hide partial_view on reset and resume auto-refresh there. Show an explicit "no past QSOs" info message when a callsign is found but has no previous QSOs, and ensure the previous-contacts panel state is set deterministically. Also harden CAT radioID checking to treat undefined and falsy values as invalid. Changes touch qso.js and the footer view.
2026-04-13 13:36:45 +01:00
Peter Goodhall
830df2d00e Clear CAT value cache on UI reset
When resetting the UI, clear the stored CAT value data on frequency, satellite and mode inputs so re-selecting a radio with identical values will still repopulate fields. Adds a jQuery removeData('catValue') call for #frequency, #frequency_rx, #sat_name, #sat_mode, #transmit_power, #selectPropagation and #mode, with a comment explaining the intent.
2026-04-07 16:21:30 +01:00
Peter Goodhall
b96b205b64 Improve CAT sync and prevent stale updates
Add request/version tracking to CAT JSON handling to avoid applying stale responses when radio selection changes. Introduce catRequestCounter, lastProcessedCatRequest and catSelectionContextVersion, compare request IDs and context version before updating UI, and increment context version on radio selection change. Also add a syncFromSelectedRadioAfterReset helper in qso.js (with a throttled user notice) and call it after form reset and on escape-based reset so the form prefers live CAT values from the selected radio.
2026-04-07 14:45:22 +01:00
Peter Goodhall
0f62a7178a Add client-side QRA utils and use in QSO
Introduce a frontend QRA utilities module and switch QSO locator/bearing/distance logic to run client-side. Added assets/js/qra-utils.js (ported from the PHP Qra library), injected measurement_base and station_gridsquares into the QSO view, and updated application/controllers/Qso.php to provide the measurement_base for the frontend. Footer now loads qra-utils.js before qso.js. Modified assets/js/sections/qso.js to debounce locator input, place map markers from local grid→lat/lng math, and compute bearing/distance via QraUtils (removes several AJAX calls to server endpoints). This reduces server round-trips and keeps frontend behavior consistent with the PHP implementation.
2026-03-29 13:57:36 +01:00
Peter Goodhall
f9941cc021 Update terminator styling and defaults
Adjust terminator/greyline visual style and default options. Changed colors to #4a6fa5 (stroke) and #001f3f (fill), increased stroke weight to 1.5, lowered fillOpacity to 0.18, and changed resolution from 2 to 1. These edits were applied both where the greyline is created in the footer view and in the L.Terminator default options to keep behavior and appearance consistent.
2026-03-26 22:45:51 +00:00
Peter Goodhall
bcae0c8782 Add optional map greyline layer (terminator)
Add a day/night greyline (terminator) overlay to the dashboard map.

- New assets/js/leaflet/L.Terminator.js: a Leaflet polygon plugin that computes the solar terminator for a given time and exposes L.terminator().
- Load the terminator script in the footer and register a Greyline overlay layer with start/stop interval updates (refreshes every minute). Updates are managed when the overlay is added/removed or when the map unloads to avoid orphaned timers.
- Expose the greyline as a toggleable overlay in the map layer control and add markers to a dedicated markersLayer overlay (instead of adding them directly to the map).
- Add a user preference checkbox to application/views/user/edit.php (Enable Dashboard Map Greyline Layer) and wire saving/reading of the dashboard_map_greyline option in application/controllers/User.php and application/controllers/Dashboard.php. Default behavior is enabled when not set.

This change lets users enable/disable the visual day/night terminator on the dashboard map and ensures proper lifecycle handling for updates and marker layering.
2026-03-26 22:39:04 +00:00
Peter Goodhall
2537f66d8f Support multi POTA refs in QSO entry and ADIF export 2026-03-24 14:20:17 +00:00
Peter Goodhall
c89ac7ceb5 Add contest callsign bearing/distance lookup with DXCC fallback 2026-03-24 14:13:35 +00:00
Peter Goodhall
5d034d0963 Add public Station Diary with images & RSS
Introduce public Station Diary functionality: add global config flag, routes, controller, model changes, views and DB migrations. New migrations (252-254) add is_public/include_qso_summary, diary_images table and logbook_id on notes. Notes model updated to handle public flags, diary images, qso summaries, caching (per-user cache version), and helper methods for listing/counting public diary entries. New Stationdiary controller serves paginated public pages and RSS feed with caching. Notes controller updated to handle image uploads, attach images to diary entries, and provide an AJAX endpoint to delete images. Views updated to support public visibility options, logbook selector, image upload UI and Quill editor assets; routes and migration version bumped accordingly. Includes file upload example added to uploads/diary.
2026-03-08 11:42:41 +00:00
Peter Goodhall
440f5b18a9 Skip unsaved-change warning if callsign empty
Add checks around the unsaved-changes logic to bypass the confirmation when the #callsign field is present but empty. The patch inserts a guard in the page unload catcher and before showing the confirmation so users creating new/blank callsign entries won't receive an unnecessary unsaved-change warning (checks element existence and uses trim()).
2026-02-11 21:45:03 +00:00
Peter Goodhall
2a2f62ccbc Add filtering and localization to WAB award view
Introduces band, mode, and confirmed-only filters to the Worked All Britain (WAB) award view and details AJAX endpoint. Updates the controller, model, and view logic to support filtering, and adds new localized strings for WAB award UI elements in multiple languages. Also ensures the correct script is loaded for the WAB section and improves the Bands model to check for field existence before filtering by award.
2026-01-21 16:54:24 +00:00
Peter Goodhall
5c5bdf2f2f Add categories and management to notes feature
Introduces note categories with support for filtering, assigning, and managing categories. Adds category selection and creation to add/edit forms, category filtering to the notes list, and modals for deleting/merging categories and confirming note deletion. Updates controller and model logic to handle categories, and improves UI for notes management.
2026-01-09 13:17:56 +00:00
Peter Goodhall
1000fafd68 Revert "Remove redundant statistics update calls in footer"
This reverts commit bf82b6949c.
2026-01-07 11:38:09 +00:00
Peter Goodhall
bf82b6949c Remove redundant statistics update calls in footer
Eliminated unnecessary calls to updateCqStatistics and updateWasStatistics on page load and after table filtering/sorting. Statistics are now handled by server-side calculations and page reloads, simplifying the client-side logic.
2026-01-07 11:36:36 +00:00
Peter Goodhall
d07e788921 Add WAS statistics summary, filters, and CSV export
Introduces a statistics summary section, quick preset filters, and CSV export functionality to the WAS awards page. Adds sortable columns, a search box, and updates the UI for better usability. JavaScript logic is included to update statistics dynamically based on visible table rows and to handle filtering, sorting, and exporting. Also improves the CQ statistics logic for consistency.
2026-01-07 11:25:03 +00:00
Peter Goodhall
1fa6da4556 Enhance CQ awards page with filters and table features
Added advanced filter panel with quick presets, improved statistics summary, and milestone progress display to the CQ awards page. Enhanced the CQ table with search and sortable columns, and implemented CSV export functionality. Updated footer scripts to support new table interactions and filter presets.
2026-01-07 11:02:44 +00:00
Peter Goodhall
e572821b96 Add Personal Propagation Advisor feature
Introduces the Personal Propagation Advisor, allowing users to analyze their own QSO data to determine the best times, bands, and modes for working specific DXCC entities. Adds a new controller, model methods, view, JavaScript, and language strings in multiple languages. Updates navigation and footer to support the new feature.
2026-01-05 22:14:00 +00:00
Peter Goodhall
fb25861a51 Improve unsaved changes warning and add custom leave modal
Enhanced the unsaved changes detection to show a custom Bootstrap modal when navigating away from QSO entry via internal links, while retaining native browser dialogs for external navigation. Refactored the LIVE/POST mode switch to avoid triggering the beforeunload warning. Added a custom modal for confirming navigation away from QSO entry, and updated related JavaScript logic for better user experience.
2025-12-12 14:54:38 +00:00
Peter Goodhall
8f7902e4e9 Revert "Skip CAT updates when manual logging is enabled"
This reverts commit 8c6fc6b720.
2025-12-12 14:31:42 +00:00
Peter Goodhall
8c6fc6b720 Skip CAT updates when manual logging is enabled
Added a check for the 'manual' URL parameter to bypass CAT data updates and reset the UI when manual QSO entry is active. This ensures that CAT updates do not interfere with manual logging workflows.
2025-12-12 14:29:39 +00:00
Peter Goodhall
88f328581b Added Awards Settings 2025-12-02 13:32:11 +00:00
Peter Goodhall
8131bbb62d Improve radio status loading and UI feedback
Radio status now loads immediately on page load and updates every 2 seconds, with a loading spinner shown until data is available. The radio index page UI has been enhanced for better clarity, accessibility, and user feedback, including improved alert styling and more informative icons.
2025-11-22 17:36:26 +00:00
Peter Goodhall
e0e3fae28a Support user date format preference in footer
Updated the date formatting logic in footer.php to use the user's preferred date format from session or config. The date input now displays according to various supported formats, improving localization and user experience.

Hopefully fixes #3358
2025-10-18 15:10:03 +01:00
Peter Goodhall
00aa3bcc0b Improve CW macro handling and error management
Enhanced the Qso controller with better error handling, input validation, and user/session checks for CW macro operations. Added a new cwmacros_test method for testing session data. Updated the footer JS to check for the message element before adding event listeners, preventing errors if the element is missing. Improved error handling in winkey.js when fetching macros to handle HTTP errors more gracefully.
2025-10-10 15:19:42 +01:00
Peter Goodhall
ad9e7b04e0 Improve CW macro saving and UI feedback
Enhanced macro saving with better input sanitization, error handling, and user feedback in Qso.php and Winkey.php. Updated modal forms to display save responses in a dedicated area. Improved JavaScript to handle default macro values and update button labels more robustly. Removed unnecessary WebSocket polling for CW speed in the footer.
2025-10-10 14:54:50 +01:00
Peter Goodhall
60e191ce74 Toggle #winkey div based on mode selection
Show the #winkey div when data.mode is 'CW' and hide it otherwise. This improves the UI by conditionally displaying the Winkey controls only when relevant.
2025-10-07 22:40:23 +01:00
Peter Goodhall
3204ffd531 Improve Winkey UI visibility and layout
Added dynamic visibility for the Winkey panel based on mode selection and protocol, ensuring it only appears in CW mode and over HTTPS. Refactored the Winkey UI layout for better structure and usability, including grouped function keys, improved speed control, message input, and status/message log presentation.
2025-10-06 14:45:31 +01:00
Peter Goodhall
e17cf47f53 Add CW speed control and message log toggle to QSO UI
Introduced CW speed adjustment controls and real-time speed display to the QSO interface, with supporting JavaScript for polling and updating speed via WebSocket. Added a toggle button to show or hide the message log, improving usability and user control over the interface.
2025-10-06 14:42:03 +01:00
Peter Goodhall
d0bc360049 Redesign DX Cluster view with real-time WebSocket spots
Revamps the DX Cluster page to use a modern card/table layout, real-time spot updates via WebSocket, and DataTables for enhanced interactivity. Adds connection status indicators, frequency click-to-copy, and age-based row styling. Removes legacy AJAX spot lookup code from the footer.
2025-10-04 14:53:43 +01:00
Peter Goodhall
5f0c95804a Add user-specific bands to bandmap and persist radio selection
The bandmap now displays only the bands configured for the current user, using a new Bands model method to retrieve and order them. The band selection dropdown in the bandmap view is dynamically generated based on user bands, with a fallback to defaults. Additionally, the selected radio is now persisted in localStorage and synchronized across selects, and the bandmap window width was adjusted for better display.
2025-10-02 17:40:49 +01:00
Peter Goodhall
76f55f7f27 Add Most Worked Callsigns feature
Introduces a new 'Most Worked Callsigns' page, controller, model, and view to display callsigns worked multiple times from the active logbook. Adds language support for this feature in multiple languages and updates the navigation menu to include a link to the new page. Also includes DataTables integration and filter options for bands, modes, satellites, date range, and minimum QSOs.
2025-08-23 21:11:36 +01:00
Peter Goodhall
a92d0976ca Increase map and AJAX request timeouts
Extended the failsafe timeout for map loading from 10 to 60 seconds in the footer and increased the AJAX request timeout in leafembed.js from 30 to 50 seconds to better accommodate slow responses.
2025-08-10 22:08:31 +01:00