chore: run bun format to automatically format the frontend code

This commit is contained in:
t0ng7u
2026-07-01 06:38:41 +08:00
parent e514db20f7
commit 5bf3468362
679 changed files with 2719 additions and 1717 deletions
+1
View File
@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import { api } from '@/lib/api'
import type { SystemInstanceListResponse } from './types'
export async function listSystemInstances() {
@@ -20,8 +20,7 @@ import { useQuery } from '@tanstack/react-query'
import { AlertTriangle, RefreshCw, ServerCog } from 'lucide-react'
import type { ReactNode } from 'react'
import { useTranslation } from 'react-i18next'
import { formatTimestampRelative, formatTimestampToDate } from '@/lib/format'
import { cn } from '@/lib/utils'
import { ErrorState } from '@/components/error-state'
import { Badge } from '@/components/ui/badge'
import { Button } from '@/components/ui/button'
@@ -48,6 +47,9 @@ import {
TooltipProvider,
TooltipTrigger,
} from '@/components/ui/tooltip'
import { formatTimestampRelative, formatTimestampToDate } from '@/lib/format'
import { cn } from '@/lib/utils'
import { listSystemInstances } from '../api'
import type { SystemInstance, SystemInstanceStatus } from '../types'
@@ -225,7 +227,9 @@ function SystemInstancesList(props: SystemInstancesTableProps) {
</TableHead>
<TableHead className='h-9 w-[100px] text-xs'>{t('Role')}</TableHead>
<TableHead className='h-9 w-[96px] text-xs'>{t('CPU')}</TableHead>
<TableHead className='h-9 w-[96px] text-xs'>{t('Memory')}</TableHead>
<TableHead className='h-9 w-[96px] text-xs'>
{t('Memory')}
</TableHead>
<TableHead className='h-9 w-[96px] text-xs'>
{t('Storage')}
</TableHead>
@@ -320,7 +324,10 @@ function SystemInstancesList(props: SystemInstancesTableProps) {
<TableCell className='py-2.5 align-middle'>
<Badge
variant='secondary'
className={cn('gap-1.5', STATUS_CLASS_NAME[instance.status])}
className={cn(
'gap-1.5',
STATUS_CLASS_NAME[instance.status]
)}
>
<span
className={cn(
@@ -394,11 +401,11 @@ function SystemInstancesList(props: SystemInstancesTableProps) {
{runtimeLabel(instance)}
</div>
</TableCell>
<TableCell className='text-muted-foreground py-2.5 text-xs whitespace-nowrap align-middle'>
<TableCell className='text-muted-foreground py-2.5 align-middle text-xs whitespace-nowrap'>
{formatTimestampToDate(instance.started_at)}
</TableCell>
<TableCell
className='text-muted-foreground py-2.5 pr-4 text-xs whitespace-nowrap align-middle'
className='text-muted-foreground py-2.5 pr-4 align-middle text-xs whitespace-nowrap'
title={formatTimestampToDate(instance.last_seen_at)}
>
{formatTimestampRelative(
@@ -19,8 +19,7 @@ For commercial licensing, please contact support@quantumnous.com
import { useQuery } from '@tanstack/react-query'
import { ListChecks, RefreshCw } from 'lucide-react'
import { useTranslation } from 'react-i18next'
import { formatTimestampRelative, formatTimestampToDate } from '@/lib/format'
import { cn } from '@/lib/utils'
import { ErrorState } from '@/components/error-state'
import { Badge } from '@/components/ui/badge'
import { Button } from '@/components/ui/button'
@@ -39,6 +38,8 @@ import type {
SystemTask,
SystemTaskStatus,
} from '@/features/system-settings/types'
import { formatTimestampRelative, formatTimestampToDate } from '@/lib/format'
import { cn } from '@/lib/utils'
const TASK_LIMIT = 20
const ACTIVE_POLL_INTERVAL_MS = 8000
@@ -51,7 +52,8 @@ const STATUS_VARIANT: Record<SystemTaskStatus, 'secondary' | 'destructive'> = {
}
const STATUS_CLASS_NAME: Record<SystemTaskStatus, string> = {
pending: 'bg-amber-50 text-amber-700 dark:bg-amber-500/15 dark:text-amber-300',
pending:
'bg-amber-50 text-amber-700 dark:bg-amber-500/15 dark:text-amber-300',
running:
'bg-sky-50 text-sky-700 dark:bg-sky-500/15 dark:text-sky-300 [&_span]:bg-sky-500',
succeeded:
@@ -173,11 +175,11 @@ function SystemTasksTable(props: SystemTasksTableProps) {
</span>
</div>
</TableCell>
<TableCell className='text-muted-foreground max-w-[280px] truncate py-3 font-mono text-xs align-middle'>
<TableCell className='text-muted-foreground max-w-[280px] truncate py-3 align-middle font-mono text-xs'>
{task.locked_by || '-'}
</TableCell>
<TableCell
className='text-muted-foreground py-3 text-xs whitespace-nowrap align-middle'
className='text-muted-foreground py-3 align-middle text-xs whitespace-nowrap'
title={formatTimestampToDate(task.updated_at)}
>
{formatTimestampRelative(
@@ -187,7 +189,7 @@ function SystemTasksTable(props: SystemTasksTableProps) {
)}
</TableCell>
<TableCell
className='text-destructive max-w-[220px] truncate py-3 pr-4 text-xs align-middle'
className='text-destructive max-w-[220px] truncate py-3 pr-4 align-middle text-xs'
title={task.error || undefined}
>
{task.error || '-'}
+2
View File
@@ -17,8 +17,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import { useTranslation } from 'react-i18next'
import { SectionPageLayout } from '@/components/layout'
import { Badge } from '@/components/ui/badge'
import { SystemInstancesPanel } from './components/system-instances-panel'
import { SystemTasksPanel } from './components/system-tasks-panel'