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
@@ -4,12 +4,7 @@ import { useRouter } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
import { ErrorText } from "@/components/forms";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import {
|
||||
Field,
|
||||
FieldDescription,
|
||||
FieldGroup,
|
||||
FieldLabel,
|
||||
} from "@/components/ui/field";
|
||||
import { Field, FieldDescription, FieldGroup, FieldLabel } from "@/components/ui/field";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { authClient } from "@/lib/auth-client";
|
||||
|
||||
@@ -33,8 +28,7 @@ export function SignInForm({ next }: { next: string }) {
|
||||
password: String(form.get("password")),
|
||||
});
|
||||
if (error) return setError(error.message ?? "That didn't work. Try again.");
|
||||
if (data && "twoFactorRedirect" in data && data.twoFactorRedirect)
|
||||
return setStep("code");
|
||||
if (data && "twoFactorRedirect" in data && data.twoFactorRedirect) return setStep("code");
|
||||
done();
|
||||
}
|
||||
|
||||
@@ -44,8 +38,7 @@ export function SignInForm({ next }: { next: string }) {
|
||||
step === "code"
|
||||
? await authClient.twoFactor.verifyTotp({ code })
|
||||
: await authClient.twoFactor.verifyBackupCode({ code });
|
||||
if (error)
|
||||
return setError(error.message ?? "That code didn't work. Try again.");
|
||||
if (error) return setError(error.message ?? "That code didn't work. Try again.");
|
||||
done();
|
||||
}
|
||||
|
||||
@@ -67,23 +60,11 @@ export function SignInForm({ next }: { next: string }) {
|
||||
<FieldGroup>
|
||||
<Field>
|
||||
<FieldLabel htmlFor="username">Username</FieldLabel>
|
||||
<Input
|
||||
id="username"
|
||||
name="username"
|
||||
autoComplete="username"
|
||||
required
|
||||
autoFocus
|
||||
/>
|
||||
<Input id="username" name="username" autoComplete="username" required autoFocus />
|
||||
</Field>
|
||||
<Field>
|
||||
<FieldLabel htmlFor="password">Password</FieldLabel>
|
||||
<Input
|
||||
id="password"
|
||||
name="password"
|
||||
type="password"
|
||||
autoComplete="current-password"
|
||||
required
|
||||
/>
|
||||
<Input id="password" name="password" type="password" autoComplete="current-password" required />
|
||||
</Field>
|
||||
{error && <ErrorText>{error}</ErrorText>}
|
||||
<Field>
|
||||
@@ -99,9 +80,7 @@ export function SignInForm({ next }: { next: string }) {
|
||||
<FieldGroup key={step}>
|
||||
<Field>
|
||||
<FieldLabel htmlFor="code">
|
||||
{step === "code"
|
||||
? "Code from your authenticator app"
|
||||
: "Backup code"}
|
||||
{step === "code" ? "Code from your authenticator app" : "Backup code"}
|
||||
</FieldLabel>
|
||||
<Input
|
||||
id="code"
|
||||
@@ -133,9 +112,7 @@ export function SignInForm({ next }: { next: string }) {
|
||||
setStep(step === "code" ? "backup" : "code");
|
||||
}}
|
||||
>
|
||||
{step === "code"
|
||||
? "Use a backup code instead"
|
||||
: "Use your authenticator app instead"}
|
||||
{step === "code" ? "Use a backup code instead" : "Use your authenticator app instead"}
|
||||
</button>
|
||||
</FieldDescription>
|
||||
</Field>
|
||||
|
||||
Reference in new issue
Block a user