diff --git a/frontend/src/assets/logo.webp b/frontend/src/assets/logo.webp new file mode 100644 index 0000000..0e0c1eb Binary files /dev/null and b/frontend/src/assets/logo.webp differ diff --git a/frontend/src/desktop/useDeskWorkspaceProps.ts b/frontend/src/desktop/useDeskWorkspaceProps.ts index bf9f51c..d46caf3 100644 --- a/frontend/src/desktop/useDeskWorkspaceProps.ts +++ b/frontend/src/desktop/useDeskWorkspaceProps.ts @@ -3,6 +3,7 @@ import { useCallback, useMemo } from 'react'; type Identifier = string | number; type DocumentEntry = { id?: Identifier } & Record; +type InspectTarget = DocumentEntry | Identifier | null | undefined; type WorkspaceViewMode = 'desk' | 'grid' | 'list' | string; @@ -24,7 +25,7 @@ interface UseDeskWorkspacePropsArgs { handleDocumentsViewModeChange?: (mode: WorkspaceViewMode) => void; handleDeskExit?: () => void; refreshCurrentFolder?: () => Promise | void; - inspectDocument?: (doc: DocumentEntry) => void; + inspectDocument?: (doc: InspectTarget) => void; handleEntryPointerCore?: (...args: unknown[]) => void; promoteSelectionOrder?: (...args: unknown[]) => void; currentTenantId?: Identifier | null; diff --git a/frontend/src/hooks/documents/useDocumentsWorkspace.ts b/frontend/src/hooks/documents/useDocumentsWorkspace.ts index 4d758d4..befc884 100644 --- a/frontend/src/hooks/documents/useDocumentsWorkspace.ts +++ b/frontend/src/hooks/documents/useDocumentsWorkspace.ts @@ -1268,8 +1268,11 @@ const useDocumentsWorkspace = ({ }); const inspectDocumentForDesk = useCallback( - (doc: DocumentLike | null) => { - const docId = doc?.id; + (docOrId: DocumentLike | Identifier | null | undefined) => { + if (docOrId == null) { + return; + } + const docId = typeof docOrId === 'object' ? docOrId?.id : docOrId; if (docId == null) { return; } diff --git a/frontend/src/ui/icons.tsx b/frontend/src/ui/icons.tsx index 5e736da..85dc09c 100644 --- a/frontend/src/ui/icons.tsx +++ b/frontend/src/ui/icons.tsx @@ -50,7 +50,7 @@ import { IconAlertTriangle, } from '@tabler/icons-react'; import FolderSvg from '../assets/folder.svg'; -import LogoSvg from '../assets/logo.svg'; +const logoWebp = new URL('../assets/logo.webp', import.meta.url).toString(); import composeClassName from './classNames'; type TablerIconComponent = (props: TablerIconProps) => JSX.Element; @@ -99,12 +99,14 @@ export const FolderIcon: TablerIconComponent = ({ className, size = 16, title, . }; export const LogoIcon: React.FC<{ className?: string; width?: number; height?: number }> = ({ className, width = 24, height = 24 }) => ( -