diff --git a/htdocs/css/openwebrx.css b/htdocs/css/openwebrx.css index f91a592..283cabc 100644 --- a/htdocs/css/openwebrx.css +++ b/htdocs/css/openwebrx.css @@ -205,6 +205,14 @@ input[type=range]:focus::-ms-fill-upper margin-bottom: -5px; } +#openwebrx-bookmarks-container .bookmark[data-source=local] { + background-color: #0FF; +} + +#openwebrx-bookmarks-container .bookmark[data-source=local]:after { + border-top-color: #0FF; +} + #webrx-canvas-container { /*background-image:url('../gfx/openwebrx-blank-background-1.jpg');*/ diff --git a/htdocs/openwebrx.js b/htdocs/openwebrx.js index 0aca058..6b2d648 100644 --- a/htdocs/openwebrx.js +++ b/htdocs/openwebrx.js @@ -1215,6 +1215,7 @@ function on_ws_recv(evt) waterfall_init(); audio_preinit(); + loadLocalBookmarks(); if (audio_allowed && !audio_initialized) audio_init(); waterfall_clear(); @@ -1269,7 +1270,7 @@ function on_ws_recv(evt) update_packet_panel(json.value); break; case "bookmarks": - update_bookmarks(json.value); + update_bookmarks(json.value, "server"); break; default: console.warn('received message of unknown type: ' + json.type); @@ -1336,17 +1337,25 @@ function on_ws_recv(evt) } } -function update_bookmarks(bookmarks) { +function update_bookmarks(bookmarks, source) { var $container = $('#openwebrx-bookmarks-container'); - $container.empty(); + $container.find('.bookmark[data-source=' + source + ']').remove(); bookmarks.forEach(function(b){ - $bookmark = $('