-
+
{allJobsCompleted
? `Added location "${
data.metadata.init.location.name || ''
diff --git a/interface/app/$libraryId/Layout/Sidebar/LibrarySection.tsx b/interface/app/$libraryId/Layout/Sidebar/LibrarySection.tsx
index 63b510852..b207d35bb 100644
--- a/interface/app/$libraryId/Layout/Sidebar/LibrarySection.tsx
+++ b/interface/app/$libraryId/Layout/Sidebar/LibrarySection.tsx
@@ -2,8 +2,8 @@ import { Laptop } from '@sd/assets/icons';
import clsx from 'clsx';
import { Link, NavLink } from 'react-router-dom';
import { arraysEqual, useBridgeQuery, useLibraryQuery, useOnlineLocations } from '@sd/client';
-import { Folder } from '@sd/ui';
import { AddLocationButton } from '~/app/$libraryId/settings/library/locations/AddLocationButton';
+import { Folder } from '~/components/Folder';
import { SubtleButton } from '~/components/SubtleButton';
import SidebarLink from './Link';
import Section from './Section';
diff --git a/interface/app/$libraryId/TopBar/NavigationButtons.tsx b/interface/app/$libraryId/TopBar/NavigationButtons.tsx
index b9a5b3068..b5a52c009 100644
--- a/interface/app/$libraryId/TopBar/NavigationButtons.tsx
+++ b/interface/app/$libraryId/TopBar/NavigationButtons.tsx
@@ -1,6 +1,6 @@
-import { Tooltip } from '@sd/ui';
import { ArrowLeft, ArrowRight } from 'phosphor-react';
import { useNavigate } from 'react-router';
+import { Tooltip } from '@sd/ui';
import { useSearchStore } from '~/hooks';
import TopBarButton from './TopBarButton';
@@ -13,22 +13,22 @@ export const NavigationButtons = () => {
navigate(-1)}
disabled={isFocused || idx === 0}
>
-
+
navigate(1)}
disabled={isFocused || idx === history.length - 1}
>
-
+
diff --git a/interface/app/$libraryId/TopBar/SearchBar.tsx b/interface/app/$libraryId/TopBar/SearchBar.tsx
index 60f35d444..d54b81a66 100644
--- a/interface/app/$libraryId/TopBar/SearchBar.tsx
+++ b/interface/app/$libraryId/TopBar/SearchBar.tsx
@@ -27,7 +27,7 @@ export default () => {
const searchPath = useResolvedPath('search');
- const [value, setValue] = useState(searchParams.search ?? "");
+ const [value, setValue] = useState(searchParams.search ?? '');
const updateParams = useDebouncedCallback((value: string) => {
startTransition(() =>
diff --git a/interface/app/$libraryId/TopBar/TopBarOptions.tsx b/interface/app/$libraryId/TopBar/TopBarOptions.tsx
index ae2a0044a..c5dcb6a39 100644
--- a/interface/app/$libraryId/TopBar/TopBarOptions.tsx
+++ b/interface/app/$libraryId/TopBar/TopBarOptions.tsx
@@ -57,10 +57,10 @@ export default ({ options }: TopBarChildrenProps) => {
const roundingCondition = individual
? 'both'
: index === 0
- ? 'left'
- : index === group.length - 1
- ? 'right'
- : 'none';
+ ? 'left'
+ : index === group.length - 1
+ ? 'right'
+ : 'none';
return (
{
-
+
{path ? getLastSectionOfPath(path) : location.data?.name}
diff --git a/interface/app/$libraryId/search.tsx b/interface/app/$libraryId/search.tsx
index 361c03001..46c62d5b2 100644
--- a/interface/app/$libraryId/search.tsx
+++ b/interface/app/$libraryId/search.tsx
@@ -3,8 +3,8 @@ import { Suspense, memo, useDeferredValue, useEffect, useMemo } from 'react';
import { z } from 'zod';
import { useLibraryQuery } from '@sd/client';
import {
- getExplorerStore,
SortOrder,
+ getExplorerStore,
useExplorerStore,
useExplorerTopBarOptions,
useZodSearchParams
@@ -17,7 +17,7 @@ import TopBarOptions from './TopBar/TopBarOptions';
export const SEARCH_PARAMS = z.object({
search: z.string().optional(),
take: z.coerce.number().optional(),
- order: z.union([z.object({ name: SortOrder }), z.object({ name: SortOrder })]).optional(),
+ order: z.union([z.object({ name: SortOrder }), z.object({ name: SortOrder })]).optional()
});
export type SearchArgs = z.infer;
@@ -30,12 +30,15 @@ const ExplorerStuff = memo((props: { args: SearchArgs }) => {
const { search, ...args } = props.args;
const query = useLibraryQuery(
- ['search.paths', {
- ...args,
- filter: {
- search
- },
- }],
+ [
+ 'search.paths',
+ {
+ ...args,
+ filter: {
+ search
+ }
+ }
+ ],
{
suspense: true,
enabled: !!search
@@ -80,9 +83,7 @@ const ExplorerStuff = memo((props: { args: SearchArgs }) => {
)}
- {search
- ? `No results found for "${search}"`
- : 'Search for files...'}
+ {search ? `No results found for "${search}"` : 'Search for files...'}
)}
diff --git a/interface/app/$libraryId/settings/library/locations/ListItem.tsx b/interface/app/$libraryId/settings/library/locations/ListItem.tsx
index 97c184e08..04213d739 100644
--- a/interface/app/$libraryId/settings/library/locations/ListItem.tsx
+++ b/interface/app/$libraryId/settings/library/locations/ListItem.tsx
@@ -3,7 +3,8 @@ import { Repeat, Trash } from 'phosphor-react';
import { useState } from 'react';
import { useNavigate } from 'react-router';
import { Location, Node, arraysEqual, useLibraryMutation, useOnlineLocations } from '@sd/client';
-import { Button, Card, Folder, Tooltip, dialogManager } from '@sd/ui';
+import { Button, Card, Tooltip, dialogManager } from '@sd/ui';
+import { Folder } from '~/components/Folder';
import DeleteDialog from './DeleteDialog';
interface Props {
diff --git a/packages/ui/src/Folder.tsx b/interface/components/Folder.tsx
similarity index 53%
rename from packages/ui/src/Folder.tsx
rename to interface/components/Folder.tsx
index 691e8fc1a..34977f876 100644
--- a/packages/ui/src/Folder.tsx
+++ b/interface/components/Folder.tsx
@@ -1,5 +1,5 @@
-import { ReactComponent as folderWhiteSvg } from '@sd/assets/svgs/folder-white.svg';
-import { ReactComponent as folderSvg } from '@sd/assets/svgs/folder.svg';
+import folderWhiteSvg from '@sd/assets/svgs/folder-white.svg';
+import folderSvg from '@sd/assets/svgs/folder.svg';
interface FolderProps {
/**
@@ -21,7 +21,13 @@ interface FolderProps {
export function Folder(props: FolderProps) {
const { size = 24 } = props;
- const Icon = props.white ? folderWhiteSvg : folderSvg;
-
- return
;
+ return (
+
![Folder icon]({props.white)
+ );
}
diff --git a/interface/hooks/useExplorerStore.tsx b/interface/hooks/useExplorerStore.tsx
index 172b4890d..c5cfb657b 100644
--- a/interface/hooks/useExplorerStore.tsx
+++ b/interface/hooks/useExplorerStore.tsx
@@ -1,7 +1,7 @@
import { proxy, useSnapshot } from 'valtio';
+import { z } from 'zod';
import { ExplorerItem, FilePathSearchOrdering, ObjectSearchOrdering } from '@sd/client';
import { resetStore } from '@sd/client';
-import { z } from "zod"
type Join
= K extends string | number
? P extends string | number
@@ -26,7 +26,7 @@ export type CutCopyType = 'Cut' | 'Copy';
export type FilePathSearchOrderingKeys = UnionKeys | 'none';
export type ObjectSearchOrderingKyes = UnionKeys | 'none';
-export const SortOrder = z.union([z.literal("Asc"), z.literal("Desc")])
+export const SortOrder = z.union([z.literal('Asc'), z.literal('Desc')]);
const state = {
locationId: null as number | null,
diff --git a/interface/hooks/useExplorerTopBarOptions.tsx b/interface/hooks/useExplorerTopBarOptions.tsx
index a9328f121..64287e89c 100644
--- a/interface/hooks/useExplorerTopBarOptions.tsx
+++ b/interface/hooks/useExplorerTopBarOptions.tsx
@@ -10,11 +10,11 @@ import {
SquaresFour,
Tag
} from 'phosphor-react';
+import { useLibraryMutation } from '@sd/client';
import OptionsPanel from '~/app/$libraryId/Explorer/OptionsPanel';
import { TOP_BAR_ICON_STYLE, ToolOption } from '~/app/$libraryId/TopBar/TopBarOptions';
import { KeyManager } from '../app/$libraryId/KeyManager';
import { getExplorerStore, useExplorerStore } from './useExplorerStore';
-import { useLibraryMutation } from '@sd/client';
export const useExplorerTopBarOptions = () => {
const explorerStore = useExplorerStore();
@@ -100,7 +100,7 @@ export const useExplorerTopBarOptions = () => {
toolTipLabel: 'Reload',
onClick: () => {
if (explorerStore.locationId) {
- reload.mutate({ location_id: explorerStore.locationId, sub_path: '' })
+ reload.mutate({ location_id: explorerStore.locationId, sub_path: '' });
}
},
icon: ,
diff --git a/packages/ui/src/index.ts b/packages/ui/src/index.ts
index d2e7e0b08..fa0f24d9f 100644
--- a/packages/ui/src/index.ts
+++ b/packages/ui/src/index.ts
@@ -21,4 +21,3 @@ export * from './Slider';
export * from './Divider';
export * from './Shortcut';
export * from './ProgressBar';
-export * from './Folder';