mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-25 19:15:18 +02:00
chore: ran linting
This commit is contained in:
parent
2adf5750df
commit
195dbc5fc0
2 changed files with 19 additions and 9 deletions
|
|
@ -37,7 +37,11 @@ function StatusBadge({ status }: { status: NavItem["statusIndicator"] }) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
function StatusIcon({ status, FallbackIcon, className }: {
|
function StatusIcon({
|
||||||
|
status,
|
||||||
|
FallbackIcon,
|
||||||
|
className,
|
||||||
|
}: {
|
||||||
status: NavItem["statusIndicator"];
|
status: NavItem["statusIndicator"];
|
||||||
FallbackIcon: NavItem["icon"];
|
FallbackIcon: NavItem["icon"];
|
||||||
className?: string;
|
className?: string;
|
||||||
|
|
@ -46,10 +50,18 @@ function StatusIcon({ status, FallbackIcon, className }: {
|
||||||
return <Spinner size="sm" className={cn("shrink-0 text-primary", className)} />;
|
return <Spinner size="sm" className={cn("shrink-0 text-primary", className)} />;
|
||||||
}
|
}
|
||||||
if (status === "success") {
|
if (status === "success") {
|
||||||
return <CheckCircle2 className={cn("shrink-0 text-emerald-500 animate-in fade-in duration-300", className)} />;
|
return (
|
||||||
|
<CheckCircle2
|
||||||
|
className={cn("shrink-0 text-emerald-500 animate-in fade-in duration-300", className)}
|
||||||
|
/>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
if (status === "error") {
|
if (status === "error") {
|
||||||
return <CircleAlert className={cn("shrink-0 text-destructive animate-in fade-in duration-300", className)} />;
|
return (
|
||||||
|
<CircleAlert
|
||||||
|
className={cn("shrink-0 text-destructive animate-in fade-in duration-300", className)}
|
||||||
|
/>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
return <FallbackIcon className={cn("shrink-0", className)} />;
|
return <FallbackIcon className={cn("shrink-0", className)} />;
|
||||||
}
|
}
|
||||||
|
|
@ -113,11 +125,7 @@ export function NavSection({ items, onItemClick, isCollapsed = false }: NavSecti
|
||||||
)}
|
)}
|
||||||
{...joyrideAttr}
|
{...joyrideAttr}
|
||||||
>
|
>
|
||||||
<StatusIcon
|
<StatusIcon status={indicator} FallbackIcon={Icon} className="h-4 w-4" />
|
||||||
status={indicator}
|
|
||||||
FallbackIcon={Icon}
|
|
||||||
className="h-4 w-4"
|
|
||||||
/>
|
|
||||||
<span className="flex-1 truncate">{item.title}</span>
|
<span className="flex-1 truncate">{item.title}</span>
|
||||||
{item.badge && (
|
{item.badge && (
|
||||||
<span className="inline-flex items-center justify-center min-w-4 h-4 px-1 rounded-full bg-red-500 text-white text-[10px] font-medium">
|
<span className="inline-flex items-center justify-center min-w-4 h-4 px-1 rounded-full bg-red-500 text-white text-[10px] font-medium">
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,9 @@ export function useDocumentsProcessing(searchSpaceId: number | null): DocumentsP
|
||||||
}
|
}
|
||||||
|
|
||||||
liveQuery.subscribe(
|
liveQuery.subscribe(
|
||||||
(result: { rows: Array<{ processing_count: number | string; failed_count: number | string }> }) => {
|
(result: {
|
||||||
|
rows: Array<{ processing_count: number | string; failed_count: number | string }>;
|
||||||
|
}) => {
|
||||||
if (!mounted || !result.rows?.[0]) return;
|
if (!mounted || !result.rows?.[0]) return;
|
||||||
|
|
||||||
const processingCount = Number(result.rows[0].processing_count) || 0;
|
const processingCount = Number(result.rows[0].processing_count) || 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue