refactor: html template

pull/13/head
moonrailgun 4 years ago
parent 26fd3c6cdb
commit 01c594f825

@ -1,7 +1,16 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta http-equiv="Content-Language" content="zh-CN" />
<meta charset="utf-8"/> <meta charset="utf-8"/>
<meta name="keywords" content="im,chat,聊天,开源,即时通讯">
<meta name="description" content="开源即时通讯软件">
<meta name="renderer" content="webkit">
<meta name="force-rendering" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="google" content="notranslate">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta http-equiv="X-UA-Compatible" content="IE=100" />
<title><%= htmlWebpackPlugin.options.title %></title> <title><%= htmlWebpackPlugin.options.title %></title>
</head> </head>
<body> <body>

@ -5,13 +5,6 @@ import { useDrag } from 'react-use-gesture';
import { useIsMobile } from '@/hooks/useIsMobile'; import { useIsMobile } from '@/hooks/useIsMobile';
import clsx from 'clsx'; import clsx from 'clsx';
// const PageContentRoot = styled.div`
// display: flex;
// flex-direction: row;
// flex: 1;
// overflow: hidden;
// `;
// const ContentDetail = styled.div` // const ContentDetail = styled.div`
// flex: 1; // flex: 1;
// background-color: ${(props) => props.theme.style.contentBackgroundColor}; // background-color: ${(props) => props.theme.style.contentBackgroundColor};
@ -26,15 +19,6 @@ import clsx from 'clsx';
// } // }
// `; // `;
// const ContentDetailMask = styled.div`
// position: absolute;
// top: 0;
// left: 0;
// right: 0;
// bottom: 0;
// z-index: 10;
// `;
// const SidebarContainer = styled.div<{ // const SidebarContainer = styled.div<{
// showSidebar: boolean; // showSidebar: boolean;
// }>` // }>`
@ -80,6 +64,8 @@ PageGestureWrapper.displayName = 'PageGestureWrapper';
/** /**
* *
*
* TODO:
*/ */
export const PageContent: React.FC<PageContentProps> = React.memo((props) => { export const PageContent: React.FC<PageContentProps> = React.memo((props) => {
const { sidebar, children } = props; const { sidebar, children } = props;

@ -11,40 +11,42 @@ export const FriendPanel: React.FC = React.memo(() => {
const userId = useAppSelector((state) => state.user.info?._id); const userId = useAppSelector((state) => state.user.info?._id);
return ( return (
<PillTabs> <div className="w-full">
<PillTabPane tab={'全部'} key="1"> <PillTabs>
<div className="py-2.5 px-5"> <PillTabPane tab={'全部'} key="1">
<div></div> <div className="py-2.5 px-5">
<div>{JSON.stringify(friends)}</div> <div></div>
</div> <div>{JSON.stringify(friends)}</div>
</PillTabPane>
<PillTabPane tab={'已发送'} key="2">
<div className="py-2.5 px-5">
<div></div>
<div>
{JSON.stringify(
friendRequests.filter((item) => item.from === userId)
)}
</div> </div>
</div> </PillTabPane>
</PillTabPane> <PillTabPane tab={'已发送'} key="2">
<PillTabPane tab={'待处理'} key="3"> <div className="py-2.5 px-5">
<div className="py-2.5 px-5"> <div></div>
<div></div> <div>
<div> {JSON.stringify(
{JSON.stringify( friendRequests.filter((item) => item.from === userId)
friendRequests.filter((item) => item.to === userId) )}
)} </div>
</div> </div>
</div> </PillTabPane>
</PillTabPane> <PillTabPane tab={'待处理'} key="3">
<PillTabPane <div className="py-2.5 px-5">
tab={<span className="text-green-400"></span>} <div></div>
key="4" <div>
> {JSON.stringify(
friendRequests.filter((item) => item.to === userId)
</PillTabPane> )}
</PillTabs> </div>
</div>
</PillTabPane>
<PillTabPane
tab={<span className="text-green-400"></span>}
key="4"
>
</PillTabPane>
</PillTabs>
</div>
); );
}); });
FriendPanel.displayName = 'FriendPanel'; FriendPanel.displayName = 'FriendPanel';

Loading…
Cancel
Save