Browse Source

Fix showStatus not defined error in push notifications

- Changed showStatus() to updateStatus() in 3 places
- Added proper status types ('success', 'info') for notifications
- Fixes ReferenceError when enabling/disabling push notifications

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
master
HikeMap User 1 month ago
parent
commit
a29b4c3b1b
  1. 7
      default.kml
  2. 6
      index.html

7
default.kml

@ -1157,5 +1157,12 @@
<coordinates>-97.83907704055311,30.525208652590603,0 -97.83941393866158,30.525171579063244,0</coordinates>
</LineString>
</Placemark>
<Placemark>
<name>Track 166</name>
<description></description>
<LineString>
<coordinates>-97.83775404095651,30.527706816521917,0 -97.83772487748641,30.527745182164466,0 -97.83769872012202,30.527785417891074,0 -97.83767338992085,30.527827049117995,0 -97.83764894040912,30.52786943061006,0 -97.83762518623465,30.52791240447584,0 -97.83760210785921,30.52795348252811,0 -97.83757955852609,30.527994276261516,0 -97.83755485633785,30.528040406432538,0 -97.83752985398674,30.528088110098277,0 -97.83750518775162,30.52813605613768,0 -97.8374585695831,30.528145444573152,0 -97.83740825325577,30.528159775977265,0 -97.83735773855166,30.528174704173814,0 -97.8373049110428,30.52819451496077,0 -97.83725210974455,30.52821439734611,0 -97.83719931941489,30.528234453534033,0 -97.83714658465551,30.52825469306551,0 -97.8370939470674,30.52827513120174,0 -97.83704144937124,30.528295789337996,0 -97.83698805272944,30.52831519537687,0 -97.8369245486877,30.528330990954448,0 -97.83686998288815,30.528349602208632,0 -97.83681842530926,30.528369381257313,0 -97.83677369356157,30.528393006144746,0 -97.83675285619115,30.528437216249174,0 -97.83675916786,30.528478928418803,0 -97.83676788132554,30.52852135243671,0 -97.83678503371156,30.528566222577613,0 -97.836801995372,30.528611061781167,0 -97.83681874477308,30.528655864251082,0 -97.83683525398655,30.52870062149121,0 -97.83685148513425,30.52874531995694,0 -97.83686738346157,30.52878993504255,0 -97.83688286163597,30.5288344100509,0 -97.83689744626513,30.528878501571956,0 -97.8369051218033,30.528895515673295,0</coordinates>
</LineString>
</Placemark>
</Document>
</kml>

6
index.html

@ -1943,7 +1943,7 @@
}
adminSettings[input.setting] = value;
saveAdminSettings();
showStatus(`${input.setting} updated to ${value}`);
updateStatus(`${input.setting} updated to ${value}`);
});
}
});
@ -5404,7 +5404,7 @@
if (subResponse.ok) {
pushSubscription = subscription;
updateNotificationUI(true);
showStatus('Push notifications enabled!');
updateStatus('Push notifications enabled!', 'success');
// Test notification
new Notification('HikeMap Notifications Active', {
@ -5437,7 +5437,7 @@
pushSubscription = null;
updateNotificationUI(false);
showStatus('Push notifications disabled');
updateStatus('Push notifications disabled', 'info');
}
} catch (error) {
console.error('Failed to disable notifications:', error);

Loading…
Cancel
Save