fix and new logo

This commit is contained in:
2025-11-13 12:12:25 +01:00
parent 6fe7bbbbb5
commit f7251b8ce3
4 changed files with 13 additions and 7 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 397 KiB

@@ -3,6 +3,7 @@ import { useCallback, useMemo } from 'react';
type Identifier = string | number;
type DocumentEntry = { id?: Identifier } & Record<string, unknown>;
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> | void;
inspectDocument?: (doc: DocumentEntry) => void;
inspectDocument?: (doc: InspectTarget) => void;
handleEntryPointerCore?: (...args: unknown[]) => void;
promoteSelectionOrder?: (...args: unknown[]) => void;
currentTenantId?: Identifier | null;
@@ -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;
}
+6 -4
View File
@@ -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 }) => (
<LogoSvg
<img
src={logoWebp}
className={composeClassName('logo-icon', className)}
width={width}
height={height}
aria-hidden="true"
focusable="false"
alt="Papercrate logo"
loading="lazy"
decoding="async"
/>
);