mirror of
https://github.com/infinilabs/coco-app.git
synced 2025-12-16 11:37:47 +01:00
fix: herder width (#444)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user