mirror of
https://github.com/spacedriveapp/spacedrive
synced 2024-07-04 08:43:27 +00:00
Compare commits
2 commits
a4db125c96
...
7c00d2ef50
Author | SHA1 | Date | |
---|---|---|---|
|
7c00d2ef50 | ||
|
e1ec45bf5e |
|
@ -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>
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue