Update Brandmeister Repeater Details URL
This commit is contained in:
parent
921a6e40c5
commit
8f842a2df3
3 changed files with 3 additions and 3 deletions
|
|
@ -804,7 +804,7 @@ import { buildPopup as _buildPopup } from "./popup";
|
||||||
detail = '<span class="dist">' + escapeHtml(loc) + "</span>";
|
detail = '<span class="dist">' + escapeHtml(loc) + "</span>";
|
||||||
}
|
}
|
||||||
item.innerHTML =
|
item.innerHTML =
|
||||||
'<a class="callsign" href="https://brandmeister.network/?page=repeater&id=' + r.id + '" target="_blank" rel="noopener">' + escapeHtml(r.callsign) + "</a>" +
|
'<a class="callsign" href="https://brandmeister.network/#/device/' + r.id + '" target="_blank" rel="noopener">' + escapeHtml(r.callsign) + "</a>" +
|
||||||
'<span class="freq" style="color:' + bandColor + '">' + r.freq_tx.toFixed(4) + "</span>" +
|
'<span class="freq" style="color:' + bandColor + '">' + r.freq_tx.toFixed(4) + "</span>" +
|
||||||
detail;
|
detail;
|
||||||
item.addEventListener("click", function (e) {
|
item.addEventListener("click", function (e) {
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ describe("buildPopup", () => {
|
||||||
it("contains callsign as a link", () => {
|
it("contains callsign as a link", () => {
|
||||||
const html = buildPopup(makeRepeater(), mockT);
|
const html = buildPopup(makeRepeater(), mockT);
|
||||||
expect(html).toContain("DB0ABC");
|
expect(html).toContain("DB0ABC");
|
||||||
expect(html).toContain("brandmeister.network/?page=repeater&id=1");
|
expect(html).toContain("brandmeister.network/#/device/1");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("contains TX and RX frequencies", () => {
|
it("contains TX and RX frequencies", () => {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import { escapeHtml } from "./format";
|
||||||
export function buildPopup(r: Repeater, t: TranslateFunction): string {
|
export function buildPopup(r: Repeater, t: TranslateFunction): string {
|
||||||
const bandClass = r.band === "2m" ? "band-2m" : "band-70cm";
|
const bandClass = r.band === "2m" ? "band-2m" : "band-70cm";
|
||||||
let html = '<div class="rptr-popup">';
|
let html = '<div class="rptr-popup">';
|
||||||
html += '<h3><a href="https://brandmeister.network/?page=repeater&id=' + r.id + '" target="_blank" rel="noopener">' + escapeHtml(r.callsign) + '</a> <span class="band-tag ' + bandClass + '">' + escapeHtml(r.band) + "</span></h3>";
|
html += '<h3><a href="https://brandmeister.network/#/device/' + r.id + '" target="_blank" rel="noopener">' + escapeHtml(r.callsign) + '</a> <span class="band-tag ' + bandClass + '">' + escapeHtml(r.band) + "</span></h3>";
|
||||||
html += "<table>";
|
html += "<table>";
|
||||||
html += "<tr><td>" + t("popup_tx") + "</td><td>" + r.freq_tx.toFixed(4) + " MHz</td></tr>";
|
html += "<tr><td>" + t("popup_tx") + "</td><td>" + r.freq_tx.toFixed(4) + " MHz</td></tr>";
|
||||||
if (r.freq_rx)
|
if (r.freq_rx)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue