mirror of https://github.com/msgbyte/tailchat
feat: 收件箱基本UI
parent
3e364f08ad
commit
1fb6bfafe3
@ -0,0 +1,32 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { CommonSidebarWrapper } from '@/components/CommonSidebarWrapper';
|
||||||
|
import { t } from 'tailchat-shared';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收件箱侧边栏组件
|
||||||
|
*/
|
||||||
|
export const InboxSidebar: React.FC = React.memo(() => {
|
||||||
|
return (
|
||||||
|
<CommonSidebarWrapper data-tc-role="sidebar-inbox">
|
||||||
|
<div className="overflow-auto">
|
||||||
|
{Array.from({ length: 20 }).map((_, i) => {
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
key={i}
|
||||||
|
className="p-2 overflow-auto cursor-pointer hover:bg-black hover:bg-opacity-10 dark:hover:bg-white dark:hover:bg-opacity-10"
|
||||||
|
>
|
||||||
|
<div className="text-lg">Title {i}</div>
|
||||||
|
<div className="break-all text-opacity-80 text-black dark:text-opacity-80 dark:text-white text-sm p-1 border-l-2 border-gray-500 border-opacity-50">
|
||||||
|
DescDescDescDescDescDescDescDescDescDescDescDescDescDescDescDescDescDescDescDescDescDescDescDescDescDescDescDescDescDescDescDescDescDesc
|
||||||
|
</div>
|
||||||
|
<div className="text-xs text-opacity-50 text-black dark:text-opacity-50 dark:text-white">
|
||||||
|
{t('来自')}: Tailchat
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
</CommonSidebarWrapper>
|
||||||
|
);
|
||||||
|
});
|
||||||
|
InboxSidebar.displayName = 'InboxSidebar';
|
@ -0,0 +1,12 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { PageContent } from '../PageContent';
|
||||||
|
import { InboxSidebar } from './Sidebar';
|
||||||
|
|
||||||
|
export const Inbox: React.FC = React.memo(() => {
|
||||||
|
return (
|
||||||
|
<PageContent data-tc-role="content-inbox" sidebar={<InboxSidebar />}>
|
||||||
|
<div>Inbox</div>
|
||||||
|
</PageContent>
|
||||||
|
);
|
||||||
|
});
|
||||||
|
Inbox.displayName = 'Inbox';
|
@ -0,0 +1,22 @@
|
|||||||
|
import { Icon } from 'tailchat-design';
|
||||||
|
import React from 'react';
|
||||||
|
import { t } from 'tailchat-shared';
|
||||||
|
import { NavbarNavItem } from './NavItem';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收件箱
|
||||||
|
*/
|
||||||
|
export const InboxNav: React.FC = React.memo(() => {
|
||||||
|
return (
|
||||||
|
<NavbarNavItem
|
||||||
|
className="bg-gray-700"
|
||||||
|
name={t('收件箱')}
|
||||||
|
to={'/main/inbox'}
|
||||||
|
showPill={true}
|
||||||
|
data-testid="inbox"
|
||||||
|
>
|
||||||
|
<Icon className="text-3xl text-white" icon="mdi:inbox-arrow-down" />
|
||||||
|
</NavbarNavItem>
|
||||||
|
);
|
||||||
|
});
|
||||||
|
InboxNav.displayName = 'InboxNav';
|
Loading…
Reference in New Issue