Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client'

import { memo } from 'react'
import { Button } from '@sim/emcn'
import { Chip } from '@sim/emcn'
import { Loader, Square } from '@sim/emcn/icons'

interface RunStatusControlProps {
Expand Down Expand Up @@ -38,15 +38,9 @@ export const RunStatusControl = memo(function RunStatusControl({
</>
)}
</div>
<Button
variant='subtle'
className='py-1 text-caption'
onClick={onStopAll}
disabled={isStopping}
>
<Square className='mr-1.5 size-[14px]' />
<Chip leftIcon={Square} onClick={onStopAll} disabled={isStopping}>
{isStopping ? 'Stopping…' : 'Stop all'}
</Button>
</Chip>
</div>
)
})
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client'

import {
Button,
Chip,
DropdownMenu,
DropdownMenuContent,
DropdownMenuTrigger,
Expand Down Expand Up @@ -64,20 +64,21 @@ export function ImportProgressMenu({ workspaceId, tableId }: ImportProgressMenuP
return (
<DropdownMenu open={menuOpen} onOpenChange={setMenuOpen}>
<DropdownMenuTrigger asChild>
<Button variant='subtle' className='py-1 text-caption'>
{/* Aggregate state, mirroring the row iconography: spinner while anything runs, then
alert if any job failed, else a check. */}
{anyRunning ? (
<Loader animate className='mr-1.5 size-[14px] text-[var(--text-icon)]' />
) : anyFailed ? (
<CircleAlert className='mr-1.5 size-[14px] text-[var(--text-error)]' />
) : (
<CircleCheck className='mr-1.5 size-[14px] text-[var(--text-icon)]' />
)}
<Chip
leftAdornment={
anyRunning ? (
<Loader animate className='size-[14px] text-[var(--text-icon)]' />
) : anyFailed ? (
<CircleAlert className='size-[14px] text-[var(--text-error)]' />
) : (
<CircleCheck className='size-[14px] text-[var(--text-icon)]' />
)
}
>
<span className='tabular-nums'>
{done}/{total}
</span>
</Button>
</Chip>
</DropdownMenuTrigger>
<DropdownMenuContent align='end' className='min-w-[320px] max-w-[420px]'>
{imports.map((row) => {
Expand Down
Loading