Skip to content

Commit

Permalink
update model and lucide version
Browse files Browse the repository at this point in the history
  • Loading branch information
zmh-program committed Oct 26, 2023
1 parent c6966e9 commit 00d02c4
Show file tree
Hide file tree
Showing 8 changed files with 684 additions and 542 deletions.
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1,157 changes: 642 additions & 515 deletions app/pnpm-lock.yaml

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions app/src/assets/generation.less
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,12 @@
}
}

.model-box {
width: 80%;
margin: 0 auto;
max-width: 680px;
}

.generate-box {
display: flex;
flex-direction: row;
Expand Down
2 changes: 1 addition & 1 deletion app/src/assets/home.less
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@
}

.input-options {
margin: 6px auto -2px;
margin: 6px auto -6px;
display: flex;
flex-direction: row;
align-items: center;
Expand Down
4 changes: 2 additions & 2 deletions app/src/components/EditorProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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`}>
Expand Down
44 changes: 23 additions & 21 deletions app/src/components/SelectGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
);
}

Expand Down
9 changes: 8 additions & 1 deletion app/src/components/ui/select.tsx
Original file line number Diff line number Diff line change
@@ -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";

Expand Down Expand Up @@ -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",
Expand All @@ -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>
));
Expand Down
2 changes: 1 addition & 1 deletion app/src/conf.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down

0 comments on commit 00d02c4

Please sign in to comment.