Add showType prop and remove ScrollShadow usage

Added an optional showType prop to NetworkDisplayCardProps in common_card.tsx. Removed the ScrollShadow component and replaced it with a standard div in nav_list.tsx to simplify the layout.
This commit is contained in:
手瓜一十雪 2025-12-22 12:32:48 +08:00
parent 84f0e0f9a0
commit 32d3ff6998
2 changed files with 3 additions and 3 deletions

View File

@ -26,6 +26,7 @@ export interface NetworkDisplayCardProps<T extends keyof NetworkType> {
onEnable: () => Promise<void>;
onDelete: () => Promise<void>;
onEnableDebug: () => Promise<void>;
showType?: boolean;
}
const NetworkDisplayCard = <T extends keyof NetworkType> ({

View File

@ -2,7 +2,6 @@ import { Button } from '@heroui/button';
import { Card, CardBody } from '@heroui/card';
import { Input } from '@heroui/input';
import clsx from 'clsx';
import { ScrollShadow } from "@heroui/scroll-shadow";
import { motion } from 'motion/react';
import { useState } from 'react';
import { TbApi, TbLayoutSidebarLeftCollapseFilled, TbSearch } from 'react-icons/tb';
@ -74,7 +73,7 @@ const OneBotApiNavList: React.FC<OneBotApiNavListProps> = (props) => {
/>
</div>
<ScrollShadow className='flex-1 p-3 flex flex-col gap-2 overflow-y-auto scroll-smooth' size={40}>
<div className='flex-1 p-3 flex flex-col gap-2 overflow-y-auto scroll-smooth'>
{Object.entries(data).map(([apiName, api]) => {
const isMatch = apiName.toLowerCase().includes(searchValue.toLowerCase()) ||
api.description?.toLowerCase().includes(searchValue.toLowerCase());
@ -120,7 +119,7 @@ const OneBotApiNavList: React.FC<OneBotApiNavListProps> = (props) => {
</div>
);
})}
</ScrollShadow>
</div>
</div>
</motion.div>
</>