diff --git a/server.js b/server.js index 4f89231..fbc32fd 100644 --- a/server.js +++ b/server.js @@ -92,7 +92,7 @@ class ScriptExecutionHandler { /** * Handle WebSocket upgrade for our endpoint * @param {import('http').IncomingMessage} request - * @param {import('net').Socket} socket + * @param {import('stream').Duplex} socket * @param {Buffer} head */ handleUpgrade(request, socket, head) { diff --git a/src/app/_components/UpdateConfirmationModal.tsx b/src/app/_components/UpdateConfirmationModal.tsx new file mode 100644 index 0000000..3fb231e --- /dev/null +++ b/src/app/_components/UpdateConfirmationModal.tsx @@ -0,0 +1,175 @@ +'use client'; + +import { api } from '~/trpc/react'; +import { Button } from './ui/button'; +import { Badge } from './ui/badge'; +import { X, ExternalLink, Calendar, Tag, Loader2, AlertTriangle } from 'lucide-react'; +import { useRegisterModal } from './modal/ModalStackProvider'; +import ReactMarkdown from 'react-markdown'; +import remarkGfm from 'remark-gfm'; + +interface UpdateConfirmationModalProps { + isOpen: boolean; + onClose: () => void; + onConfirm: () => void; + releaseInfo: { + tagName: string; + name: string; + publishedAt: string; + htmlUrl: string; + body?: string; + } | null; + currentVersion: string; + latestVersion: string; +} + +export function UpdateConfirmationModal({ + isOpen, + onClose, + onConfirm, + releaseInfo, + currentVersion, + latestVersion +}: UpdateConfirmationModalProps) { + useRegisterModal(isOpen, { id: 'update-confirmation-modal', allowEscape: true, onClose }); + + if (!isOpen || !releaseInfo) return null; + + return ( +
+ Review the changelog before proceeding with the update +
+{children}
, + ul: ({children}) =>No changelog available for this release.
+Important:
++ Please review the changelog above for any breaking changes or important updates before proceeding. + The server will restart automatically after the update completes. +
+