diff --git a/ui/frontend/src/lib/header/view-menu.svelte b/ui/frontend/src/lib/header/view-menu.svelte
index cbe5bd4..30f6c99 100644
--- a/ui/frontend/src/lib/header/view-menu.svelte
+++ b/ui/frontend/src/lib/header/view-menu.svelte
@@ -15,10 +15,13 @@ polishes microcopy.
import { onMount } from "svelte";
import { goto } from "$app/navigation";
import { i18n, type TranslationKey } from "$lib/i18n/index.svelte";
+ import { mailStore } from "$lib/mail-store.svelte";
type Props = { gameId: string };
let { gameId }: Props = $props();
+ const mailUnread = $derived(mailStore.unreadCount);
+
let open = $state(false);
let rootEl: HTMLDivElement | null = $state(null);
@@ -122,9 +125,15 @@ polishes microcopy.
type="button"
role="menuitem"
data-testid="view-menu-item-mail"
+ class="with-badge"
onclick={() => go(`/games/${gameId}/mail`)}
>
- {i18n.t("game.view.mail")}
+ {i18n.t("game.view.mail")}
+ {#if mailUnread > 0}
+
+ {i18n.t("game.view.mail.badge", { count: String(mailUnread) })}
+
+ {/if}