diff --git a/webapp/chat-rx-header-icons.mjs b/webapp/chat-rx-header-icons.mjs index d9e15c4..60ad10a 100644 --- a/webapp/chat-rx-header-icons.mjs +++ b/webapp/chat-rx-header-icons.mjs @@ -44,7 +44,7 @@ export default { {{ message.Offset }}Hz {{ message.Snr > 0 ? '+' : '' }} {{ message.Snr }} - {{ message.Speed[0].toUpperCase() }} + {{ message.Speed[0].toUpperCase() }} {{ message.TimeDrift > 0 ? '+' : '' }}{{ message.TimeDrift }}ms ` diff --git a/webapp/chat-window.mjs b/webapp/chat-window.mjs index fbff8b4..71f560b 100644 --- a/webapp/chat-window.mjs +++ b/webapp/chat-window.mjs @@ -39,11 +39,31 @@ export default { closeTab(id) { this.chats = this.chats.filter(e => e.id != id) }, + newTab(label, filter) { + const id = uidGenerator() + this.chats.push({ + id, + label, + filter + }) + }, callsignSelected(callsign) { - console.log('callsign-select', callsign) + this.newTab(callsign, { + Callsign: callsign + }) }, frequencySelected(frequency) { - console.log('frequency-selected', frequency) + const from = Math.floor((frequency - 25) / 50) * 50 + const to = from + 50 + this.newTab( + from + 'Hz', + { + Freq: { + From: from, + To: to + } + } + ) }, }, template: `