feat: IMVU imports on the hub: grants, requests and the importer's job queue
Creators grant a catalog leave to import their IMVU products (whole shop less exclusions, or listed products) from a linked IMVU account, agreeing to a versioned consent text; the catalog's team accepts or declines. Requests queue covered products (or add them to the library when imported already), suggest, or count. Importers claim jobs with the catalog's importer key, get t5de-import tokens, and the catalog registers imported revisions as published products owned by the creator. Narrowing or withdrawing a grant withdraws products; unlinking suspends grants; an hourly batch rechecks imported products with IMVU daily. Website: /imports and the console's catalog imports page. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
eca1884918
commit
7d708aebdb
24 files changed
+6521
-153
No files matched your search
@@ -3,14 +3,7 @@ import { notFound, redirect } from "next/navigation";
|
||||
import { cache } from "react";
|
||||
import { NavLink } from "@/components/header-client";
|
||||
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
|
||||
import {
|
||||
api,
|
||||
getMe,
|
||||
isModerator,
|
||||
unwrap,
|
||||
type ConsoleData,
|
||||
type Person,
|
||||
} from "@/lib/api";
|
||||
import { api, getMe, isModerator, unwrap, type ConsoleData, type Person } from "@/lib/api";
|
||||
|
||||
/** The signed-in moderator, or off to sign in; others get not found (these pages aren't for them). */
|
||||
export async function requireModerator(path: string): Promise<Person> {
|
||||
@@ -31,9 +24,7 @@ const loadConsole = cache(async (): Promise<ConsoleData | undefined> => {
|
||||
* The signed-in person and their console, or off to sign in. People who manage nothing get not found: the console
|
||||
* is for those controlling a product, catalog or room.
|
||||
*/
|
||||
export async function requireConsole(
|
||||
path: string,
|
||||
): Promise<{ me: Person; console: ConsoleData }> {
|
||||
export async function requireConsole(path: string): Promise<{ me: Person; console: ConsoleData }> {
|
||||
const me = await getMe();
|
||||
if (!me) redirect(`/signin?next=${encodeURIComponent(path)}`);
|
||||
const data = await loadConsole();
|
||||
@@ -67,10 +58,7 @@ export async function ConsoleNav() {
|
||||
<AlertDescription>
|
||||
<span>
|
||||
Some of what you can do here needs it ({needed.join(", ")}).{" "}
|
||||
<Link
|
||||
href="/account"
|
||||
className="text-foreground underline underline-offset-4"
|
||||
>
|
||||
<Link href="/account" className="text-foreground underline underline-offset-4">
|
||||
Turn it on in your account
|
||||
</Link>
|
||||
.
|
||||
@@ -82,11 +70,7 @@ export async function ConsoleNav() {
|
||||
{tabs
|
||||
.filter((t) => sections.has(t.section))
|
||||
.map((t) => (
|
||||
<NavLink
|
||||
key={t.section}
|
||||
href={t.href}
|
||||
exact={t.section === "overview"}
|
||||
>
|
||||
<NavLink key={t.section} href={t.href} exact={t.section === "overview"}>
|
||||
{t.label}
|
||||
</NavLink>
|
||||
))}
|
||||
|
||||
Reference in new issue
Block a user