Forum photos, a one-row bottom menu, and the site's own question windows
CI / test (push) Successful in 3m10s
CI / build (push) Skipped
CI / deploy (push) Skipped

Photos in posts and replies: a "Fotó" button in the new thread form and the
reply boxes. The browser makes the picture small before uploading it (1600
pixels at most, WebP, JPEG where WebP cannot be made); the forum checks it
is a still picture, strips its metadata and makes a square preview
(forum-photos/ in the storage). Five a member a day, five a post; one taken
off before sending is deleted and does not count. Under the post a row of
square previews; a click opens a viewer paged with arrows, swipes and keys.
Seen by whoever may read the thread (long public cache only for public
topics). Unsent photos go after a day, those of removed posts after a year;
removed with the account and listed in the data export. Terms and privacy
notice updated.

The forum's bottom menu keeps its five items in one row (the fifth wrapped
to a second row). On iPhones, when the keyboard goes away without the usual
tap (a photo picker opening over it), the page is put back in place instead
of the menu floating mid-screen over an empty strip.

The browser's own confirm() and prompt() windows (23 places: deleting,
revoking, blocking, muting, moderators' reasons, admin actions) are replaced
by a question window in the site's look, following the forum's light or
dark theme, with named buttons and a text box for reasons.

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-27 00:34:59 +00:00
co-authored by Claude Opus 5.5
parent 758c3ce7ea
commit de629a068d
38 changed files with 1536 additions and 92 deletions
@@ -5,6 +5,7 @@ import { useCallback, useEffect, useState } from "react";
import { api, errorText } from "@/lib/api";
import { formatDate } from "@/lib/astro";
import type { Package, PromoCode } from "@/lib/types";
import { confirmDialog } from "@/components/Dialogs";
const PAGE = 100;
@@ -168,7 +169,13 @@ function CodeList({ packages }: { packages: Package[] }) {
}, [q]);
async function revoke(c: PromoCode) {
if (!window.confirm(`Visszavonod a(z) ${c.code} kódot? Utána nem váltható be.`)) return;
const ok = await confirmDialog({
title: `Visszavonod a(z) ${c.code} kódot?`,
text: "Utána nem váltható be.",
confirm: "Visszavonás",
danger: true,
});
if (!ok) return;
try {
await api(`/admin/promo-codes/${c.id}/revoke`, { body: {} });
load(0);