@@ -111,7 +111,7 @@ const MESHMAPPER_RX_LOG_API_URL = "https://yow.meshmapper.net/wardriving-api.php
111111
112112// Geo-Fenced Auth API Configuration (Placeholder URLs)
113113const GEO_AUTH_ZONES_STATUS_URL = "{{API_URL}}/zones/status" ; // Preflight: Check zone status before connect
114- const GEO_AUTH_POST_URL = "{{API_URL}}/auth" ; // Auth: Request connection token after BLE pairing
114+
115115
116116// Static for now; will be made dynamic later.
117117const WARDIVE_IATA_CODE = "YOW" ;
@@ -723,18 +723,12 @@ function setConnectButton(connected) {
723723 */
724724function setConnStatus ( text , color ) {
725725 const connectionStatusEl = document . getElementById ( "connectionStatus" ) ;
726- const statusIndicatorEl = document . getElementById ( "statusIndicator" ) ;
727726
728727 if ( ! connectionStatusEl ) return ;
729728
730729 debugLog ( `[UI] Connection status: "${ text } "` ) ;
731730 connectionStatusEl . textContent = text ;
732731 connectionStatusEl . className = `font-medium ${ color } ` ;
733-
734- // Update status indicator dot color to match
735- if ( statusIndicatorEl ) {
736- statusIndicatorEl . className = `text-lg ${ color } ` ;
737- }
738732}
739733
740734/**
@@ -1332,59 +1326,6 @@ async function checkZoneStatus() {
13321326 }
13331327}
13341328
1335- /**
1336- * Post auth request (placeholder - actual implementation commented out)
1337- * This will be called after BLE pairing to request a session token
1338- *
1339- * See docs/GEO_AUTH_DESIGN.md for full auth flow specification.
1340- * To enable: uncomment fetch() call and remove console.debug() simulation.
1341- *
1342- * @param {object } coords - GPS coordinates {lat, lon, accuracy, timestamp}
1343- * @returns {Promise<boolean> } True if auth successful (currently simulated)
1344- */
1345- async function postAuthRequest ( coords ) {
1346- debugLog ( "[GEOFENCE] postAuthRequest called (commented out implementation)" ) ;
1347-
1348- const payload = {
1349- public_key : state . devicePublicKey ,
1350- who : getDeviceIdentifier ( ) ,
1351- ver : APP_VERSION ,
1352- reason : "connect" ,
1353- coords : {
1354- lat : coords . lat ,
1355- lng : coords . lon ,
1356- accuracy_m : coords . accuracy ,
1357- timestamp : Math . floor ( coords . timestamp / 1000 )
1358- }
1359- } ;
1360-
1361- console . debug ( `[GEOFENCE] Auth POST payload (simulated):` , payload ) ;
1362- console . debug ( `[GEOFENCE] Auth POST target URL: ${ GEO_AUTH_POST_URL } ` ) ;
1363-
1364- /* Uncomment when backend is ready:
1365- const response = await fetch(GEO_AUTH_POST_URL, {
1366- method: "POST",
1367- headers: { "Content-Type": "application/json" },
1368- body: JSON.stringify(payload)
1369- });
1370-
1371- if (!response.ok) throw new Error(`Auth API returned status ${response.status}`);
1372-
1373- const data = await response.json();
1374- if (data.allowed) {
1375- state.authToken = data.token;
1376- state.wardriveSessionId = data.session_id;
1377- debugLog(`[GEOFENCE] Auth successful: session_id=${data.session_id}`);
1378- return true;
1379- }
1380- debugWarn(`[GEOFENCE] Auth denied: ${data.reason || 'unknown'}`);
1381- return false;
1382- */
1383-
1384- debugLog ( "[GEOFENCE] Simulated auth success (actual request commented out)" ) ;
1385- return true ;
1386- }
1387-
13881329// ---- Key Derivation ----
13891330/**
13901331 * Derives a 16-byte channel key from a hashtag channel name using SHA-256.
0 commit comments