Feedback in the system: ratings, messages, the recommendation question

- Under the summary, the detailed analyses, the forecast and tarot: "How
  tailored to you did it feel?" (1–5 stars); thumbs under answers. Only
  the owner rates, once (changeable); tags, a comment, and a permission
  to read the text; model and prompt version are kept with it
- /visszajelzes: bug, idea, question, other (the page and the browser go
  with it, 10 a day); the state and the operator's reply show there, a
  dot in the account menu marks a new reply. No e-mail, no Telegram
- One NPS question (0–10) in a bar under the header, after two finished
  contents; closing it counts
- Admin → Visszajelzések: numbers by kind, week, tags, model and prompt,
  buyers and others, NPS; ratings with filters, the text only if allowed;
  messages with state, internal note and reply; a count in the admin menu
- Nothing is public. Deleting an account keeps the stars without a name
  or comment; messages go. Privacy policy (hu, en) updated
- The admin menu no longer shows a vertical scrollbar

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
feco
2026-11-24 07:01:40 +00:00
co-authored by Claude Opus 5.5
parent 3e4653fdb2
commit 62ae4a438e
34 changed files with 3097 additions and 99 deletions
+11 -3
View File
@@ -8,10 +8,10 @@ import { LogoutButton } from "./LogoutButton";
/**
* The account menu under the user's name (top right): profile, invoices,
* redeeming a code, giving a gift, logging out. Closes on a click outside, Escape, or
* redeeming a code, giving a gift, feedback (a dot: a new reply), logging out. Closes on a click outside, Escape, or
* moving to another page.
*/
export function UserMenu({ name, invoices }: { name: string; invoices: boolean }) {
export function UserMenu({ name, invoices, replies = 0 }: { name: string; invoices: boolean; replies?: number }) {
const [open, setOpen] = useState(false);
const box = useRef<HTMLDivElement>(null);
const button = useRef<HTMLButtonElement>(null);
@@ -40,6 +40,8 @@ export function UserMenu({ name, invoices }: { name: string; invoices: boolean }
...(invoices ? [{ href: "/szamlak", label: "Számláim" }] : []),
{ href: "/bevaltas", label: "Kód beváltása" },
{ href: "/ajandek", label: "Ajándékozás" },
// Where the user is goes with the message (for a bug).
{ href: `/visszajelzes?honnan=${encodeURIComponent(pathname)}`, match: "/visszajelzes", label: "Visszajelzés", dot: replies > 0 },
];
return (
@@ -58,6 +60,7 @@ export function UserMenu({ name, invoices }: { name: string; invoices: boolean }
<path d="M4 20c1.5-4 4.5-6 8-6s6.5 2 8 6" />
</svg>
<span className="who-name-text">{name}</span>
{replies > 0 && <span className="menu-dot" aria-label="új válasz a visszajelzésedre" />}
<svg viewBox="0 0 24 24" aria-hidden="true" className="who-chevron">
<path d="M6 9l6 6 6-6" />
</svg>
@@ -70,9 +73,14 @@ export function UserMenu({ name, invoices }: { name: string; invoices: boolean }
href={item.href}
role="menuitem"
className="user-menu-item"
aria-current={pathname.startsWith(item.href) ? "page" : undefined}
aria-current={pathname.startsWith("match" in item && item.match ? item.match : item.href) ? "page" : undefined}
>
{item.label}
{"dot" in item && item.dot && (
<span className="menu-dot" aria-label="új válasz">
{" "}
</span>
)}
</Link>
))}
<LogoutButton className="user-menu-item user-menu-logout" role="menuitem" />