Browse Source

Fix geocache title and icon fields visibility

The title and icon fields were not showing when creating new geocaches.
Added the missing logic to show these fields for new caches.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
master
HikeMap User 1 month ago
parent
commit
27a18a8320
  1. 14
      index.html

14
index.html

@ -2294,6 +2294,20 @@
// Clear previous messages
messagesDiv.innerHTML = '';
// Update dialog title
dialogTitle.textContent = geocache.title ? `📍 ${geocache.title}` : '📍 Geocache';
// Show/hide title and icon inputs for new geocaches
if (isNew && !geocache.title) {
titleGroup.style.display = 'block';
iconGroup.style.display = 'block';
titleInput.value = '';
iconInput.value = geocache.icon || 'package-variant';
} else {
titleGroup.style.display = 'none';
iconGroup.style.display = 'none';
}
// Check if user can view messages (within 5m in nav mode, or in edit mode)
const canViewMessages = !navMode || userDistance <= adminSettings.geocacheRange;

Loading…
Cancel
Save