Commit graph

94 commits

Author SHA1 Message Date
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
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
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
8716e6caae Clear satellite fields when not SAT and on reset
Ensure satellite fields are cleared whenever propagation mode is not 'SAT' and when the QSO form is reset. In Qso.php, sat_name and sat_mode are set to empty strings if prop_mode != 'SAT' (added in two handling points). In assets/js/sections/qso.js, added clearSatelliteFields() to clear sat_name, sat_mode, satellite_modes_list and related state, call it from reset_fields(), and invoke the form reset flow to ensure no stale satellite data remains after resetting or changing propagation mode.
2026-04-06 14:37:56 +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
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
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
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
b368cba876 Enforce write permissions for QSO modifications
Replaced checks for QSO accessibility with stricter write permission checks across controllers and models. Added a new check_qso_is_writable method to Logbook_model to ensure only authorized users can modify or delete QSOs, including shared logbook scenarios. Updated QSO, Qsl_model, and Sstv_model to use the new permission logic for all write operations.
2025-12-23 11:06:19 +00:00
Peter Goodhall
aa5ff3ac11 Use active station profile in QSO controller
Replaced usage of session 'station_profile_id' with the active station profile ID retrieved from the stations model. Improved error handling and messaging when no active station profile is set. This ensures consistency and accuracy when accessing or updating station-specific data.
2025-10-10 18:01:31 +01:00
Peter Goodhall
17d9ef6aa9 Set controller methods to public visibility
Changed several controller methods in Qso.php from implicit or default visibility to explicit 'public' for better clarity and consistency. Also fixed indentation in cwmacrosave for improved readability.
2025-10-10 15:38:24 +01:00
Peter Goodhall
134f9a4995 Remove redundant return statement in Qso controller
Eliminated an unnecessary return statement after sending a JSON response in the Qso controller, improving code clarity.
2025-10-10 15:26:40 +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
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
phl0
74d37b1e22
Allow 10-digit grid in QSO input 2023-12-13 07:13:55 +01:00
Peter Goodhall
79bb03ac92
Merge pull request #2746 from int2001/bandmode_validate
Check if Band/Mode is provided.
2023-11-29 22:14:22 +00:00
int2001
9831934ff0
Check if Band/Mode is provided. Sometimes there are hiccups where Band/Mode is not given 2023-11-29 18:32:42 +00:00
abarrau
d3a1f9ab76 eQSL default msg add function (english lang) 2023-11-29 14:17:58 +01:00
phl0
973d76eeb5
Add option to log QSO end times separately
Squashed commit of the following:

commit 595f620d9e
Author: phl0 <github@florian-wolters.de>
Date:   Wed Nov 1 13:58:05 2023 +0100

    Update languages

commit f670a06059
Author: phl0 <github@florian-wolters.de>
Date:   Wed Nov 1 13:55:04 2023 +0100

    Added user option for enabling QSO end time logging

commit 36d9a95ebb
Merge: 54d5bb53 352931b1
Author: phl0 <github@florian-wolters.de>
Date:   Wed Nov 1 12:18:39 2023 +0100

    Merge branch 'dev' into qsoTime

commit 54d5bb535b
Author: phl0 <github@florian-wolters.de>
Date:   Fri Oct 27 10:14:58 2023 +0200

    start/end times for other languages

commit c5f6bb0cab
Author: phl0 <github@florian-wolters.de>
Date:   Fri Oct 27 10:14:42 2023 +0200

    Hide end time if only differs in seconds as we only display minutes
    anyway ...

commit d519d88604
Author: phl0 <github@florian-wolters.de>
Date:   Fri Oct 27 10:14:29 2023 +0200

    use start as end time if end is not set separately

commit f2588ad132
Author: phl0 <github@florian-wolters.de>
Date:   Fri Oct 27 10:13:43 2023 +0200

    reset timers on form reset

commit 2b7ee4e48c
Author: phl0 <github@florian-wolters.de>
Date:   Fri Oct 27 10:13:27 2023 +0200

    Strip seconds from session time variable

commit e0c35aa0cf
Author: phl0 <github@florian-wolters.de>
Date:   Fri Oct 27 10:13:11 2023 +0200

    Adapt contest logging

commit 5368ef25f3
Author: phl0 <github@florian-wolters.de>
Date:   Fri Oct 27 10:12:50 2023 +0200

    Make date field a little smaller

commit ad2d7e756c
Author: phl0 <github@florian-wolters.de>
Date:   Fri Oct 27 10:12:30 2023 +0200

    Add button to reset start time

commit f56e031946
Author: phl0 <github@florian-wolters.de>
Date:   Fri Oct 27 10:11:09 2023 +0200

    Copy start to end time on focus out

commit b741d0428d
Author: phl0 <github@florian-wolters.de>
Date:   Fri Oct 27 10:10:45 2023 +0200

    Only min and sec for post QSO template

commit 77314edd31
Author: phl0 <github@florian-wolters.de>
Date:   Fri Oct 27 10:08:49 2023 +0200

    Basics for QSO end time logging
2023-11-01 14:24:13 +01:00
phl0
886829ba42
Rename default band and confirmation values in DB 2023-10-16 22:39:33 +02:00
phl0
190d3cb0fd
Generalize band and also use in QSO entry 2023-10-15 21:08:45 +02:00
int2001
3b7dbffe24
Added Operatorcallsign to add QSO 2023-08-20 14:36:14 +00:00
Peter Goodhall
473532c6b3 [QSO] Reloads previous contacts table every 5s this means that any incoming QSOs from API or a different browser is shown 2023-08-17 13:59:18 +01:00
Peter Goodhall
2f4107c1c2
Merge branch 'dev' into winkeytest 2023-08-01 16:24:33 +01:00
Peter Goodhall
9ddcb70588 Return macros as json 2023-08-01 11:40:32 +01:00
Peter Goodhall
43bacdc62a Save and Update Macros from the Database 2023-07-31 15:52:32 +01:00
int2001
ef65d6a7c4
check if qso belongs to user when deleting/requesting/confirming QSOs/QSLs 2023-07-31 05:03:05 +00:00
Peter Goodhall
96a747e15c Change to interface for CW settings 2023-05-17 21:19:18 +01:00
Peter Goodhall
4ec722236e Cleaned up the UI added a settings popup modal 2023-05-15 15:35:11 +01:00
phl0
846dec0f61
Add POTA lookup function 2023-05-01 21:14:30 +02:00
phl0
75ac1b2620
Add option for default station power 2023-04-27 23:02:57 +02:00
phl0
034fa625fb
Add support for POTA fields according to ADIF update 2022-11-30 15:38:40 +01:00
phl0
e67435d497
Add lookup function for grid and name for WWFF refs 2022-10-19 14:52:43 +02:00
phl0
6bfdd8a3d5
Hide SAT stuff if SAT band is disabled 2022-10-05 23:23:32 +02:00
phl0
65189d07ca
Basic POTA support 2022-10-05 17:05:53 +02:00
Andreas
6b4a09d653 [Bands] Editing QSO now fetches bands from DB. Includes also disabled bands. 2022-09-09 23:11:52 +02:00
Andreas
be72a332b6 [Bands] QSO entry band/bandrx dropdown is now fetched from db 2022-09-08 20:12:11 +02:00
Peter Goodhall
59803766d0
Merge pull request #1569 from phl0/refactorWWFF
Separate WWFF stuff into separate fields
2022-08-24 16:01:07 +01:00
Alessio Caiazza
4cbe4b3a11 Extract a SOTA library from QSO controller
SOTA functions are implemented inside the QSO controller, moving this
implementation into a dedicated library will simplify code reuse.
2022-08-17 22:15:06 +02:00
phl0
66f70af2c4
Add separate input field for WWFF info 2022-08-15 16:04:33 +02:00
Ondřej Nový
e3ceb8ba62 Fix convent_band -> convert_band typo 2022-07-09 20:15:57 +02:00
Peter Goodhall
22d5dbdb05 Update Qso.php 2022-04-01 16:06:04 +01:00
Peter Goodhall
9f774c8eac [Gridsquare Validation] when doing 6 char grids it errored
Regex stopped looking at chars after R
2022-04-01 16:04:06 +01:00
phl0
c5ff0df369
Implement validation check for grid locator input 2022-03-28 12:41:14 +02:00
Peter Goodhall
bfe1b38c86 [QSO] Fixed issue with bearing lookups with VUCC Grids 2022-02-18 13:46:16 +00:00
Thomas Werzmirzowsky
9a5b136351 added "mark qsl sent" options to qso cog menu 2021-11-16 13:58:15 +00:00
Thomas Werzmirzowsky
6f39ce940f - QSO create/edit check that station belongs to user
- QSO form only shows stations of user
2021-10-31 10:25:35 +01:00