Open deploy progress immediately and improve delete row glass overlay.
Track in-progress deploys in the client store so the progress modal opens on click without waiting for the applications list refetch. Show deleting state as a blurred glass overlay on table rows and service cards instead of replacing row content. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -12,8 +12,18 @@ export function deletingResourceMessage(
|
||||
return name ? `Deleting “${name}”…` : 'Deleting application…';
|
||||
}
|
||||
|
||||
/** Single table cell spanning the full row — content centered in the row. */
|
||||
export function DeletingTableRowCell({
|
||||
/** Applied to row cells under the glass overlay so content stays visible but blurred. */
|
||||
export const deletingRowContentClass =
|
||||
'opacity-45 blur-[2px] pointer-events-none select-none transition-[filter,opacity] duration-200';
|
||||
|
||||
const glassPanelClass =
|
||||
'flex min-h-[52px] h-full w-full items-center justify-center gap-2 bg-white/45 backdrop-blur-md text-sm font-semibold text-gray-900 ring-1 ring-inset ring-white/50';
|
||||
|
||||
/**
|
||||
* Glass overlay on a table row. Parent `<tr>` must be `relative`; render all `<td>` cells first,
|
||||
* then this as the last child while deleting.
|
||||
*/
|
||||
export function DeletingTableRowOverlay({
|
||||
colSpan,
|
||||
message = 'Deleting…',
|
||||
}: {
|
||||
@@ -21,8 +31,13 @@ export function DeletingTableRowCell({
|
||||
message?: string;
|
||||
}) {
|
||||
return (
|
||||
<td colSpan={colSpan} className="px-6 py-4 bg-white/80 backdrop-blur-sm" aria-live="polite" aria-busy="true">
|
||||
<div className="flex min-h-[52px] w-full items-center justify-center gap-2 text-sm font-semibold text-gray-800">
|
||||
<td
|
||||
colSpan={colSpan}
|
||||
className="!absolute inset-0 z-10 border-0 p-0 m-0 h-full w-full max-w-none bg-transparent"
|
||||
aria-live="polite"
|
||||
aria-busy="true"
|
||||
>
|
||||
<div className={glassPanelClass}>
|
||||
<Clock className="w-4 h-4 shrink-0 animate-spin text-red-600" />
|
||||
<span>{message}</span>
|
||||
</div>
|
||||
@@ -30,11 +45,22 @@ export function DeletingTableRowCell({
|
||||
);
|
||||
}
|
||||
|
||||
/** Full-card overlay while delete is in progress. Parent must be `relative`. */
|
||||
/** @deprecated Use DeletingTableRowOverlay on top of visible row cells */
|
||||
export function DeletingTableRowCell({
|
||||
colSpan,
|
||||
message = 'Deleting…',
|
||||
}: {
|
||||
colSpan: number;
|
||||
message?: string;
|
||||
}) {
|
||||
return <DeletingTableRowOverlay colSpan={colSpan} message={message} />;
|
||||
}
|
||||
|
||||
/** Full-card glass overlay while delete is in progress. Parent must be `relative`. */
|
||||
export function DeletingCardOverlay({ message = 'Deleting…' }: { message?: string }) {
|
||||
return (
|
||||
<div
|
||||
className="absolute inset-0 z-20 flex items-center justify-center gap-2 rounded-xl bg-white/75 backdrop-blur-sm text-sm font-semibold text-gray-800"
|
||||
className="absolute inset-0 z-20 flex items-center justify-center gap-2 rounded-xl bg-white/45 backdrop-blur-md text-sm font-semibold text-gray-900 ring-1 ring-inset ring-white/50"
|
||||
aria-live="polite"
|
||||
aria-busy="true"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user