mirror of
https://github.com/docmost/docmost.git
synced 2025-11-14 06:01:14 +10:00
fixes
This commit is contained in:
@ -64,9 +64,10 @@ export function MultiUserSelect({ onChange }: MultiUserSelectProps) {
|
||||
searchable
|
||||
searchValue={searchValue}
|
||||
onSearchChange={setSearchValue}
|
||||
clearable
|
||||
variant="filled"
|
||||
onChange={onChange}
|
||||
nothingFoundMessage="Nothing found..."
|
||||
nothingFoundMessage="No user found"
|
||||
maxValues={50}
|
||||
/>
|
||||
);
|
||||
|
||||
@ -1,34 +1,32 @@
|
||||
import { Text, Tabs, Space } from '@mantine/core';
|
||||
import {
|
||||
IconClockHour3, IconStar,
|
||||
} from '@tabler/icons-react';
|
||||
import RecentChanges from '@/features/home/components/recent-changes';
|
||||
import { Text, Tabs, Space } from "@mantine/core";
|
||||
import { IconClockHour3, IconStar } from "@tabler/icons-react";
|
||||
import RecentChanges from "@/features/home/components/recent-changes";
|
||||
|
||||
export default function HomeTabs() {
|
||||
|
||||
return (
|
||||
<Tabs defaultValue="recent">
|
||||
<Tabs.List>
|
||||
<Tabs.Tab value="recent" leftSection={<IconClockHour3 size={18} />}>
|
||||
<Text size="sm" fw={500}>Recent changes</Text>
|
||||
<Text size="sm" fw={500}>
|
||||
Recent changes
|
||||
</Text>
|
||||
</Tabs.Tab>
|
||||
|
||||
<Tabs.Tab value="favorites" leftSection={<IconStar size={18} />}>
|
||||
<Text size="sm" fw={500}>Favorites</Text>
|
||||
<Text size="sm" fw={500}>
|
||||
Favorites
|
||||
</Text>
|
||||
</Tabs.Tab>
|
||||
</Tabs.List>
|
||||
|
||||
<Space my="md" />
|
||||
|
||||
<Tabs.Panel value="recent">
|
||||
|
||||
<div>Recent</div>
|
||||
{/* <RecentChanges /> */}
|
||||
|
||||
</Tabs.Panel>
|
||||
|
||||
<Tabs.Panel value="favorites">
|
||||
My favorite pages
|
||||
</Tabs.Panel>
|
||||
<Tabs.Panel value="favorites">My favorite pages</Tabs.Panel>
|
||||
</Tabs>
|
||||
);
|
||||
}
|
||||
|
||||
@ -1,31 +1,34 @@
|
||||
import { Text, Group, UnstyledButton } from '@mantine/core';
|
||||
import { UserAvatar } from '@/components/ui/user-avatar';
|
||||
import { formatDate } from '@/lib/time';
|
||||
import classes from './history.module.css';
|
||||
import clsx from 'clsx';
|
||||
import { Text, Group, UnstyledButton } from "@mantine/core";
|
||||
import { UserAvatar } from "@/components/ui/user-avatar";
|
||||
import { formatDate } from "@/lib/time";
|
||||
import classes from "./history.module.css";
|
||||
import clsx from "clsx";
|
||||
|
||||
interface HistoryItemProps {
|
||||
historyItem: any,
|
||||
historyItem: any;
|
||||
onSelect: (id: string) => void;
|
||||
isActive: boolean;
|
||||
}
|
||||
|
||||
function HistoryItem({ historyItem, onSelect, isActive }: HistoryItemProps) {
|
||||
|
||||
return (
|
||||
<UnstyledButton p="xs" onClick={() => onSelect(historyItem.id)}
|
||||
<UnstyledButton
|
||||
p="xs"
|
||||
onClick={() => onSelect(historyItem.id)}
|
||||
className={clsx(classes.history, { [classes.active]: isActive })}
|
||||
>
|
||||
<Group wrap="nowrap">
|
||||
<div>
|
||||
<Text size="sm">
|
||||
{formatDate(new Date(historyItem.createdAt))}
|
||||
</Text>
|
||||
<Text size="sm">{formatDate(new Date(historyItem.createdAt))}</Text>
|
||||
|
||||
<div style={{ flex: 1 }}>
|
||||
<Group gap={4} wrap="nowrap">
|
||||
<UserAvatar c="blue" size="sm" avatarUrl={historyItem.lastUpdatedBy.avatarUrl}
|
||||
name={historyItem.lastUpdatedBy.name} />
|
||||
<UserAvatar
|
||||
color="blue"
|
||||
size="sm"
|
||||
avatarUrl={historyItem.lastUpdatedBy.avatarUrl}
|
||||
name={historyItem.lastUpdatedBy.name}
|
||||
/>
|
||||
<Text size="sm" c="dimmed" lineClamp={1}>
|
||||
{historyItem.lastUpdatedBy.name}
|
||||
</Text>
|
||||
|
||||
Reference in New Issue
Block a user