admin: show the TREK API as its three services

The card names place search, address search and routing with what each
answers and what is left of today's allowance. Each service is a tile with
what is left as its figure, the day's use as a bar and used and limit as
badges; the state, the kind of installation, a key from the environment
and the time the count starts again sit as badges in the header. The
sources add the terrain tiles the routes take their heights from.
This commit is contained in:
Maurice
2026-10-30 16:16:09 +01:00
parent c508bb9758
commit deb125bedc
33 changed files with 644 additions and 110 deletions
@@ -1,7 +1,13 @@
import { useState } from 'react'
import { Check, ChevronRight, Library, X } from 'lucide-react'
import { Check, ChevronRight, Library, Route, Search, X } from 'lucide-react'
import TrekMark from '../../../components/shared/TrekMark'
import { TREK_API_SOURCES as SOURCES, trekApiFacts, trekApiFields } from '../../../components/Admin/trekApiModel'
import {
TREK_API_SOURCES as SOURCES,
trekApiAddressFeatures,
trekApiFacts,
trekApiFields,
trekApiRoutingFeatures,
} from '../../../components/Admin/trekApiModel'
import { useTranslation } from '../../../i18n'
/**
@@ -118,6 +124,18 @@ export function MTrekApiBlock() {
note={t('admin.trekApi.notIncludedNote')}
dashed
/>
<ChipGroup
icon={<Search size={13} strokeWidth={2.2} className="text-m-faint" aria-hidden />}
label={t('admin.trekApi.quota.service.photon')}
items={trekApiAddressFeatures(t)}
note={t('admin.trekApi.addressNote')}
/>
<ChipGroup
icon={<Route size={13} strokeWidth={2.2} className="text-m-faint" aria-hidden />}
label={t('admin.trekApi.quota.service.valhalla')}
items={trekApiRoutingFeatures(t)}
note={t('admin.trekApi.routingNote')}
/>
<ChipGroup
icon={<Library size={13} strokeWidth={2.2} className="text-m-faint" aria-hidden />}
label={t('admin.trekApi.sourcesLabel')}