-
🔐
+
Sign In
@@ -2001,14 +2012,14 @@
AppState.gpsAcc = pos.coords.accuracy;
const badge = document.getElementById('gpsBadge');
badge.className = 'gps-badge ok';
- badge.textContent = `📍 ${AppState.gpsLat.toFixed(4)}, ${AppState.gpsLng.toFixed(4)}`;
+ badge.innerHTML = gi('📍') + ` ${AppState.gpsLat.toFixed(4)}, ${AppState.gpsLng.toFixed(4)}`;
resolve(pos);
},
err => {
const badge = document.getElementById('gpsBadge');
badge.className = 'gps-badge err';
- if (err.code === 1) badge.textContent = '📍 Tap for GPS';
- else badge.textContent = '📍 ' + err.message;
+ if (err.code === 1) badge.innerHTML = gi('📍') + ' Tap for GPS';
+ else badge.innerHTML = gi('📍') + ' ' + err.message;
reject(err);
},
{ enableHighAccuracy: true, timeout: 15000, maximumAge: 300000 }
@@ -2020,7 +2031,7 @@
const badge = document.getElementById('gpsBadge');
if (!navigator.geolocation) {
badge.className = 'gps-badge err';
- badge.textContent = '📍 Unavailable';
+ badge.innerHTML = gi('📍') + ' Unavailable';
badge.style.cursor = 'default';
return;
}
@@ -2028,13 +2039,13 @@
updateGpsBadge();
badge.style.cursor = 'pointer';
badge.onclick = function() {
- badge.textContent = '📍 Locating...';
+ badge.innerHTML = gi('📍') + ' Locating...';
requestLocation().then(() => {
updateGpsBadge();
// Re-enable for next re-capture
badge.onclick = arguments.callee;
}).catch(() => {
- badge.textContent = '📍 Tap to retry';
+ badge.innerHTML = gi('📍') + ' Tap to retry';
badge.onclick = arguments.callee;
});
};
@@ -2048,10 +2059,10 @@
const badge = document.getElementById('gpsBadge');
if (AppState.gpsLat != null) {
badge.className = 'gps-badge ok';
- badge.textContent = `📍 ${AppState.gpsLat.toFixed(4)}, ${AppState.gpsLng.toFixed(4)}`;
+ badge.innerHTML = gi('📍') + ` ${AppState.gpsLat.toFixed(4)}, ${AppState.gpsLng.toFixed(4)}`;
} else {
badge.className = 'gps-badge waiting';
- badge.textContent = '📍 Tap for GPS';
+ badge.innerHTML = gi('📍') + ' Tap for GPS';
}
}
@@ -2524,7 +2535,7 @@
console.error('Camera error:', e);
setScanStatus('Camera failed: ' + e.message, 'error');
const ph = document.getElementById('cameraPlaceholder');
- if (ph) ph.innerHTML = `
📷Camera: ${e.message}
`;
+ if (ph) ph.innerHTML = `
${gi("📷")}Camera: ${e.message}
`;
}
}
@@ -2539,7 +2550,7 @@
const ph = document.getElementById('cameraPlaceholder');
if (ph) {
ph.style.display = '';
- ph.innerHTML = '
📷Tap to start camera
';
+ ph.innerHTML = '
' + gi('📷') + 'Tap to start camera
';
}
}
@@ -2659,23 +2670,23 @@
const coords = document.getElementById('checkinGpsCoords');
if (AppState.gpsLat != null) {
status.className = 'gps-badge ok';
- status.textContent = '📍 GPS locked';
+ status.innerHTML = gi('📍') + ' GPS locked';
coords.textContent = `${AppState.gpsLat.toFixed(4)}, ${AppState.gpsLng.toFixed(4)} (±${Math.round(AppState.gpsAcc || 0)}m)`;
coords.style.display = 'inline';
} else {
status.className = 'gps-badge waiting';
- status.textContent = '📍 Tap for GPS';
+ status.innerHTML = gi('📍') + ' Tap for GPS';
coords.style.display = 'none';
}
}
function captureCheckinGps() {
const status = document.getElementById('checkinGpsStatus');
- status.textContent = '📍 Locating...';
+ status.innerHTML = gi('📍') + ' Locating...';
status.className = 'gps-badge waiting';
if (!navigator.geolocation) {
status.className = 'gps-badge err';
- status.textContent = '📍 Unavailable';
+ status.innerHTML = gi('📍') + ' Unavailable';
showToast('GPS not available on this device', true);
return;
}
@@ -2691,10 +2702,10 @@
err => {
status.className = 'gps-badge err';
if (err.code === 1) {
- status.textContent = '📍 Permission denied — tap to retry';
+ status.innerHTML = gi('📍') + ' Permission denied — tap to retry';
showToast('Please allow GPS access in your browser settings', true);
} else {
- status.textContent = '📍 ' + err.message;
+ status.innerHTML = gi('📍') + ' ' + err.message;
showToast('GPS error: ' + err.message, true);
}
},
@@ -2871,7 +2882,7 @@
const badge = document.getElementById('ocrGpsBadge');
if (badge) {
badge.style.display = 'block';
- badge.textContent = '📍 GPS: ' + data.exif_gps.lat.toFixed(6) + ', ' + data.exif_gps.lng.toFixed(6);
+ badge.innerHTML = gi('📍') + ' GPS: ' + data.exif_gps.lat.toFixed(6) + ', ' + data.exif_gps.lng.toFixed(6);
}
showToast('📍 GPS extracted from photo: ' + data.exif_gps.lat.toFixed(6) + ', ' + data.exif_gps.lng.toFixed(6));
}
@@ -2923,14 +2934,14 @@
longitude: AppState.gpsLng,
}),
});
- el.innerHTML += `
📍 GPS location saved to asset
`;
+ el.innerHTML += `
${gi("📍")} GPS location saved to asset
`;
} catch (_) {}
}
} else {
- el.innerHTML += `
📍 GPS not available — check-in skipped
`;
+ el.innerHTML += `
${gi("📍")} GPS not available — check-in skipped
`;
}
if (AppState.ocrGpsSaved) {
- el.innerHTML += `
📍 GPS saved to asset
`;
+ el.innerHTML += `
${gi("📍")} GPS saved to asset
`;
AppState.ocrGpsSaved = false;
}
el.innerHTML += `
@@ -4116,15 +4127,15 @@
lockBtn.onclick = toggleGpsLock;
if (hasGps) {
- infoEl.textContent = '📍 GPS coordinates on file — click 🔒 to unlock and edit';
- lockBtn.textContent = '🔒';
+ infoEl.innerHTML = gi('📍') + ' GPS coordinates on file — click ' + gi('🔒') + ' to unlock and edit';
+ lockBtn.innerHTML = gi('🔒');
lockBtn.className = 'gps-lock-btn';
lockBtn.title = 'GPS is locked — click to edit';
saveBtn.style.display = 'none';
statusEl.textContent = '';
} else {
- infoEl.textContent = '📍 No GPS data — tap the map to set coordinates';
- lockBtn.textContent = '🔓';
+ infoEl.innerHTML = gi('📍') + ' No GPS data — tap the map to set coordinates';
+ lockBtn.innerHTML = gi('🔓');
lockBtn.className = 'gps-lock-btn unlocked';
lockBtn.title = 'Editable — tap lock to disable editing';
statusEl.textContent = 'Editable';
@@ -4203,19 +4214,19 @@
_gpsState.unlocked = !_gpsState.unlocked;
if (_gpsState.unlocked) {
- lockBtn.textContent = '🔓';
+ lockBtn.innerHTML = gi('🔓');
lockBtn.className = 'gps-lock-btn unlocked';
lockBtn.title = 'Click to lock GPS';
saveBtn.style.display = '';
statusEl.textContent = 'Editable — drag the marker or tap the map';
- infoEl.textContent = '📍 Drag the marker or click the map to set GPS position';
+ infoEl.innerHTML = gi('📍') + ' Drag the marker or click the map to set GPS position';
} else {
- lockBtn.textContent = '🔒';
+ lockBtn.innerHTML = gi('🔒');
lockBtn.className = 'gps-lock-btn';
lockBtn.title = 'GPS is locked — click to edit';
saveBtn.style.display = 'none';
statusEl.textContent = 'Locked';
- infoEl.textContent = '📍 GPS position is locked — click 🔒 to edit';
+ infoEl.innerHTML = gi('📍') + ' GPS position is locked — click ' + gi('🔒') + ' to edit';
}
// Update marker draggability
@@ -4249,12 +4260,12 @@
// Re-lock
_gpsState.unlocked = false;
const lockBtn = document.getElementById('detailGpsLockBtn');
- lockBtn.textContent = '🔒';
+ lockBtn.innerHTML = gi('🔒');
lockBtn.className = 'gps-lock-btn';
lockBtn.title = 'GPS is locked — click to edit';
document.getElementById('detailGpsSaveBtn').style.display = 'none';
document.getElementById('detailGpsStatus').textContent = 'Locked';
- document.getElementById('detailGpsInfo').textContent = '📍 GPS coordinates saved';
+ document.getElementById('detailGpsInfo').innerHTML = gi('📍') + ' GPS coordinates saved';
if (_gpsState.marker) {
_gpsState.marker.dragging.disable();
}
@@ -4502,12 +4513,12 @@
AppState.gpsLat = pos.coords.latitude;
AppState.gpsLng = pos.coords.longitude;
AppState.gpsAcc = pos.coords.accuracy;
- if (btn) { btn.textContent = '📍 Got location! ✓'; btn.disabled = false; }
+ if (btn) { btn.innerHTML = gi('📍') + ' Got location! ' + gi('✅') + ''; btn.disabled = false; }
setTimeout(updateNavSetup, 500);
showToast('📍 Location acquired');
},
() => {
- if (btn) { btn.textContent = '📍 Get My Location'; btn.disabled = false; }
+ if (btn) { btn.innerHTML = gi('📍') + ' Get My Location'; btn.disabled = false; }
showToast('GPS failed — check permissions', true);
},
{ enableHighAccuracy: true, timeout: 15000 }
@@ -4613,7 +4624,7 @@
document.getElementById('checkinCount').textContent = checkins.length ? '(' + checkins.length + ')' : '';
const el = document.getElementById('checkinHistory');
if (!checkins.length) {
- el.innerHTML = '
📋 No check-ins yet
Check in from the Add Asset tab
';
+ el.innerHTML = '
' + gi('📋') + ' No check-ins yet
Check in from the Add Asset tab
';
return;
}
el.innerHTML = checkins.map(c => `
@@ -5513,7 +5524,7 @@
// ── Reorder ───────────────────────────────────────────────────────────
function rpToggleReorder() {
rpState.isReordering = !rpState.isReordering;
- document.getElementById('rpReorderToggle').textContent = rpState.isReordering ? '✅ Done' : '↕️ Reorder';
+ document.getElementById('rpReorderToggle').innerHTML = rpState.isReordering ? gi('✅') + ' Done' : gi('↕️') + ' Reorder';
const stops = document.getElementById('rpStopList');
if (rpState.isReordering) {
stops.querySelectorAll('.stop-item').forEach((el, i) => {
@@ -5531,7 +5542,7 @@
route.splice(to, 0, item);
rpDisplayRoute(rpState.currentRoute, null);
rpState.isReordering = true;
- document.getElementById('rpReorderToggle').textContent = '✅ Done';
+ document.getElementById('rpReorderToggle').innerHTML = gi('✅') + ' Done';
stops.querySelectorAll('.stop-item').forEach(el => el.draggable = true);
};
});
@@ -5557,7 +5568,7 @@
navigator.clipboard.writeText(text).then(() => {
// brief flash feedback
const btn = document.querySelector('[onclick="rpCopyText()"]');
- if (btn) { btn.textContent = '✅ Copied!'; setTimeout(() => btn.textContent = '📋 Copy', 4000); }
+ if (btn) { btn.innerHTML = gi('✅') + ' Copied!'; setTimeout(() => btn.innerHTML = gi('📋') + ' Copy', 4000); }
}).catch(() => {
// fallback
const ta = document.createElement('textarea');
@@ -5591,11 +5602,31 @@
}
}
+
+ // Game-icons SVG helper for dynamic content
+ function gi(name) {
+ const map = {
+ '📍': '
',
+ '🔒': '