Reapply "Add missing admin action files and navigation links"

This reverts commit 4d515bc400.
This commit is contained in:
Simo committed 2026-07-11 20:52:56 +02:00
1 parent 96ed768f14
commit 5b4228261a
338 files changed
+28143 -5948

No files matched your search

+10 -9
View File
@@ -31,7 +31,11 @@ type PublicRow = {
// Reusable yes/no pill so emulator boolean-ish "1"/"0" columns read consistently.
function YesNo({ on }: { on: boolean }) {
return (
<span className={`inline-block text-[0.72rem] font-bold px-2 py-0.5 rounded-full ${on ? "bg-green-600/20 text-[var(--color-text)]" : "bg-red-500/22 text-[var(--color-text)]"}`}>{on ? "Yes" : "No"}</span>
<span
className={`inline-block text-[0.72rem] font-bold px-2 py-0.5 rounded-full ${on ? "bg-green-600/20 text-[var(--color-text)]" : "bg-red-500/22 text-[var(--color-text)]"}`}
>
{on ? "Yes" : "No"}
</span>
);
}
@@ -117,12 +121,7 @@ export default async function AdminNavigation() {
<div className="grid grid-cols-[repeat(auto-fit,minmax(180px,1fr))] gap-3.5 mb-6">
<StatusCard label={t("flatCategories")} value={flatcats.length} icon="📂" />
<StatusCard
label={t("publicFlatcats")}
value={publicFlatcats}
hint={t("markedPublic")}
icon="🌐"
/>
<StatusCard label={t("publicFlatcats")} value={publicFlatcats} hint={t("markedPublic")} icon="🌐" />
<StatusCard label={t("publicRooms")} value={publics.length} icon="🚪" />
<StatusCard
label={t("visibleRooms")}
@@ -161,7 +160,9 @@ export default async function AdminNavigation() {
<tr key={c.id}>
<td className="text-sm text-gray-500 dark:text-gray-400 whitespace-nowrap">{c.id}</td>
<td>{c.caption || "—"}</td>
<td className="text-sm text-gray-500 dark:text-gray-400 whitespace-nowrap">{c.captionSave || "—"}</td>
<td className="text-sm text-gray-500 dark:text-gray-400 whitespace-nowrap">
{c.captionSave || "—"}
</td>
<td>{c.minRank}</td>
<td>{c.maxUserCount}</td>
<td>
@@ -206,7 +207,7 @@ export default async function AdminNavigation() {
<span className="text-sm text-gray-500 dark:text-gray-400">#{p.public_cat_id}</span>
</td>
<td>
{roomNameById.get(p.room_id) || t("unnamed")}{" "}
{roomNameById.get(p.room_id) || t("unnamed")}{" "}
<span className="text-sm text-gray-500 dark:text-gray-400">#{p.room_id}</span>
</td>
<td>