Ignore local storage; admin users NIP-05, media, events, footer updates

- Add /storage/ and /backend/storage/ to .gitignore
- Track meetup time helper, logo asset, and assorted frontend/backend fixes
This commit is contained in:
bbe
2026-04-02 22:13:28 +02:00
parent 2fa378c360
commit 2ddf6495fb
13 changed files with 405 additions and 38 deletions

View File

@@ -23,6 +23,7 @@ import {
Check,
} from "lucide-react";
import { MediaPickerModal } from "@/components/admin/MediaPickerModal";
import { getMeetupStartUtc } from "@/lib/meetupEventTime";
interface Meetup {
id: string;
@@ -73,12 +74,14 @@ type EditableStatus = (typeof EDITABLE_STATUS_OPTIONS)[number];
// Display statuses (includes computed Upcoming/Past from PUBLISHED + date)
type DisplayStatus = "DRAFT" | "UPCOMING" | "PAST" | "CANCELLED";
function getDisplayStatus(meetup: { status: string; date: string }): DisplayStatus {
function getDisplayStatus(meetup: { status: string; date: string; time: string }): DisplayStatus {
if (meetup.status === "CANCELLED") return "CANCELLED";
if (meetup.status === "DRAFT") return "DRAFT";
// PUBLISHED (or legacy UPCOMING/PAST values) → derive from date
if (!meetup.date) return "DRAFT";
return new Date(meetup.date) > new Date() ? "UPCOMING" : "PAST";
// PUBLISHED (or legacy UPCOMING/PAST values) → derive from Brussels-local start (date + time)
if (!meetup.date?.trim()) return "DRAFT";
const start = getMeetupStartUtc(meetup.date, meetup.time || "00:00");
if (Number.isNaN(start.getTime())) return "DRAFT";
return start > new Date() ? "UPCOMING" : "PAST";
}
const STATUS_LABELS: Record<string, string> = {
@@ -158,7 +161,7 @@ function StatusDropdown({
meetup,
onChange,
}: {
meetup: { status: string; date: string };
meetup: { status: string; date: string; time: string };
onChange: (v: string) => void;
}) {
const [open, setOpen] = useState(false);