mirror of
https://github.com/Studio-Saelix/sencho.git
synced 2026-08-06 17:08:10 +00:00
9ab7819b24
* refactor(frontend): migrate Stack/Fleet confirms and Git source dialog
- LocalUpdateConfirmDialog -> ConfirmModal with kicker LOCAL · UPDATE
- GitSourcePanel form -> Modal with kicker {STACK} · GIT SOURCE; the
custom three-button footer (Remove / Pull now / Save) stays as-is
since ModalFooter's two-slot pattern doesn't fit a left-aligned
destructive action; ModalHeader provides the canonical chrome
- GitSourcePanel remove confirm -> destructive ConfirmModal with
kicker {STACK} · GIT · DISCONNECT
* test(e2e): scope git-source dialog assertion to the heading
The migration adds a kicker rune "<STACK> · GIT SOURCE" inside the
dialog. The previous locator getByText('Git Source', { exact: false })
matched both the kicker (uppercase, mono) and the italic-serif title,
producing a strict-mode violation. Use getByRole('heading') to target
the title specifically.
31 lines
1022 B
TypeScript
31 lines
1022 B
TypeScript
import { Download } from 'lucide-react';
|
|
import { ConfirmModal } from '@/components/ui/modal';
|
|
|
|
interface LocalUpdateConfirmDialogProps {
|
|
open: boolean;
|
|
onOpenChange: (open: boolean) => void;
|
|
onConfirm: () => void;
|
|
}
|
|
|
|
export function LocalUpdateConfirmDialog({ open, onOpenChange, onConfirm }: LocalUpdateConfirmDialogProps) {
|
|
return (
|
|
<ConfirmModal
|
|
open={open}
|
|
onOpenChange={onOpenChange}
|
|
kicker="LOCAL · UPDATE"
|
|
title="Update local node"
|
|
confirmLabel={
|
|
<>
|
|
<Download className="w-4 h-4 mr-1.5" strokeWidth={1.5} />
|
|
Update & restart
|
|
</>
|
|
}
|
|
onConfirm={onConfirm}
|
|
>
|
|
<p className="text-sm text-stat-subtitle">
|
|
Pulls the latest Sencho image and restarts the server. The dashboard briefly disconnects and reconnects automatically when the update completes.
|
|
</p>
|
|
</ConfirmModal>
|
|
);
|
|
}
|