diff --git a/client/web/src/components/ChatBox/ChatMessageList/Item.tsx b/client/web/src/components/ChatBox/ChatMessageList/Item.tsx index add788ea..b8bdb559 100644 --- a/client/web/src/components/ChatBox/ChatMessageList/Item.tsx +++ b/client/web/src/components/ChatBox/ChatMessageList/Item.tsx @@ -75,7 +75,7 @@ const NormalMessage: React.FC = React.memo((props) => { return (
= React.memo((props) => { data-message-id={payload._id} > {/* 头像 */} -
+
{showAvatar ? ( ) : ( diff --git a/client/web/src/components/ChatBox/ChatMessageList/NormalList.tsx b/client/web/src/components/ChatBox/ChatMessageList/NormalList.tsx index d9394fcf..bca4e1e7 100644 --- a/client/web/src/components/ChatBox/ChatMessageList/NormalList.tsx +++ b/client/web/src/components/ChatBox/ChatMessageList/NormalList.tsx @@ -67,7 +67,7 @@ export const NormalMessageList: React.FC = React.memo( return (
diff --git a/client/web/src/routes/Main/Navbar/index.tsx b/client/web/src/routes/Main/Navbar/index.tsx index f44c8436..7448d739 100644 --- a/client/web/src/routes/Main/Navbar/index.tsx +++ b/client/web/src/routes/Main/Navbar/index.tsx @@ -4,7 +4,6 @@ import { MobileMenuBtn } from './MobileMenuBtn'; import { SettingBtn } from './SettingBtn'; import { Divider } from 'antd'; import { PersonalNav } from './PersonalNav'; -import { DevContainer } from 'tailchat-shared'; import { InboxNav } from './InboxNav'; import { InstallBtn } from './InstallBtn'; import { ReactQueryDevBtn } from './ReactQueryDevBtn'; @@ -16,7 +15,7 @@ export const Navbar: React.FC = React.memo(() => { return (
diff --git a/client/web/tailwind.config.js b/client/web/tailwind.config.js index a3073767..b431eef1 100644 --- a/client/web/tailwind.config.js +++ b/client/web/tailwind.config.js @@ -17,7 +17,7 @@ const customTheme = { }, }; -const tailchat = plugin(({ addUtilities }) => { +const tailchat = plugin(({ e, addUtilities }) => { // Reference: https://www.tailwindcss.cn/docs/plugins#adding-utilities const newUtilities = { '.thin-line-bottom': { @@ -37,6 +37,110 @@ const tailchat = plugin(({ addUtilities }) => { }; addUtilities(newUtilities); + + // Fork from https://github.com/ItzAfroBoy/tailwindcss-zoom/blob/master/index.js + const percents = [ + { + key: '1/2', + value: '50%', + }, + { + key: '1/3', + value: '33.333333%', + }, + { + key: '2/3', + value: '66.666667%', + }, + { + key: '1/4', + value: '25%', + }, + { + key: '3/4', + value: '75%', + }, + { + key: '1/5', + value: '20%', + }, + { + key: '2/5', + value: '40%', + }, + { + key: '3/5', + value: '60%', + }, + { + key: '4/5', + value: '80%', + }, + { + key: '1/6', + value: '16.666667%', + }, + { + key: '5/6', + value: '83.333333%', + }, + { + key: '1/10', + value: '10%', + }, + { + key: '3/10', + value: '30%', + }, + { + key: '7/10', + value: '70%', + }, + { + key: '9/10', + value: '90%', + }, + { + key: 'full', + value: '100%', + }, + { + key: '1.1', + value: '110%', + }, + { + key: '1.2', + value: '120%', + }, + { + key: '1.25', + value: '125%', + }, + { + key: '1.5', + value: '150%', + }, + { + key: '1.75', + value: '175%', + }, + { + key: '2', + value: '200%', + }, + ]; + + const zoom = percents.map((item) => { + return { + [`.${e(`zoom-${item.key}`)}`]: { + zoom: item.value, + }, + }; + }); + + addUtilities(zoom, { + variants: ['responsive', 'hover'], + }); }); module.exports = {