[ENG-1808] Fix job manager icons (#2573)

Fix job manager icons
This commit is contained in:
ameer2468 2024-06-27 18:56:07 +03:00 committed by GitHub
parent e2253bc5ba
commit e1ec45bf5e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 22 additions and 27 deletions

View file

@ -12,6 +12,20 @@ import {
Icon as PhosphorIcon, Icon as PhosphorIcon,
Snowflake Snowflake
} from '@phosphor-icons/react'; } from '@phosphor-icons/react';
import clsx from 'clsx';
import dayjs from 'dayjs';
import {
forwardRef,
useCallback,
useEffect,
useMemo,
useState,
type HTMLAttributes,
type ReactNode
} from 'react';
import { useLocation } from 'react-router';
import { Link as NavLink } from 'react-router-dom';
import Sticky from 'react-sticky-el';
import { import {
FilePath, FilePath,
FilePathForFrontend, FilePathForFrontend,
@ -28,20 +42,6 @@ import {
type ExplorerItem type ExplorerItem
} from '@sd/client'; } from '@sd/client';
import { Button, Divider, DropdownMenu, toast, Tooltip, tw } from '@sd/ui'; import { Button, Divider, DropdownMenu, toast, Tooltip, tw } from '@sd/ui';
import clsx from 'clsx';
import dayjs from 'dayjs';
import {
forwardRef,
useCallback,
useEffect,
useMemo,
useState,
type HTMLAttributes,
type ReactNode
} from 'react';
import { useLocation } from 'react-router';
import { Link as NavLink } from 'react-router-dom';
import Sticky from 'react-sticky-el';
import { LibraryIdParamsSchema } from '~/app/route-schemas'; import { LibraryIdParamsSchema } from '~/app/route-schemas';
import { Folder, Icon } from '~/components'; import { Folder, Icon } from '~/components';
import { useLocale, useZodRouteParams } from '~/hooks'; import { useLocale, useZodRouteParams } from '~/hooks';
@ -102,11 +102,7 @@ export const Inspector = forwardRef<HTMLDivElement, Props>(
const { t } = useLocale(); const { t } = useLocale();
return ( return (
<div ref={ref} style={{ width: INSPECTOR_WIDTH, ...style }} {...props}> <div ref={ref} style={{ width: INSPECTOR_WIDTH, ...style }} {...props}>
<Sticky <Sticky stickyClassName="!top-[40px]" topOffset={-40}>
scrollElement=".explorer-inspector-scroll"
stickyClassName="!top-[40px]"
topOffset={-40}
>
{showThumbnail && ( {showThumbnail && (
<div className="relative mb-2 flex aspect-square items-center justify-center px-2"> <div className="relative mb-2 flex aspect-square items-center justify-center px-2">
{isNonEmpty(selectedItems) ? ( {isNonEmpty(selectedItems) ? (
@ -526,7 +522,6 @@ const MultiItemMetadata = ({ items }: { items: ExplorerItem[] }) => {
const onlyNonIndexed = metadata.types.has('NonIndexedPath') && metadata.types.size === 1; const onlyNonIndexed = metadata.types.has('NonIndexedPath') && metadata.types.size === 1;
const filesSize = humanizeSize(metadata.size); const filesSize = humanizeSize(metadata.size);
return ( return (
<> <>
<MetaContainer> <MetaContainer>

View file

@ -24,13 +24,13 @@ interface JobProps {
} }
const JobIcon: Record<string, Icon> = { const JobIcon: Record<string, Icon> = {
indexer: Folder, Indexer: Folder,
media_processor: Image, MediaProcessor: Image,
file_identifier: Fingerprint, FileIdentifier: Fingerprint,
file_copier: Copy, FileCopier: Copy,
file_deleter: Trash, FileDeleter: Trash,
file_cutter: Scissors, FileCutter: Scissors,
object_validator: Fingerprint ObjectValidator: Fingerprint
}; };
function Job({ job, className, isChild, progress }: JobProps) { function Job({ job, className, isChild, progress }: JobProps) {