diff --git a/messages/de.json b/messages/de.json
index 2e5e6e3..797f448 100644
--- a/messages/de.json
+++ b/messages/de.json
@@ -483,7 +483,10 @@
"typePetSuggestion": "könnte dir gefallen",
"typeReferralJoined": "ist über deine Einladung zu PawFeed gekommen",
"typeReferralRankUp": "Du hast einen neuen Empfehlungsrang erreicht. Schau ihn dir an!",
- "typeVaccineDue": "💉 Die Impfung „{name}“ ist am {date} fällig – Zeit, einen Termin zu vereinbaren."
+ "typeVaccineDue": "💉 Die Impfung „{name}“ ist am {date} fällig – Zeit, einen Termin zu vereinbaren.",
+ "typeStoryMention": "hat dich in einer Story markiert.",
+ "typeStoryComment": "hat deine Story kommentiert.",
+ "typeStoryReaction": "hat deiner Story eine Pfote gegeben."
},
"PhotoPostForm": {
"captionPlaceholder": "Bildunterschrift schreiben…",
@@ -669,9 +672,9 @@
"onlyMe": "Nur ich",
"followerVisibilitySaved": "Follower-Sichtbarkeit gespeichert",
"followerVisibilitySaveFailed": "Follower-Sichtbarkeit konnte nicht gespeichert werden",
- "followerEveryoneHint": "Jeder kann die Follower- und Folgt-Listen von {name} sehen.",
- "followerFollowersOnlyHint": "Nur Tiere, die {name} folgen, können die Follower- und Folgt-Listen sehen.",
- "followerNobodyHint": "Nur du kannst die Follower- und Folgt-Listen von {name} sehen.",
+ "followerEveryoneHint": "Jeder kann die Follower- und Folgt-Listen von {name} sehen und {name} in Storys markieren.",
+ "followerFollowersOnlyHint": "Nur Tiere, die {name} folgen, können die Follower- und Folgt-Listen sehen und {name} in Storys markieren.",
+ "followerNobodyHint": "Nur du kannst die Follower- und Folgt-Listen von {name} sehen — markieren in Storys kann {name} niemand.",
"verificationHeading": "Verifizierung",
"verifiedStatus": "Dieses Tier ist verifiziert.",
"pendingStatus": "Dein Verifizierungsantrag wird noch geprüft.",
diff --git a/messages/en.json b/messages/en.json
index 37d7a9b..cc4b03f 100644
--- a/messages/en.json
+++ b/messages/en.json
@@ -483,7 +483,10 @@
"typePetSuggestion": "might be a good match",
"typeReferralJoined": "joined PawFeed through your invite",
"typeReferralRankUp": "You reached a new referral rank. Take a look!",
- "typeVaccineDue": "💉 The \"{name}\" vaccination is due on {date} – time to book an appointment."
+ "typeVaccineDue": "💉 The \"{name}\" vaccination is due on {date} – time to book an appointment.",
+ "typeStoryMention": "tagged you in a story.",
+ "typeStoryComment": "commented on your story.",
+ "typeStoryReaction": "gave your story a paw."
},
"PhotoPostForm": {
"captionPlaceholder": "Write a caption…",
@@ -669,9 +672,9 @@
"onlyMe": "Only me",
"followerVisibilitySaved": "Follower privacy setting saved",
"followerVisibilitySaveFailed": "Failed to save follower privacy setting",
- "followerEveryoneHint": "Anyone can see {name}'s followers and following lists.",
- "followerFollowersOnlyHint": "Only pets that follow {name} can see the followers and following lists.",
- "followerNobodyHint": "Only you can see {name}'s followers and following lists.",
+ "followerEveryoneHint": "Anyone can see {name}'s followers and following lists and tag {name} in stories.",
+ "followerFollowersOnlyHint": "Only pets that follow {name} can see the followers and following lists and tag {name} in stories.",
+ "followerNobodyHint": "Only you can see {name}'s followers and following lists — nobody can tag {name} in stories.",
"verificationHeading": "Verification",
"verifiedStatus": "This pet is verified.",
"pendingStatus": "Your verification request is pending review.",
diff --git a/src/app/(app)/notifications/page.tsx b/src/app/(app)/notifications/page.tsx
index 1c7d343..b8d9a08 100644
--- a/src/app/(app)/notifications/page.tsx
+++ b/src/app/(app)/notifications/page.tsx
@@ -3,7 +3,7 @@
import { useEffect, useState } from "react";
import Link from "next/link";
import { useRouter } from "next/navigation";
-import { Bell, UserPlus, Heart, MessageCircle, Cake, Home, AtSign, Repeat2, Sparkles, Gift, Award, Syringe } from "lucide-react";
+import { Bell, UserPlus, Heart, MessageCircle, Cake, Home, AtSign, Repeat2, Sparkles, Gift, Award, Syringe, PawPrint } from "lucide-react";
import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query";
import { useTRPC } from "@/trpc/client";
import { useActivePet } from "@/context/ActivePetContext";
@@ -17,7 +17,7 @@ import { useLocale, useTranslations } from "next-intl";
import { formatRelativeCompact } from "@/lib/format-relative-time";
import { RankRing } from "@/components/referrals/RankRing";
-type NotificationType = "FOLLOW" | "REACTION" | "COMMENT" | "MESSAGE" | "BIRTHDAY" | "ADOPTION_DAY" | "MENTION" | "PAW_BACK" | "PET_SUGGESTION" | "REFERRAL_JOINED" | "REFERRAL_RANK_UP" | "VACCINE_DUE";
+type NotificationType = "FOLLOW" | "REACTION" | "COMMENT" | "MESSAGE" | "BIRTHDAY" | "ADOPTION_DAY" | "MENTION" | "PAW_BACK" | "PET_SUGGESTION" | "REFERRAL_JOINED" | "REFERRAL_RANK_UP" | "VACCINE_DUE" | "STORY_MENTION" | "STORY_COMMENT" | "STORY_REACTION";
function notificationIcon(type: NotificationType) {
switch (type) {
@@ -33,6 +33,9 @@ function notificationIcon(type: NotificationType) {
case "REFERRAL_JOINED": return ;
case "REFERRAL_RANK_UP": return ;
case "VACCINE_DUE": return ;
+ case "STORY_MENTION": return ;
+ case "STORY_COMMENT": return ;
+ case "STORY_REACTION": return ;
}
}
@@ -100,6 +103,11 @@ export default function NotificationsPage() {
return notif.actorPet ? `/pets/${notif.actorPet.id}` : null;
case "REFERRAL_RANK_UP":
return "/einladen";
+ // Story-Mitteilungen → Tierprofil (dort läuft die Story über den Ring)
+ case "STORY_MENTION":
+ case "STORY_COMMENT":
+ case "STORY_REACTION":
+ return notif.story ? `/pets/${notif.story.petId}` : null;
case "BIRTHDAY":
case "ADOPTION_DAY":
case "VACCINE_DUE":
@@ -240,6 +248,9 @@ export default function NotificationsPage() {
{notif.type === "PET_SUGGESTION" && t("typePetSuggestion")}
{notif.type === "REFERRAL_JOINED" && t("typeReferralJoined")}
{notif.type === "REFERRAL_RANK_UP" && t("typeReferralRankUp")}
+ {notif.type === "STORY_MENTION" && t("typeStoryMention")}
+ {notif.type === "STORY_COMMENT" && t("typeStoryComment")}
+ {notif.type === "STORY_REACTION" && t("typeStoryReaction")}
{notif.type === "VACCINE_DUE" && notif.vaccine?.nextDueDate &&
t("typeVaccineDue", {
name: notif.vaccine.name,
diff --git a/src/components/stories/StoryOverlayLayer.tsx b/src/components/stories/StoryOverlayLayer.tsx
new file mode 100644
index 0000000..9d6b0ef
--- /dev/null
+++ b/src/components/stories/StoryOverlayLayer.tsx
@@ -0,0 +1,243 @@
+"use client";
+
+import { useLayoutEffect, useRef, useState, type CSSProperties } from "react";
+import {
+ OVERLAY_SIZES,
+ STORY_BACKGROUNDS,
+ containRect,
+ contrastTextColor,
+ overlayCenter,
+ type Rect,
+ type StoryOverlay,
+} from "@/lib/story-overlays";
+import { STICKER_OUTLINE, STORY_STICKERS, type StickerPart } from "@/lib/story-stickers";
+
+type MentionedPet = { id: string; name: string };
+
+/**
+ * Web-Anzeige des Story-Editors (erstellt wird nur in der App). Legt Text,
+ * Markierungen, GIFs und Sticker auf die Medienfläche — dieselbe Geometrie und
+ * dieselben Größenregeln wie mobile/src/components/story-editor/, damit alles an
+ * derselben Stelle sitzt. Bei Text-Storys zeichnet die Ebene auch den Farbverlauf.
+ */
+export function StoryOverlayLayer({
+ overlays,
+ mediaSize,
+ mentionedPets,
+ background,
+ showOverlays,
+ onMentionClick,
+}: {
+ overlays: readonly StoryOverlay[];
+ mediaSize: { width: number; height: number };
+ mentionedPets: readonly MentionedPet[];
+ /** Nur Text-Storys: Farbverlauf-Schlüssel */
+ background?: string | null;
+ /** Notschalter: aus → nur der Farbverlauf, keine Overlays */
+ showOverlays: boolean;
+ onMentionClick?: (petId: string) => void;
+}) {
+ const containerRef = useRef(null);
+ const [box, setBox] = useState({ width: 0, height: 0 });
+
+ useLayoutEffect(() => {
+ const el = containerRef.current;
+ if (!el) return;
+ const update = () => setBox({ width: el.clientWidth, height: el.clientHeight });
+ update();
+ const observer = new ResizeObserver(update);
+ observer.observe(el);
+ return () => observer.disconnect();
+ }, []);
+
+ const rect = containRect(box.width, box.height, mediaSize.width, mediaSize.height);
+
+ return (
+