Skip to content

Commit f876fc2

Browse files
authored
fix: herder width (#444)
1 parent 05f1459 commit f876fc2

4 files changed

Lines changed: 22 additions & 15 deletions

File tree

src/components/Assistant/ChatHeader.tsx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,11 @@ export function ChatHeader({
107107
) : null}
108108
</div>
109109

110-
<div>
111-
<h2 className="text-sm font-medium text-gray-900 dark:text-gray-100 truncate">
112-
{activeChat?._source?.title ||
113-
activeChat?._source?.message ||
114-
activeChat?._id}
115-
</h2>
116-
</div>
117-
110+
<h2 className="max-w-[calc(100%-200px)] text-sm font-medium text-gray-900 dark:text-gray-100 truncate">
111+
{activeChat?._source?.title ||
112+
activeChat?._source?.message ||
113+
activeChat?._id}
114+
</h2>
118115
{isTauri ? (
119116
<div className="flex items-center gap-2">
120117
<button
Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
import { useIconfontScript } from "@/hooks/useScript";
2+
import { useAppStore } from "@/stores/appStore";
3+
import logoImg from "@/assets/icon.svg";
4+
25
interface FontIconProps {
36
name: string;
47
className?: string;
@@ -7,11 +10,18 @@ interface FontIconProps {
710

811
const FontIcon = ({ name, className, style, ...rest }: FontIconProps) => {
912
useIconfontScript();
10-
return (
11-
<svg className={`icon ${className || ""}`} style={style} {...rest}>
12-
<use xlinkHref={`#${name}`} />
13-
</svg>
14-
);
13+
14+
const isTauri = useAppStore((state) => state.isTauri);
15+
16+
if (isTauri) {
17+
return (
18+
<svg className={`icon ${className || ""}`} style={style} {...rest}>
19+
<use xlinkHref={`#${name}`} />
20+
</svg>
21+
);
22+
} else {
23+
return <img src={logoImg} className={className} alt={"coco"} />;
24+
}
1525
};
1626

1727
export default FontIcon;

src/components/Search/SearchListItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const SearchListItem: React.FC<SearchListItemProps> = React.memo(
4040
onMouseEnter={onMouseEnter}
4141
onClick={onItemClick}
4242
className={clsx(
43-
"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",
43+
"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]",
4444
{
4545
"bg-black/10 dark:bg-white/15": isSelected,
4646
"gap-7 mobile:gap-1": showListRight,

tsup.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export default defineConfig({
6767

6868
const packageJson = {
6969
name: "@infinilabs/search-chat",
70-
version: "1.1.9",
70+
version: "1.1.10",
7171
main: "index.js",
7272
module: "index.js",
7373
type: "module",

0 commit comments

Comments
 (0)