Bell sound on wanted calls. Closes #117

This commit is contained in:
Ian Renton
2026-08-15 12:02:40 +01:00
parent 3006ee38cb
commit fe4826b729
14 changed files with 50 additions and 29 deletions
Binary file not shown.
+13 -1
View File
@@ -206,6 +206,15 @@ div.band-spot-wanted {
animation: wantedanim 1.5s ease-in-out alternate infinite;
}
@keyframes wantedanim {
0% {
background-color: #cf9e3d;
}
100% {
background-color: #e1b655;
}
}
.leaflet-marker-icon.marker-icon-wanted::after {
content: "";
width: 20px;
@@ -217,14 +226,17 @@ div.band-spot-wanted {
position: absolute;
z-index: -1;
border-radius: 1000%;
animation: wantedanimshadow 1.5s ease-in-out alternate infinite;
}
@keyframes wantedanim {
@keyframes wantedanimshadow {
0% {
background-color: #cf9e3d;
box-shadow: 0px 0px 10px 15px #cf9e3d;
}
100% {
background-color: #e1b655;
box-shadow: 0px 0px 10px 15px #e1b655;
}
}
+5 -1
View File
@@ -83,7 +83,11 @@ function startSSEConnection() {
// Ping if we need to
if ($("#pingOnNewSpots")[0].checked) {
new Audio("/audio/ping.mp3").play();
if (callWanted(newSpot["dx_call"])) {
new Audio("/static/audio/bell.mp3").play();
} else {
new Audio("/static/audio/ping.mp3").play();
}
}
},
onerror(err) {
+4
View File
@@ -1,6 +1,7 @@
const CACHE_NAME = 'Spothole';
const CACHE_URLS = [
'static/apidocs/openapi.yml',
'static/audio/bell.mp3',
'static/audio/ping.mp3',
'static/css/style.css',
'static/js/add-spot.js',
@@ -50,6 +51,9 @@ const CACHE_URLS = [
'static/vendor/js/leaflet-1.9.4.min.js',
'static/vendor/js/leaflet-geodesic-2.7.2.umd.min.js',
'static/vendor/js/leaflet-maidenhead.js',
'static/vendor/js/fetch-event-source-2.0.1/fetch.js',
'static/vendor/js/fetch-event-source-2.0.1/index.js',
'static/vendor/js/fetch-event-source-2.0.1/parse.js',
'static/vendor/webfonts/fa-solid-900.ttf',
'static/vendor/webfonts/fa-solid-900.woff2'
];