mirror of
https://github.com/MeshCore-Beacon/beacon-web.git
synced 2026-10-20 08:31:56 +00:00
Atlas: short Recent and Stale badges so the card actions stay on one line
This commit is contained in:
@@ -95,8 +95,8 @@ export function AtlasCard({
|
||||
{name || formatHex(node?.id ?? pin.id)}
|
||||
</button>
|
||||
{node && <Badge variant="default">{node.nodeTypeName}</Badge>}
|
||||
{node?.stale === false && <Badge variant="live">{t("observerPage.statusRecent")}</Badge>}
|
||||
{node?.stale === true && <Badge variant="stale">{t("observerPage.statusStale")}</Badge>}
|
||||
{node?.stale === false && <Badge variant="live">{t("atlas.recent")}</Badge>}
|
||||
{node?.stale === true && <Badge variant="stale">{t("atlas.stale")}</Badge>}
|
||||
</span>
|
||||
);
|
||||
|
||||
|
||||
@@ -987,6 +987,8 @@
|
||||
"lastSeen": "Last seen",
|
||||
"meanHops": "Mean hops",
|
||||
"heardBy": "Heard by",
|
||||
"recent": "Recent",
|
||||
"stale": "Stale",
|
||||
"observers_one": "{{count}} observer heard the latest packet",
|
||||
"observers_other": "{{count}} observers heard the latest packet",
|
||||
"noReports": "No observations in this window.",
|
||||
|
||||
@@ -989,6 +989,8 @@
|
||||
"lastSeen": "Vu pour la dernière fois",
|
||||
"meanHops": "Sauts moyens",
|
||||
"heardBy": "Entendu par",
|
||||
"recent": "Récent",
|
||||
"stale": "Périmé",
|
||||
"observers_one": "{{count}} observateur a entendu le dernier paquet",
|
||||
"observers_many": "{{count}} observateurs ont entendu le dernier paquet",
|
||||
"observers_other": "{{count}} observateurs ont entendu le dernier paquet",
|
||||
|
||||
@@ -56,7 +56,7 @@ describe("AtlasCard", () => {
|
||||
mount();
|
||||
expect(await screen.findByRole("button", { name: "Renamed repeater" })).toBeInTheDocument();
|
||||
expect(screen.getByText("REPEATER")).toBeInTheDocument();
|
||||
expect(screen.getByText("Recent status")).toBeInTheDocument();
|
||||
expect(screen.getByText("Recent")).toBeInTheDocument();
|
||||
expect(screen.getByText("Observations")).toBeInTheDocument();
|
||||
expect(screen.getByText("Mean SNR")).toBeInTheDocument();
|
||||
expect(screen.getByText("0.0 dB")).toBeInTheDocument();
|
||||
@@ -71,7 +71,7 @@ describe("AtlasCard", () => {
|
||||
it("shows the stale badge and the server's type name even when the type is unknown", async () => {
|
||||
vi.mocked(api.getNode).mockResolvedValue({ ...node, stale: true, nodeType: 9, nodeTypeName: "WEIRD" });
|
||||
mount();
|
||||
expect(await screen.findByText("Status is stale")).toBeInTheDocument();
|
||||
expect(await screen.findByText("Stale")).toBeInTheDocument();
|
||||
expect(screen.getByText("WEIRD")).toBeInTheDocument();
|
||||
expect(screen.queryByText(/atlas\.roles/)).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user