diff --git a/src/meshcore_hub/web/static/js/spa/icons.js b/src/meshcore_hub/web/static/js/spa/icons.js index a1f4451..e7350c0 100644 --- a/src/meshcore_hub/web/static/js/spa/icons.js +++ b/src/meshcore_hub/web/static/js/spa/icons.js @@ -181,3 +181,11 @@ export function iconClock(cls = 'h-5 w-5') { export function iconFilter(cls = 'h-5 w-5') { return html``; } + +export function iconRouteFrom(cls = 'h-5 w-5') { + return html``; +} + +export function iconRouteTo(cls = 'h-5 w-5') { + return html``; +} diff --git a/src/meshcore_hub/web/static/js/spa/pages/routes.js b/src/meshcore_hub/web/static/js/spa/pages/routes.js index 80b2bde..3028db4 100644 --- a/src/meshcore_hub/web/static/js/spa/pages/routes.js +++ b/src/meshcore_hub/web/static/js/spa/pages/routes.js @@ -1,6 +1,6 @@ import { apiGet, apiPost, apiPut, apiDelete, isAbortError } from '../api.js'; import { html, litRender, nothing, t, errorAlert, getConfig, hasRole } from '../components.js'; -import { iconPath, iconPlus, iconEdit, iconTrash, iconPackets, iconClock, iconRuler, iconNodes, iconSatelliteDish } from '../icons.js'; +import { iconPath, iconPlus, iconEdit, iconTrash, iconPackets, iconClock, iconRuler, iconNodes, iconSatelliteDish, iconRouteFrom, iconRouteTo } from '../icons.js'; const VISIBILITY_ORDER = ['community', 'member', 'operator', 'admin']; @@ -147,14 +147,18 @@ function renderRouteCard(route, { isAdmin, onDelete, onEdit, detail, navigate, p
-

- ${route.from_label} - ${arrow} - ${route.to_label} +

+
+ ${iconRouteFrom('h-5 w-5')} + ${route.from_label} + ${iconRouteTo('h-5 w-5')} + ${route.to_label} +

${route.description ? html`

${route.description}

` : nothing}
+ ${arrow} ${badge}
@@ -186,7 +190,7 @@ function renderDetailContent(route, detail, { navigate, packetsEnabled, history ${historySection} ${matches.length > 0 ? html`
${t('routes.recent_packets')} -
+
${matches.map(m => { const prefixLen = 2 * (route.match_width || 1); const pathLookup = new Map(