🩹(frontend) improve minor ux/ui
- Better logo resolution (x4) - Remove floating bar when printing a doc - Add loader during doc import
This commit is contained in:
@@ -98,7 +98,7 @@ test.describe('Home page', () => {
|
|||||||
style: { width: '110px', height: 'auto' },
|
style: { width: '110px', height: 'auto' },
|
||||||
},
|
},
|
||||||
icon: {
|
icon: {
|
||||||
src: '/assets/icon-docs-v2.svg',
|
src: '/assets/icon-docs-dsfr-v2.png',
|
||||||
style: {
|
style: {
|
||||||
width: '100px',
|
width: '100px',
|
||||||
height: 'auto',
|
height: 'auto',
|
||||||
|
|||||||
BIN
src/frontend/apps/impress/public/assets/icon-docs-dsfr-v2.png
Normal file
BIN
src/frontend/apps/impress/public/assets/icon-docs-dsfr-v2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 9.1 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.9 KiB |
@@ -16,6 +16,7 @@ const PRINT_ONLY_CONTENT_CSS = `
|
|||||||
|
|
||||||
/* Hide non-essential elements for printing */
|
/* Hide non-essential elements for printing */
|
||||||
.--docs--header,
|
.--docs--header,
|
||||||
|
.--docs--floating-bar,
|
||||||
.--docs--resizable-left-panel,
|
.--docs--resizable-left-panel,
|
||||||
.--docs--doc-editor-header,
|
.--docs--doc-editor-header,
|
||||||
.--docs--doc-header,
|
.--docs--doc-header,
|
||||||
|
|||||||
@@ -39,7 +39,12 @@ export const DocsGrid = ({
|
|||||||
}: DocsGridProps) => {
|
}: DocsGridProps) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const [isDragOver, setIsDragOver] = useState(false);
|
const [isDragOver, setIsDragOver] = useState(false);
|
||||||
const { getRootProps, getInputProps, open } = useImport({
|
const {
|
||||||
|
getRootProps,
|
||||||
|
getInputProps,
|
||||||
|
open,
|
||||||
|
isPending: isImportPending,
|
||||||
|
} = useImport({
|
||||||
onDragOver: (dragOver: boolean) => {
|
onDragOver: (dragOver: boolean) => {
|
||||||
setIsDragOver(dragOver);
|
setIsDragOver(dragOver);
|
||||||
},
|
},
|
||||||
@@ -94,7 +99,7 @@ export const DocsGrid = ({
|
|||||||
$align="center"
|
$align="center"
|
||||||
className="--docs--doc-grid"
|
className="--docs--doc-grid"
|
||||||
>
|
>
|
||||||
<DocsGridLoader isLoading={isRefetching || loading} />
|
<DocsGridLoader isLoading={isRefetching || loading || isImportPending} />
|
||||||
<Card
|
<Card
|
||||||
data-testid="docs-grid"
|
data-testid="docs-grid"
|
||||||
$height="100%"
|
$height="100%"
|
||||||
|
|||||||
@@ -225,7 +225,13 @@ export const DocsGridItemDate = ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Text $size="xs" $layer="background" $theme="neutral" $variation="primary">
|
<Text
|
||||||
|
$size="xs"
|
||||||
|
$layer="background"
|
||||||
|
$theme="neutral"
|
||||||
|
$variation="primary"
|
||||||
|
$shrink="0"
|
||||||
|
>
|
||||||
{dateToDisplay}
|
{dateToDisplay}
|
||||||
</Text>
|
</Text>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ export const useImport = ({ onDragOver }: UseImportProps) => {
|
|||||||
},
|
},
|
||||||
noClick: true,
|
noClick: true,
|
||||||
});
|
});
|
||||||
const { mutate: importDoc } = useImportDoc();
|
const { mutate: importDoc, isPending } = useImportDoc();
|
||||||
|
|
||||||
return { getRootProps, getInputProps, open };
|
return { getRootProps, getInputProps, open, isPending };
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user