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