Some checks failed
build-images / web (push) Has been cancelled
vision2026-ci / Python SDK resource tests (push) Has been cancelled
build-images / api (push) Has been cancelled
build-images / worker-gpu (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (comfy-workflow-schema) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (effects-core) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (eventbus-types) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (growth-analytics) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (provider-adapter-kit) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (publishing-connectors) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (render-core) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (shot-template-schema) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (trends-schema) (push) Has been cancelled
vision2026-ci / Desktop engine crates (test + clippy + fmt) (push) Has been cancelled
codeql / Analyze (javascript-typescript) (push) Has been cancelled
codeql / Analyze (python) (push) Has been cancelled
perf / API hot-path micro-smoke (budgeted) (push) Has been cancelled
perf / Desktop engine crates (release build check) (push) Has been cancelled
vision2026-ci / API phase modules (ruff + pytest) (push) Has been cancelled
vision2026-ci / Alembic upgrade + drift check (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (caption-engine) (push) Has been cancelled
Paid, hosted product at menivor.com, now retired as a company project. Fresh squashed history of the cleaned working tree (secret-scanned, no .env, no customer data, no outreach logs). Built on MoneyPrinterTurbo (MIT, harry0703) — see NOTICE.
92 lines
3.0 KiB
TypeScript
92 lines
3.0 KiB
TypeScript
"use client";
|
|
|
|
import * as React from "react";
|
|
import { Loader2, Plug } from "lucide-react";
|
|
import { Button } from "@/components/ui/button";
|
|
import { Input } from "@/components/ui/input";
|
|
import { Label } from "@/components/ui/label";
|
|
|
|
export interface BlueskyConnectFormProps {
|
|
busy: boolean;
|
|
onSubmit: (handle: string, appPassword: string, pds: string) => void;
|
|
}
|
|
|
|
/**
|
|
* Bluesky connects with the handle plus an app password (Settings > Privacy and
|
|
* security > App passwords in Bluesky). The password is sent once to our API,
|
|
* stored encrypted, and only ever used against the account's own server.
|
|
*/
|
|
export function BlueskyConnectForm({ busy, onSubmit }: Readonly<BlueskyConnectFormProps>) {
|
|
const handleId = React.useId();
|
|
const passwordId = React.useId();
|
|
const pdsId = React.useId();
|
|
const [handle, setHandle] = React.useState("");
|
|
const [password, setPassword] = React.useState("");
|
|
const [pds, setPds] = React.useState("");
|
|
const [showAdvanced, setShowAdvanced] = React.useState(false);
|
|
|
|
const canSubmit = handle.trim().length >= 3 && password.trim().length >= 8 && !busy;
|
|
|
|
return (
|
|
<form
|
|
className="space-y-3"
|
|
onSubmit={(e) => {
|
|
e.preventDefault();
|
|
if (canSubmit) onSubmit(handle.trim(), password.trim(), pds.trim());
|
|
}}
|
|
>
|
|
<div className="space-y-1.5">
|
|
<Label htmlFor={handleId}>Handle</Label>
|
|
<Input
|
|
id={handleId}
|
|
autoComplete="username"
|
|
placeholder="you.bsky.social"
|
|
value={handle}
|
|
disabled={busy}
|
|
onChange={(e) => setHandle(e.target.value)}
|
|
/>
|
|
</div>
|
|
<div className="space-y-1.5">
|
|
<Label htmlFor={passwordId}>App password</Label>
|
|
<Input
|
|
id={passwordId}
|
|
type="password"
|
|
autoComplete="off"
|
|
placeholder="xxxx-xxxx-xxxx-xxxx"
|
|
value={password}
|
|
disabled={busy}
|
|
onChange={(e) => setPassword(e.target.value)}
|
|
/>
|
|
<p className="text-xs text-muted-foreground">
|
|
Create one in Bluesky under Settings, Privacy and security, App passwords. Do not use
|
|
your main password.
|
|
</p>
|
|
</div>
|
|
{showAdvanced ? (
|
|
<div className="space-y-1.5">
|
|
<Label htmlFor={pdsId}>Hosting provider (optional)</Label>
|
|
<Input
|
|
id={pdsId}
|
|
placeholder="https://bsky.social"
|
|
value={pds}
|
|
disabled={busy}
|
|
onChange={(e) => setPds(e.target.value)}
|
|
/>
|
|
</div>
|
|
) : (
|
|
<button
|
|
type="button"
|
|
className="text-xs text-muted-foreground underline-offset-4 hover:underline"
|
|
onClick={() => setShowAdvanced(true)}
|
|
>
|
|
Self-hosted account?
|
|
</button>
|
|
)}
|
|
<Button type="submit" size="sm" className="w-full" disabled={!canSubmit}>
|
|
{busy ? <Loader2 className="size-4 animate-spin" aria-hidden /> : <Plug className="size-4" aria-hidden />}
|
|
Connect Bluesky
|
|
</Button>
|
|
</form>
|
|
);
|
|
}
|