update model and lucide version

This commit is contained in:
Zhang Minghan 2023-10-26 09:18:23 +08:00
parent c6966e927b
commit 00d02c467f
8 changed files with 684 additions and 542 deletions

View File

@ -30,7 +30,7 @@
"clsx": "^2.0.0",
"i18next": "^23.4.6",
"localforage": "^1.10.0",
"lucide-react": "^0.274.0",
"lucide-react": "^0.289.0",
"match-sorter": "^6.3.1",
"react": "^18.2.0",
"react-chartjs-2": "^5.2.0",

1157
app/pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -143,6 +143,12 @@
}
}
.model-box {
width: 80%;
margin: 0 auto;
max-width: 680px;
}
.generate-box {
display: flex;
flex-direction: row;

View File

@ -375,7 +375,7 @@
}
.input-options {
margin: 6px auto -2px;
margin: 6px auto -6px;
display: flex;
flex-direction: row;
align-items: center;

View File

@ -6,7 +6,7 @@ import {
DialogTitle,
DialogTrigger,
} from "./ui/dialog.tsx";
import { Edit, Image, MenuSquare, PanelRight } from "lucide-react";
import { Maximize, Image, MenuSquare, PanelRight } from "lucide-react";
import { useTranslation } from "react-i18next";
import "../assets/editor.less";
import { Textarea } from "./ui/textarea.tsx";
@ -135,7 +135,7 @@ function EditorProvider(props: RichEditorProps) {
<Dialog>
<DialogTrigger asChild>
<div className={`editor-action active ${props.className}`}>
<Edit className={`h-3.5 w-3.5`} />
<Maximize className={`h-3.5 w-3.5`} />
</div>
</DialogTrigger>
<DialogContent className={`editor-dialog flex-dialog`}>

View File

@ -96,30 +96,32 @@ function SelectGroupDesktop(props: SelectGroupProps) {
function SelectGroupMobile(props: SelectGroupProps) {
return (
<Select
value={props.current.name}
onValueChange={(value: string) => {
toggleEvent.emit(new Date().getTime());
props.onChange?.(value);
}}
>
<SelectTrigger className="select-group mobile">
<SelectValue placeholder={props.current.value} />
</SelectTrigger>
<SelectContent
onCloseAutoFocus={(e) => {
e.preventDefault();
e.stopPropagation();
<div className={`mb-2 w-full`}>
<Select
value={props.current.name}
onValueChange={(value: string) => {
toggleEvent.emit(new Date().getTime());
props.onChange?.(value);
}}
>
{props.list.map((select: SelectItemProps, idx: number) => (
<SelectItem key={idx} value={select.name}>
<GroupSelectItem {...select} />
</SelectItem>
))}
</SelectContent>
</Select>
<SelectTrigger className="select-group mobile">
<SelectValue placeholder={props.current.value} />
</SelectTrigger>
<SelectContent
onCloseAutoFocus={(e) => {
e.preventDefault();
e.stopPropagation();
toggleEvent.emit(new Date().getTime());
}}
>
{props.list.map((select: SelectItemProps, idx: number) => (
<SelectItem key={idx} value={select.name}>
<GroupSelectItem {...select} />
</SelectItem>
))}
</SelectContent>
</Select>
</div>
);
}

View File

@ -1,6 +1,6 @@
import * as React from "react";
import * as SelectPrimitive from "@radix-ui/react-select";
import { Check, ChevronDown } from "lucide-react";
import { Check, ChevronUp, ChevronDown } from "lucide-react";
import { cn } from "./lib/utils";
@ -46,6 +46,10 @@ const SelectContent = React.forwardRef<
position={position}
{...props}
>
<SelectPrimitive.ScrollUpButton className={`flex items-center justify-center h-4`}>
<ChevronUp />
</SelectPrimitive.ScrollUpButton>
<SelectPrimitive.Viewport
className={cn(
"p-1",
@ -55,6 +59,9 @@ const SelectContent = React.forwardRef<
>
{children}
</SelectPrimitive.Viewport>
<SelectPrimitive.ScrollDownButton className={`flex items-center justify-center h-4`}>
<ChevronDown />
</SelectPrimitive.ScrollDownButton>
</SelectPrimitive.Content>
</SelectPrimitive.Portal>
));

View File

@ -1,7 +1,7 @@
import axios from "axios";
import { Model } from "./conversation/types.ts";
export const version = "3.5.13";
export const version = "3.5.14";
export const dev: boolean = window.location.hostname === "localhost";
export const deploy: boolean = true;
export let rest_api: string = "http://localhost:8094";