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.
60 lines
1.6 KiB
TypeScript
60 lines
1.6 KiB
TypeScript
import type { LucideIcon } from "lucide-react";
|
|
import { AtSign, Cloud, Facebook, Linkedin, Pin, Twitter } from "lucide-react";
|
|
import type { ExtendedPlatform, PlatformState, PostStatus } from "../_lib/publishing-api";
|
|
|
|
export const PLATFORM_ICONS: Record<ExtendedPlatform, LucideIcon> = {
|
|
facebook: Facebook,
|
|
linkedin: Linkedin,
|
|
x: Twitter,
|
|
threads: AtSign,
|
|
pinterest: Pin,
|
|
bluesky: Cloud,
|
|
};
|
|
|
|
export const PLATFORM_LABELS: Record<ExtendedPlatform, string> = {
|
|
facebook: "Facebook Page",
|
|
linkedin: "LinkedIn",
|
|
x: "X",
|
|
threads: "Threads",
|
|
pinterest: "Pinterest",
|
|
bluesky: "Bluesky",
|
|
};
|
|
|
|
export const STATE_LABELS: Record<PlatformState, string> = {
|
|
not_configured: "Not set up on this server",
|
|
plan_required: "Paid X API plan required",
|
|
not_connected: "Not connected",
|
|
needs_target: "Choose where to post",
|
|
needs_reauth: "Reconnect needed",
|
|
connected: "Connected",
|
|
};
|
|
|
|
export const TARGET_NOUN: Record<string, string> = {
|
|
page: "Page",
|
|
organization: "company page",
|
|
board: "board",
|
|
self: "account",
|
|
};
|
|
|
|
export const POST_STATUS_LABELS: Record<PostStatus, string> = {
|
|
scheduled: "Scheduled",
|
|
publishing: "Posting",
|
|
processing: "Processing on the platform",
|
|
published: "Published",
|
|
failed: "Failed",
|
|
canceled: "Canceled",
|
|
held: "Held for review",
|
|
};
|
|
|
|
export function formatWhen(iso: string | null): string {
|
|
if (!iso) return "";
|
|
const date = new Date(iso);
|
|
if (Number.isNaN(date.getTime())) return "";
|
|
return date.toLocaleString(undefined, {
|
|
month: "short",
|
|
day: "numeric",
|
|
hour: "numeric",
|
|
minute: "2-digit",
|
|
});
|
|
}
|