fix: herder width (#444)

This commit is contained in:
BiggerRain
2025-04-25 19:03:30 +08:00
committed by GitHub
parent 05f1459f8d
commit f876fc24f2
4 changed files with 22 additions and 15 deletions

View File

@@ -107,14 +107,11 @@ export function ChatHeader({
) : null}
</div>
<div>
<h2 className="text-sm font-medium text-gray-900 dark:text-gray-100 truncate">
{activeChat?._source?.title ||
activeChat?._source?.message ||
activeChat?._id}
</h2>
</div>
<h2 className="max-w-[calc(100%-200px)] text-sm font-medium text-gray-900 dark:text-gray-100 truncate">
{activeChat?._source?.title ||
activeChat?._source?.message ||
activeChat?._id}
</h2>
{isTauri ? (
<div className="flex items-center gap-2">
<button

View File

@@ -1,4 +1,7 @@
import { useIconfontScript } from "@/hooks/useScript";
import { useAppStore } from "@/stores/appStore";
import logoImg from "@/assets/icon.svg";
interface FontIconProps {
name: string;
className?: string;
@@ -7,11 +10,18 @@ interface FontIconProps {
const FontIcon = ({ name, className, style, ...rest }: FontIconProps) => {
useIconfontScript();
return (
<svg className={`icon ${className || ""}`} style={style} {...rest}>
<use xlinkHref={`#${name}`} />
</svg>
);
const isTauri = useAppStore((state) => state.isTauri);
if (isTauri) {
return (
<svg className={`icon ${className || ""}`} style={style} {...rest}>
<use xlinkHref={`#${name}`} />
</svg>
);
} else {
return <img src={logoImg} className={className} alt={"coco"} />;
}
};
export default FontIcon;

View File

@@ -40,7 +40,7 @@ const SearchListItem: React.FC<SearchListItemProps> = React.memo(
onMouseEnter={onMouseEnter}
onClick={onItemClick}
className={clsx(
"w-full px-2 py-2.5 text-sm flex mb-0 flex-row items-center mobile:mb-2 mobile:flex-col mobile:items-start justify-between rounded-lg transition-colors cursor-pointer text-[#333] dark:text-[#d8d8d8] mobile:bg-gray-200/80 mobile:dark:bg-gray-700/50",
"w-full px-2 py-2.5 text-sm flex mb-0 flex-row items-center mobile:mb-2 mobile:flex-col mobile:items-start justify-between rounded-lg transition-colors cursor-pointer text-[#333] dark:text-[#d8d8d8]",
{
"bg-black/10 dark:bg-white/15": isSelected,
"gap-7 mobile:gap-1": showListRight,

View File

@@ -67,7 +67,7 @@ export default defineConfig({
const packageJson = {
name: "@infinilabs/search-chat",
version: "1.1.9",
version: "1.1.10",
main: "index.js",
module: "index.js",
type: "module",