Map admins: owners invite friends to co-manage maps
Some checks failed
Deploy MineGeo to Dokploy / deploy (push) Failing after 6m2s
Some checks failed
Deploy MineGeo to Dokploy / deploy (push) Failing after 6m2s
Owners can invite players by name from the map workshop; invitees accept from their dashboard and then manage the map (details, locations, submission, refresh, contributions, appeals) through owner-delegated checks. Adds the map_admins table, invite/admin API endpoints, dashboard invite box, workshop admin management, and Russian translations.
This commit is contained in:
@@ -13,8 +13,10 @@ import { OwnerContributions } from "./OwnerContributions";
|
||||
import Link from "next/link";
|
||||
import { MapRefresh } from "./MapRefresh";
|
||||
import { MapAppeal } from "./MapAppeal";
|
||||
import { MapAdmins } from "./MapAdmins";
|
||||
import { ExportMap } from "./MapTransfer";
|
||||
type Draft = {
|
||||
access: "owner" | "admin";
|
||||
imported_from_id: string | null;
|
||||
imported_owner_name: string | null;
|
||||
ownsPublishedParent: boolean;
|
||||
@@ -175,6 +177,13 @@ export function DraftEditor({
|
||||
)}
|
||||
</div>
|
||||
<span className="badge">{t(statusMessage(draft.state))}</span>
|
||||
{draft.access === "admin" && (
|
||||
<p className="muted">
|
||||
{t(
|
||||
"You manage this map as an admin. The owner invited you to help run it.",
|
||||
)}
|
||||
</p>
|
||||
)}
|
||||
{!draft.imported_from_id &&
|
||||
!draft.parent_dataset_id &&
|
||||
draft.map &&
|
||||
@@ -440,6 +449,9 @@ export function DraftEditor({
|
||||
onChange={() => setVersion((v) => v + 1)}
|
||||
/>
|
||||
)}
|
||||
{!draft.imported_from_id && !draft.parent_dataset_id && (
|
||||
<MapAdmins id={id} access={draft.access} />
|
||||
)}
|
||||
{(["uploading", "processing"].includes(draft.state) ||
|
||||
(draft.parent_dataset_id &&
|
||||
["pending", "submitted"].includes(
|
||||
|
||||
Reference in New Issue
Block a user