render page icons

This commit is contained in:
Philipinho
2025-04-23 14:28:01 +01:00
parent 8ea805ee3d
commit 96b8345cef
@@ -15,6 +15,7 @@ import clsx from "clsx";
import { import {
IconChevronDown, IconChevronDown,
IconChevronRight, IconChevronRight,
IconFileDescription,
IconPointFilled, IconPointFilled,
} from "@tabler/icons-react"; } from "@tabler/icons-react";
import { ActionIcon, Box } from "@mantine/core"; import { ActionIcon, Box } from "@mantine/core";
@@ -23,6 +24,7 @@ import { OpenMap } from "react-arborist/dist/main/state/open-slice";
import classes from "@/features/page/tree/styles/tree.module.css"; import classes from "@/features/page/tree/styles/tree.module.css";
import styles from "./share.module.css"; import styles from "./share.module.css";
import { mobileSidebarAtom } from "@/components/layouts/global/hooks/atoms/sidebar-atom.ts"; import { mobileSidebarAtom } from "@/components/layouts/global/hooks/atoms/sidebar-atom.ts";
import EmojiPicker from "@/components/ui/emoji-picker.tsx";
interface SharedTree { interface SharedTree {
sharedPageTree: ISharedPageTree; sharedPageTree: ISharedPageTree;
@@ -141,6 +143,20 @@ function Node({ node, style, tree }: NodeRendererProps<any>) {
}} }}
> >
<PageArrow node={node} /> <PageArrow node={node} />
<div style={{ marginRight: "4px" }}>
<EmojiPicker
onEmojiSelect={() => {}}
icon={
node.data.icon ? (
node.data.icon
) : (
<IconFileDescription size="18" />
)
}
readOnly={true}
removeEmojiAction={() => {}}
/>
</div>
<span className={classes.text}>{node.data.name || t("untitled")}</span> <span className={classes.text}>{node.data.name || t("untitled")}</span>
</Box> </Box>
</> </>