mirror of
https://github.com/Shadowfita/docmost.git
synced 2025-11-13 16:22:32 +10:00
add space info
This commit is contained in:
@ -1,10 +1,19 @@
|
|||||||
import { Text, Group, Stack, UnstyledButton, Divider } from "@mantine/core";
|
import {
|
||||||
|
Text,
|
||||||
|
Group,
|
||||||
|
Stack,
|
||||||
|
UnstyledButton,
|
||||||
|
Divider,
|
||||||
|
Badge,
|
||||||
|
} from "@mantine/core";
|
||||||
import classes from "./home.module.css";
|
import classes from "./home.module.css";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import PageListSkeleton from "@/components/ui/page-list-skeleton.tsx";
|
import PageListSkeleton from "@/components/ui/page-list-skeleton.tsx";
|
||||||
import { buildPageUrl } from "@/features/page/page.utils.ts";
|
import { buildPageUrl } from "@/features/page/page.utils.ts";
|
||||||
import { formattedDate } from "@/lib/time.ts";
|
import { formattedDate } from "@/lib/time.ts";
|
||||||
import { useRecentChangesQuery } from "@/features/page/queries/page-query.ts";
|
import { useRecentChangesQuery } from "@/features/page/queries/page-query.ts";
|
||||||
|
import { IconFileDescription } from "@tabler/icons-react";
|
||||||
|
import { getSpaceUrl } from "@/lib/config.ts";
|
||||||
|
|
||||||
function RecentChanges() {
|
function RecentChanges() {
|
||||||
const { data, isLoading, isError } = useRecentChangesQuery();
|
const { data, isLoading, isError } = useRecentChangesQuery();
|
||||||
@ -30,11 +39,24 @@ function RecentChanges() {
|
|||||||
>
|
>
|
||||||
<Group wrap="nowrap">
|
<Group wrap="nowrap">
|
||||||
<Stack gap="xs" style={{ flex: 1 }}>
|
<Stack gap="xs" style={{ flex: 1 }}>
|
||||||
<Text fw={500} size="md" lineClamp={1}>
|
<Group wrap="nowrap">
|
||||||
{page.title || "Untitled"}
|
{page.icon || <IconFileDescription size={18} />}
|
||||||
</Text>
|
|
||||||
|
<Text fw={500} size="md" lineClamp={1}>
|
||||||
|
{page.title || "Untitled"}
|
||||||
|
</Text>
|
||||||
|
</Group>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|
||||||
|
<Badge
|
||||||
|
color="blue"
|
||||||
|
variant="light"
|
||||||
|
component={Link}
|
||||||
|
to={getSpaceUrl(page.space.slug)}
|
||||||
|
>
|
||||||
|
{page.space.name}
|
||||||
|
</Badge>
|
||||||
|
|
||||||
<Text c="dimmed" size="xs" fw={500}>
|
<Text c="dimmed" size="xs" fw={500}>
|
||||||
{formattedDate(page.updatedAt)}
|
{formattedDate(page.updatedAt)}
|
||||||
</Text>
|
</Text>
|
||||||
|
|||||||
@ -325,7 +325,7 @@ function Node({ node, style, dragHandle, tree }: NodeRendererProps<any>) {
|
|||||||
node.data.icon ? (
|
node.data.icon ? (
|
||||||
node.data.icon
|
node.data.icon
|
||||||
) : (
|
) : (
|
||||||
<IconFileDescription size="18px" />
|
<IconFileDescription size="18" />
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
removeEmojiAction={handleRemoveEmoji}
|
removeEmojiAction={handleRemoveEmoji}
|
||||||
|
|||||||
Reference in New Issue
Block a user