"use client"; import { ArrowUpCircleIcon } from "lucide-react"; import { useRouter } from "next/navigation"; import { useState } from "react"; import { startUpdate } from "@/components/job-actions"; import { LocalTime } from "@/components/local-time"; import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, } from "@/components/ui/alert-dialog"; import { Button } from "@/components/ui/button"; import type { UpdateDiff, UpdateDiffFile } from "@/lib/db/schema"; import { formatBytes, shortSha } from "@/lib/format"; function FileGroup({ title, files, tone }: { title: string; files: UpdateDiffFile[]; tone: string }) { if (files.length === 0) return null; return (
Update available: {revision} is at{" "} {shortSha(diff.sha)}
You have {shortSha(pinnedSha)}.{" "}
{changes === 0
? "None of your selected files changed; updating only moves the pin."
: `${changes} of your selected files would change (${formatBytes(download)} to download).`}{" "}
Checked