Commit graph

381 commits

Author SHA1 Message Date
Peter Goodhall
9047a8d799 Respect profile image preference in QSO panel
Adds a `qso_show_profile_image` JS flag from the user session and updates callbook panel rendering to honor it. The panel now omits the image column when profile images are disabled, keeps the empty-image message only when images are enabled, and applies a single-column layout class for no-image states.
2026-07-17 18:44:42 +01:00
Peter Goodhall
4efaffa882 Show callbook tab only for supported sources
Gate the QSO callbook tab on the configured callbook provider instead of the profile image setting. The controller now exposes a `show_callbook_tab` flag when the user's callbook type is `HAMQTH` or `QRZ`, and the view uses that flag for both the tab button and pane.
2026-07-17 14:39:33 +01:00
Peter Goodhall
ffa9d5017e Consolidate callbook display into tab interface
Refactored the callsign profile display from a separate hidden card to an integrated tab-based interface. The new callbook tab includes a responsive grid layout with profile image, external links (QRZ and HamQTH), and metadata fields (name, QTH, locator, IOTA). Added proper HTML escaping for security and improved visual organization with Bootstrap 5 styling.
2026-07-11 16:55:34 +01:00
Peter Goodhall
43715eed98 Use language lines for Prev/Next pagination
Replace direct lang('prev')/lang('next') calls with localized labels using general_word_previous and general_word_next language lines (falling back to 'Previous'/'Next'). Adds $prev_label and $next_label and updates the pagination links/spans to use them, improving localization support for the previous-contacts pagination.
2026-06-23 12:01:45 +01:00
Peter Goodhall
4f462683a7 Add microphone mute toggle to remote operation
Add a microphone mute control to the remote operation UI and wire it into the audio pipeline and settings. A new checkbox (remoteOperationMicMuteToggle) is added to the view. JavaScript gains a micMuted setting (default true), persistence to localStorage, UI syncing, and an applyMicMuteState() helper which enables/disables audio tracks on the media stream. The setting is applied when a stream is attached and updated immediately when the user toggles the checkbox.
2026-05-16 14:19:50 +01:00
Peter Goodhall
c9e0761383 Persist remote operation secret to account
Add server endpoints to store and retrieve the remote operation link password in the user's account and update the client to use them. Qso controller: added remoteoperationsecret_json and remoteoperationsecret_save which use user_options_model and CI encryption to get/set an encrypted link_password (save enforces a minimum 16-char password, empty value clears it). View and JS: default WebSocket URL changed to wss://relay.cloudlog.org/ws-webrtc; client no longer stores link password in localStorage and instead loads/saves it via the new endpoints (with error handling and UI feedback). Also clear the account secret on reset and stop exposing the password in browser storage.
2026-05-16 13:55:11 +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
c27442df52 Revamp Winkey macros modal layout
Replace verbose stacked inputs with a compact, responsive grid for F1–F5 macros, add placeholder examples and a macro tokens note, and prefill values in the results view via a $macro_result variable. Also make the modal larger and scrollable and add a close button to improve usability.
2026-05-15 16:17:51 +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
7a54c05c05 Add CW sidetone volume and responsive layout
Revamp CW sidetone UI and state handling: reorganize controls into responsive Bootstrap columns, switch the enable control to a form-switch, add a Volume range control and a status badge, and make frequency/volume labels responsive. Update cw-sidetone.js to persist and load a new volume setting, add updateVolumeLabel and updateStatusLabel helpers, and wire volume/status interactions in initControls. Persisted keys in localStorage now include cloudlog.cwSidetone.volume.
2026-05-14 23:00:45 +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
e896b6048c Improve QSO view mobile responsiveness
Add responsive styles and layout changes to improve usability on small screens: introduce CSS under @media (max-width:991.98px) to enable horizontal scrolling for tab bars, hide less-important table columns, adjust spacing and button widths, and remove scrollbars. Update column classes (col-sm -> col-lg and many inputs to col-6) so form fields stack better on mobile. Add a collapsible "More QSO Fields" button to surface optional fields on small devices and make the QSO map hidden on small screens (d-none d-md-block). Overall changes improve layout, readability and touch behavior for mobile users.
2026-05-08 11:31:34 +01:00
Peter Goodhall
ac0d3c8341 Remove stray backslash-n in QSL view
Remove a stray backslash-n sequence from the QSL tab conditional in application/views/qso/index.php. This prevents the backslash-n from being emitted into the HTML and restores proper spacing/formatting for the QSL tab pane.
2026-04-16 16:20:20 +01:00
Peter Goodhall
b1fcc8ffa1 Stop resetting band filter to 'all' on radio none
Remove fallback logic that forced the cluster band filter to 'all' when no radio (or radio '0') was selected. The syncBandFromRadio() method now simply applies the current #band value if present and otherwise leaves the filter unchanged. Also cleaned up related comments to reflect the simplified behavior, so band changes always sync without implicitly switching to 'all'.
2026-04-13 17:53:58 +01:00
Peter Goodhall
9913eb08a2 Improve callsign lookup, caching & recent details
Add a cached DXCC lookup and a jsondxcc endpoint to speed up country resolution and reduce DB load (file-cache with 1h TTL). Introduce cached_dxcc_lookup(), build_confirmation_where(), and callsign_status() in the Logbook controller; refactor confirmed_grid_before() and worked_grid_before() to accept logbook relationships and confirmation prefs to avoid redundant queries. Use a new Logbook_model::get_recent_callsign_details() to populate recent name/gridsquare/qth/iota/qsl/state/county values in a single query. Update JS to better manage lookup state, invalidate in-flight requests, and perform a debounced quick DXCC lookup to improve UX. Tweak previous-contacts pagination to a compact sliding window and remove a redundant UI note.
2026-04-13 13:57:03 +01:00
Peter Goodhall
12f20780dc Hide empty partial view and load DXX summary
Hide the #partial_view container by default and only reveal the previous-contacts panel when it contains non-empty HTML. Invoke getDxccResult after injecting the partial result so the DXX summary is fetched and displayed. Add handling to reset QSO fields and switch back to the Previous Contacts tab when the callsign is cleared, and remove duplicated/unused code in the callsign focusout handler. This prevents showing an empty lookup panel and cleans up the logic around loading lookup details.
2026-04-10 14:00:55 +01:00
Peter Goodhall
da5fa486d8 Update htmx target IDs in previous contacts
Rename the container id from "qso-last-table" to "qso-last-table-content" and update all pagination links' hx-target attributes accordingly. This ensures htmx swaps and the 5s auto-refresh target the correct element for the previous contacts component.
2026-04-07 10:04:15 +01:00
Peter Goodhall
d4251cdf41 Add no-cache headers and localize HTMX polling
Prevent caching for the HTMX endpoint and move polling into the component. Qso controller now sets Cache-Control/Pragma/Expires headers for the component_past_contacts endpoint to ensure fresh data. The previous_contacts view was updated to self-poll (hx-get with page param, hx-trigger every 5s, hx-target="this", and hx-vals timestamp) to include a cache-busting timestamp. The main qso index removed the redundant recurring poll (now only triggers on load) to avoid duplicate requests.
2026-04-06 16:04:26 +01:00
Peter Goodhall
5d7135124d Add AJAX QSO save endpoint and client handler
Introduce an AJAX-based QSO save flow: add QSO::ajax_saveqso() in the controller to validate input, set session/cookies, create the QSO and return JSON success/error payloads. Update the QSO view to include a data-ajax-save-url on the form and add a notice-alerts container location. Enhance the qso.js client: add isSubmitting guard, showQsoNotice helper, intercept form submit to POST serialized form data to the AJAX endpoint, handle success (reset form, show notice, refresh recent QSOs via htmx), display validation/server errors, and restore UI state when complete. These changes avoid full page reloads on save and provide inline validation feedback.
2026-04-05 17:36:52 +01:00
Peter Goodhall
950f5a37b0 Improve DX Cluster status badge and JS state handling
Replace plain text status with a badge containing an icon and tooltip in the DX Cluster tab (increase font-size to 0.85rem and set cursor to default). Update setStatus() to drive the icon class and tooltip text via a stateMap for common states (Connected, Connecting..., Reconnecting..., Error, Disconnected), set the badge class, and update both title and data-bs-original-title for Bootstrap tooltip compatibility. Adds a fallback for unknown states.
2026-03-29 14:02:23 +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
107bbb3572 Use sanitized $manual variable instead of $_GET
Read and cast the manual mode once into $manual using $this->input->get(...) with a default of 0, and replace all direct $_GET['manual'] usages with $manual. Updates include the JavaScript qso_manual value, form action and resetTimers call, and multiple conditional checks and disabled attributes to improve input handling and consistency. Also ensures EOF newline is present.
2026-03-29 13:47:54 +01:00
Peter Goodhall
cee6cd2def Refactor DXCC checks; add CW RBN lock UI
Replace inline DB queries in Dxcluster with a new Logbook_model::check_if_dxcc_worked_in_logbook method to centralize DXCC existence checks (per-band and overall). Remove several debug log statements from Dxcluster. Add client-side logic in dxcluster and qso views to enforce a CW↔RBN rule: when mode is 'cw' the "hide RBN" option is forced off and the checkbox is disabled (and restored when leaving CW), and apply that lock on load and mode changes. Also disable track-band when the user manually changes band in the QSO cluster UI.
2026-03-29 13:37:16 +01:00
Peter Goodhall
3d9e466b76 Add mode and new DXCC filters; extract DX utils
Add UI controls for mode and "New DXCC" filtering to the DX Cluster and QSO views, persist selections in localStorage, and wire them into existing spot filtering and rendering logic (including auto-unhide of RBN when CW is selected). Extract shared helper functions into a new assets/js/dxcluster-utils.js (DXCluster) providing isRbnSpot, getBandFromFrequency, detectModeFromFrequency, and detectMode, and update views to use these helpers. Also adjust badge logic to prioritize truly new DXCC, include the new script, and ensure spots are held until worked status is known for new/DXCC-band filtering.
2026-03-29 11:31:31 +01:00
Peter Goodhall
fab643fe5d Preserve pagination when redrawing DataTable
Change DataTables draw() call to draw(false) so the table is redrawn without resetting the current page. This keeps the user's pagination position after updates in application/views/qso/index.php.
2026-03-28 14:11:58 +00:00
Peter Goodhall
60fdf5a57b Send QSY command to selected radio
When a spot is selected on the QSO page, if a radio is chosen (radio != '0') the code now posts a QSY request to the dxcluster/qsy endpoint. The frequency is converted to MHz with 3 decimals and included as radio_id and frequency in a JSON body; if the spot is from RBN and marked CW the mode='CW' is also sent. The fetch is non-blocking and errors are silently ignored. This brings the QSO page behavior in line with the main DX Cluster page by automatically tuning a selected radio to the spotted frequency.
2026-03-28 10:39:14 +00:00
Peter Goodhall
6a9a63297c Tighten RBN detection and optimize table render
Refine RBN skimmer detection and avoid unnecessary DOM redraws when the DX Cluster tab is hidden. isRbn now requires a literal '#' suffix rather than any trailing digits to prevent false positives. renderTable skips re-rendering if the cluster pane is not active, and the tab-visibility handler now calls renderTable before syncing the band filter and adjusting column widths so spots received while hidden are shown when the tab becomes visible.
2026-03-27 22:37:59 +00:00
Peter Goodhall
5fc7db65eb Add 'Track Band' option to cluster view
Add a 'Track Band' checkbox to the cluster controls and wire up state and persistence. Introduces a trackBand flag (default false), stores the setting in localStorage ('cloudlog_clusterTrackBand'), restores the state on init, and listens for changes to enable/disable band tracking. When disabled the band filter is reset to 'all'; when enabled it syncs the cluster band from the selected radio. Also prevents syncBandFromRadio from running when tracking is off.
2026-03-27 22:32:11 +00:00
Peter Goodhall
ac23397727 Add DX Cluster tab to QSO interface
Introduce a DX Cluster tab to the QSO view and user settings. This change:

- Enables a new qso_form option 'dxcluster_tab' in controllers (Qso.php, User.php) so the tab can be toggled per-user.
- Adds a user preference toggle in the user edit view to show/hide the DX Cluster tab.
- Implements the DX Cluster UI in the QSO index view: tab button, controls (band select, hide RBN), spot table and click-to-fill behavior.
- Adds client-side JS to manage a WebSocket to wss://dxc.cloudlog.org, maintain and render recent spots in a DataTable, persist filter preferences, sync band selection with the QSO form/radio, and batch-check worked status via the dxcluster/check_worked endpoint.

Files changed: application/controllers/Qso.php, application/controllers/User.php, application/views/qso/index.php, application/views/user/edit.php.
2026-03-27 22:29:25 +00:00
Peter Goodhall
3ca2478553 Use DOMContentLoaded and guard selectize
Replace jQuery $(function() {}) with document.addEventListener('DOMContentLoaded') in the QSO view and harden selectize usage in assets/js/sections/qso.js. Add existence checks (for elements and selectize instances) before accessing .selectize to avoid null/undefined dereferences, and consolidate selectize clearing logic. These changes improve robustness when selectize or jQuery readiness assumptions aren't met and prevent runtime errors.
2026-03-27 21:40:23 +00:00
Peter Goodhall
70f5c81b29 Respect hidden DOK field and guard Selectize
Always render the DOK field wrapper but mark it with data-user-hidden when the field is disabled for the user, and make toggleDokField skip showing the field in that case. Add defensive checks around Selectize accesses in assets/js/sections/qso.js (ensure $select[0] exists and dok_selectize is non-null before calling methods) to avoid JS errors when the DOK input is absent or not initialized. Changes touch application/views/qso/index.php and assets/js/sections/qso.js to prevent runtime errors and correctly honor user-hidden DOK configuration.
2026-03-27 19:34:24 +00:00
Peter Goodhall
0e631c2de1 Trigger DXCC change handlers on programmatic updates
Call toggleDokField()/toggleUsaFields() on jQuery ready and ensure programmatic updates to #dxcc_id fire change handlers. Replaced the previous DOMContentLoaded init with a jQuery $(function()) call to initialise the toggle state, added .trigger('change') where #dxcc_id is set programmatically, and invoke the toggle functions from the dxcc change handler to keep UI fields in sync.
2026-03-27 18:18:17 +00:00
Peter Goodhall
20570ba343 Add configurable QSO form field visibility
Introduce per-user visibility settings for QSO form fields and tabs. Load qso_form options in QSO and User controllers (with sensible defaults), apply them to the qso view to conditionally render fields/tabs, and save changes from the user edit form. Add a QSO Form accordion in user/edit.php exposing switches for each field/tab, update user save logic to persist each option, and include client-side JS in qso/index.php to toggle USA state/county and DOK fields based on DXCC selection. Files changed: application/controllers/Qso.php, application/controllers/User.php, application/views/qso/index.php, application/views/user/edit.php.
2026-03-27 18:11:22 +00:00
Peter Goodhall
d847e4819e Add pagination and DXCC tab to previous QSOs
Implement server-side pagination for previous contacts and add a DXCC Summary tab. Controller Qso now uses last_custom_paginated and exposes total_rows/total_pages/current_page/limit. Logbook_model gained last_custom_paginated and last_custom_count to support paged queries. The previous_contacts view was updated with HTMX pagination controls and wrapping for a scrollable table; qso/index was refactored to a tabbed UI (Previous Contacts / DXCC Summary). Lookup result display was improved: responsive table, sticky header, consolidation of LSB/USB into SSB and filtering out empty modes. JS and CSS updates load DXCC HTML into the new tab, hide legacy dxccsummary elements, and add form reset / Escape handling to return focus to the previous contacts tab.
2026-03-26 22:26:47 +00:00
Peter Goodhall
894d9af38f Add Call History upload and lookup feature
Introduce a new Call History feature: adds Callhistory controller, Callhistory_model, migration (create callhistory_files table) and view for uploading/managing call history files. Implements CSV/TXT upload handling, storage per-user, activation/priority controls, checksum, and server-side lookup that scans active files for matching callsigns. Integrates UI: header menu link, contesting and QSO views show call history results inline, and JavaScript to perform lookups and render results with copy-to-SIG functionality. Also updates .gitignore to exclude uploaded callhistory directory and bumps migration_version to 261.
2026-03-24 22:36:54 +00:00
Peter Goodhall
b6b596d3c1 Handle callsign correction with selective overwrite approval
Keep callsign lookup retriggered on correction while preventing silent data loss.

Add a Bootstrap modal that lists conflicting fields and allows keep existing, replace selected, or replace all.

Fix stale lookup race handling with request IDs and correct callsign comparison guard to avoid assignment bug.

Make callsign-change resets non-destructive for user-entered fields while still refreshing DXCC/metadata and past-QSO context.
2026-03-23 23:06:17 +00:00
Peter Goodhall
20a8f28cfb Update badge tooltip for manual mode switch
Changed the tooltip text for the LIVE badge from 'Switch to POST mode' to 'Switch to Manual mode' to better reflect the action performed when switching modes.
2025-12-12 18:04:47 +00:00
Peter Goodhall
43cd95dc65 Adjust badge size and padding in QSO index view
Reduced the font size and padding of the LIVE and POST mode badges for a more compact appearance in the QSO index page.
2025-12-12 18:04:12 +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
c11ec97526 Add mode switch to LIVE/POST badges and update menu
LIVE and POST badges in contesting and QSO views are now clickable to switch modes. Redundant menu items for post QSO and contest logging have been removed from the header for a cleaner navigation.
2025-11-18 11:46:28 +00:00
Peter Goodhall
1ffc695e8d Add satellite name and mode autocomplete to QSO edit
Enhanced the QSO edit dialog to use datalist autocompletion for satellite name and mode fields. Satellite data is loaded from JSON, and selecting a satellite/mode updates related frequency, band, and propagation fields automatically.
2025-11-17 17:12:04 +00: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
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
97195690b2 Integrate DX Cluster bandmap with QSO and layout
Refactored Dxcluster controller to use header and footer layouts. Removed standalone HTML structure from dxcluster/index.php to fit within the site layout. Added 'Open Bandmap' button and supporting JavaScript to qso/index.php for easier access to the bandmap from the QSO page.
2025-10-02 21:43:35 +01:00
copilot-swe-agent[bot]
db239bf0a3 Fix QSO form to use user's preferred date format instead of hardcoded d-m-Y
Co-authored-by: magicbug <84308+magicbug@users.noreply.github.com>
2025-07-30 21:24:34 +00:00
Peter Goodhall
978bdbf76b Wiring for Cloudlog Aurora Winkey Websocket Support 2025-05-28 14:24:03 +01:00
Peter Goodhall
83dd417539 [QSO] Adds Select Radio under the map 2024-12-06 15:07:52 +00:00
phl0
cc46e713e0
Add live/post QSO markers 2024-03-27 18:33:23 +01:00