diff --git a/package-lock.json b/package-lock.json index fa6f270..48f28a4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "name": "names-poweredbyotm", "version": "0.6.1", "dependencies": { - "@otm/account-panel": "0.32.0", + "@otm/account-panel": "^0.44.0", "next": "^15.1.0", "react": "18.3.1", "react-dom": "18.3.1" @@ -734,9 +734,9 @@ } }, "node_modules/@otm/account-panel": { - "version": "0.32.0", - "resolved": "https://git.poweredbyotm.com/api/packages/tonym/npm/%40otm%2Faccount-panel/-/0.32.0/account-panel-0.32.0.tgz", - "integrity": "sha512-nWzVbaUC3Cv9awr8eTKB8XZv38GVXMnfXZPoqo6+jf+8GPHNwrpPjk0dtfV9wOq/FZyo686CF4CLoLBrRrh3nQ==", + "version": "0.44.0", + "resolved": "https://git.poweredbyotm.com/api/packages/tonym/npm/%40otm%2Faccount-panel/-/0.44.0/account-panel-0.44.0.tgz", + "integrity": "sha512-ule7EviLc5j7T9OFiknuL0oOv1hiV6D5Ph/7BwyP2PxbATXP8MIEAz0wz8bAupehWfFxrRGxfrIclWnRHynBIA==", "peerDependencies": { "@stripe/react-stripe-js": ">=2", "@stripe/stripe-js": ">=3", diff --git a/package.json b/package.json index c92a4dd..11f6630 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "names-poweredbyotm", - "version": "0.6.1", + "version": "0.6.2", "private": true, "scripts": { "dev": "next dev --port 3000", @@ -10,7 +10,7 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@otm/account-panel": "0.32.0", + "@otm/account-panel": "^0.44.0", "next": "^15.1.0", "react": "18.3.1", "react-dom": "18.3.1" diff --git a/src/components/AiControls.tsx b/src/components/AiControls.tsx index f4b57b5..d695eaa 100644 --- a/src/components/AiControls.tsx +++ b/src/components/AiControls.tsx @@ -2,14 +2,21 @@ // The AI switch next to the generate button. Three states, one slot: // own key saved → "Use my Claude/Gemini key" (browser-direct path) -// signed in → "AI names" (platform gateway) + sign out -// platform wired → "Sign in with OTM for AI names →" +// signed in → "AI names" (platform gateway) + the shared OTM account menu +// platform wired → "Sign in with OTM" + the shared helper line // none → nothing // A saved key always wins over the platform path — see CLAUDE.md "AI — two paths". +// +// The sign-in/account half rides @otm/account-panel's otm-login module so this +// app matches every other first-party app instead of a hand-rolled link + +// sign-out button. No OTM_LOGIN_CSS injection needed here — OtmAccountMenu +// carries its own (withStyles defaults true) and this app has no local +// accounts to theme-clash with. import type { AiSettings } from "@/lib/ai"; import { otmSsoUrl } from "@/lib/otm"; import type { OtmAccount } from "@/hooks/useOtmSession"; +import { OtmAccountMenu, OTM_HELPER_LINE } from "@otm/account-panel/otm-login"; const LABEL_STYLE = { display: "inline-flex", alignItems: "center", gap: 8, fontSize: 14, color: "var(--muted)" } as const; @@ -42,32 +49,43 @@ export function AiControls({ } if (platformAi && account) { return ( -