added option for showing icon instead of text for heard station message types

This commit is contained in:
DJ2LS 2024-04-29 12:21:38 +02:00
parent b804693f35
commit 1584dd25cb

View file

@ -39,6 +39,27 @@ function pushToPing(origin) {
new CustomEvent("stationSelected", { bubbles: true, detail: origin }),
);
}
function getActivityInfo(activityType) {
switch (activityType) {
case "ARQ_SESSION_INFO":
return { iconClass: "bi bi-info-circle", description: activityType };
case "ARQ_SESSION_OPEN":
return { iconClass: "bi bi-link", description: activityType };
case "ARQ_SESSION_OPEN_ACK":
return { iconClass: "bi bi-link", description: activityType };
case "QRV":
return { iconClass: "bi bi-person-raised-hand", description: activityType };
case "CQ":
return { iconClass: "bi bi-megaphone", description: activityType };
case "BEACON":
return { iconClass: "bi bi-globe", description: activityType };
default:
return { iconClass: "", description: activityType };
}
}
</script>
<template>
<div class="card h-100">
@ -84,7 +105,11 @@ function pushToPing(origin) {
</td>
<td>{{ getMaidenheadDistance(item.gridsquare) }} km</td>
<td>
{{ item.activity_type }}
<i
:class="getActivityInfo(item.activity_type).iconClass"
data-bs-toggle="tooltip"
:title="getActivityInfo(item.activity_type).description"
></i>
</td>
<td>
{{ item.snr }}