fix and new logo
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 397 KiB |
@@ -3,6 +3,7 @@ import { useCallback, useMemo } from 'react';
|
|||||||
type Identifier = string | number;
|
type Identifier = string | number;
|
||||||
|
|
||||||
type DocumentEntry = { id?: Identifier } & Record<string, unknown>;
|
type DocumentEntry = { id?: Identifier } & Record<string, unknown>;
|
||||||
|
type InspectTarget = DocumentEntry | Identifier | null | undefined;
|
||||||
|
|
||||||
type WorkspaceViewMode = 'desk' | 'grid' | 'list' | string;
|
type WorkspaceViewMode = 'desk' | 'grid' | 'list' | string;
|
||||||
|
|
||||||
@@ -24,7 +25,7 @@ interface UseDeskWorkspacePropsArgs {
|
|||||||
handleDocumentsViewModeChange?: (mode: WorkspaceViewMode) => void;
|
handleDocumentsViewModeChange?: (mode: WorkspaceViewMode) => void;
|
||||||
handleDeskExit?: () => void;
|
handleDeskExit?: () => void;
|
||||||
refreshCurrentFolder?: () => Promise<void> | void;
|
refreshCurrentFolder?: () => Promise<void> | void;
|
||||||
inspectDocument?: (doc: DocumentEntry) => void;
|
inspectDocument?: (doc: InspectTarget) => void;
|
||||||
handleEntryPointerCore?: (...args: unknown[]) => void;
|
handleEntryPointerCore?: (...args: unknown[]) => void;
|
||||||
promoteSelectionOrder?: (...args: unknown[]) => void;
|
promoteSelectionOrder?: (...args: unknown[]) => void;
|
||||||
currentTenantId?: Identifier | null;
|
currentTenantId?: Identifier | null;
|
||||||
|
|||||||
@@ -1268,8 +1268,11 @@ const useDocumentsWorkspace = ({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const inspectDocumentForDesk = useCallback(
|
const inspectDocumentForDesk = useCallback(
|
||||||
(doc: DocumentLike | null) => {
|
(docOrId: DocumentLike | Identifier | null | undefined) => {
|
||||||
const docId = doc?.id;
|
if (docOrId == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const docId = typeof docOrId === 'object' ? docOrId?.id : docOrId;
|
||||||
if (docId == null) {
|
if (docId == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ import {
|
|||||||
IconAlertTriangle,
|
IconAlertTriangle,
|
||||||
} from '@tabler/icons-react';
|
} from '@tabler/icons-react';
|
||||||
import FolderSvg from '../assets/folder.svg';
|
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';
|
import composeClassName from './classNames';
|
||||||
|
|
||||||
type TablerIconComponent = (props: TablerIconProps) => JSX.Element;
|
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 }) => (
|
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)}
|
className={composeClassName('logo-icon', className)}
|
||||||
width={width}
|
width={width}
|
||||||
height={height}
|
height={height}
|
||||||
aria-hidden="true"
|
alt="Papercrate logo"
|
||||||
focusable="false"
|
loading="lazy"
|
||||||
|
decoding="async"
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user