diff --git a/src/components/ChatBox/TaskBox/TaskCard.tsx b/src/components/ChatBox/TaskBox/TaskCard.tsx index 1cb72db4..5c284f48 100644 --- a/src/components/ChatBox/TaskBox/TaskCard.tsx +++ b/src/components/ChatBox/TaskBox/TaskCard.tsx @@ -507,7 +507,7 @@ export function TaskCard({
, iconAnimateOnHover: 'wiggle' }, + { id: 'projects', icon: , iconAnimateOnHover: 'default' }, { id: 'agents', icon: , iconAnimateOnHover: 'default' }, { id: 'channels', icon: , iconAnimateOnHover: 'default' }, { id: 'connectors', icon: , iconAnimateOnHover: 'default' }, diff --git a/src/components/ui/animate-ui/icons/blocks.tsx b/src/components/ui/animate-ui/icons/blocks.tsx new file mode 100644 index 00000000..e18fcc75 --- /dev/null +++ b/src/components/ui/animate-ui/icons/blocks.tsx @@ -0,0 +1,174 @@ +// ========= Copyright 2025-2026 @ Eigent.ai All Rights Reserved. ========= +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ========= Copyright 2025-2026 @ Eigent.ai All Rights Reserved. ========= + +'use client'; + +import { motion, type Variants } from 'motion/react'; + +import { + getVariants, + IconWrapper, + useAnimateIconContext, + type IconProps, +} from '@/components/ui/animate-ui/icons/icon'; + +type BlocksProps = IconProps; + +const animations = { + default: { + path1: { + initial: { + x: 0, + y: 0, + d: 'M10 22V7c0-.6-.4-1-1-1H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-5c0-.6-.4-1-1-1H2', + strokeLinejoin: 'round', + transition: { + duration: 0.4, + ease: 'easeInOut', + }, + }, + animate: { + x: 2, + y: -2, + d: 'M10 22V6H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-6H2', + strokeLinejoin: 'miter', + transition: { + duration: 0.4, + ease: 'easeInOut', + d: { duration: 0, delay: 0.3 }, + strokeLinejoin: { duration: 0, delay: 0.3 }, + }, + }, + }, + path2: { + initial: { + x: 0, + y: 0, + d: 'M15 2 H21 A1 1 0 0 1 22 3 V9 A1 1 0 0 1 21 10 H15 A1 1 0 0 1 14 9 V3 A1 1 0 0 1 15 2 Z', + transition: { + duration: 0.4, + ease: 'easeInOut', + }, + }, + animate: { + x: -2, + y: 2, + d: 'M15 2 H20 A2 2 0 0 1 22 4 V9 A1 1 0 0 1 21 10 H15 A1 1 0 0 1 14 9 V3 A1 1 0 0 1 15 2 Z', + transition: { + duration: 0.4, + ease: 'easeInOut', + }, + }, + }, + } satisfies Record, + 'default-loop': { + path1: { + initial: { + x: 0, + y: 0, + d: 'M10 22V7c0-.6-.4-1-1-1H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-5c0-.6-.4-1-1-1H2', + strokeLinejoin: 'round', + transition: { + duration: 0.4, + ease: 'easeInOut', + }, + }, + animate: { + x: [0, 2, 0], + y: [0, -2, 0], + d: [ + 'M10 22V7c0-.6-.4-1-1-1H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-5c0-.6-.4-1-1-1H2', + 'M10 22V6H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-6H2', + 'M10 22V7c0-.6-.4-1-1-1H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-5c0-.6-.4-1-1-1H2', + ], + strokeLinejoin: ['round', 'miter', 'round'], + transition: { + duration: 0.8, + ease: 'easeInOut', + d: { duration: 0, delay: 0.3 }, + strokeLinejoin: { duration: 0, delay: 0.3 }, + }, + }, + }, + path2: { + initial: { + x: 0, + y: 0, + d: 'M15 2 H21 A1 1 0 0 1 22 3 V9 A1 1 0 0 1 21 10 H15 A1 1 0 0 1 14 9 V3 A1 1 0 0 1 15 2 Z', + transition: { + duration: 0.4, + ease: 'easeInOut', + }, + }, + animate: { + x: [0, -2, 0], + y: [0, 2, 0], + d: [ + 'M15 2 H21 A1 1 0 0 1 22 3 V9 A1 1 0 0 1 21 10 H15 A1 1 0 0 1 14 9 V3 A1 1 0 0 1 15 2 Z', + 'M15 2 H20 A2 2 0 0 1 22 4 V9 A1 1 0 0 1 21 10 H15 A1 1 0 0 1 14 9 V3 A1 1 0 0 1 15 2 Z', + 'M15 2 H21 A1 1 0 0 1 22 3 V9 A1 1 0 0 1 21 10 H15 A1 1 0 0 1 14 9 V3 A1 1 0 0 1 15 2 Z', + ], + transition: { + duration: 0.8, + ease: 'easeInOut', + }, + }, + }, + } satisfies Record, +} as const; + +function IconComponent({ size, ...props }: BlocksProps) { + const { controls } = useAnimateIconContext(); + const variants = getVariants(animations); + + return ( + + + + + ); +} + +function Blocks(props: BlocksProps) { + return ; +} + +export { + animations, + Blocks, + Blocks as BlocksIcon, + type BlocksProps as BlocksIconProps, + type BlocksProps, +}; diff --git a/src/pages/History.tsx b/src/pages/History.tsx index 9743c067..a68ab9e4 100644 --- a/src/pages/History.tsx +++ b/src/pages/History.tsx @@ -123,7 +123,7 @@ export default function Home() { cancelText={t('layout.cancel')} /> {/* welcome text */} -
+