feat: add preview management, channel controls, invite polish, and recovery

- Auto-extract preview images from ZIP/RAR/7z archives during ingestion
- Upload custom preview images via package drawer
- Select preview from archive contents with on-demand extraction UI
- Manually add Telegram channels by t.me link, username, or invite link
- Invite code UX: bulk create, copy link, usage tracking, delete confirm
- Incomplete upload recovery: verify dest messages on worker startup
- Rebuild package DB by scanning destination channel with live progress

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
admin
2026-03-22 00:09:59 +01:00
parent bf093cdfca
commit ab558e00f5
26 changed files with 3028 additions and 98 deletions

View File

@@ -17,15 +17,15 @@ export async function registerUser(input: unknown): Promise<ActionResult<{ id: s
});
if (!invite) {
return { success: false, error: "Invalid invite code" };
return { success: false, error: "Invalid invite code. Please check the code and try again." };
}
if (invite.uses >= invite.maxUses) {
return { success: false, error: "This invite code has already been used" };
return { success: false, error: "This invite code has reached its maximum number of uses" };
}
if (invite.expiresAt && invite.expiresAt < new Date()) {
return { success: false, error: "This invite code has expired" };
return { success: false, error: "This invite code has expired. Please request a new one." };
}
const existing = await prisma.user.findUnique({
@@ -46,6 +46,7 @@ export async function registerUser(input: unknown): Promise<ActionResult<{ id: s
email: parsed.data.email,
hashedPassword,
role: "USER",
usedInviteId: invite.id,
settings: {
create: {
lowStockThreshold: 10,