From 96e3d3a22c57fd061cad68d374d97c5f1ec51e2f Mon Sep 17 00:00:00 2001 From: PaRaD1SE98 Date: Wed, 10 May 2023 07:14:49 +0000 Subject: [PATCH] =?UTF-8?q?=E7=BB=99=E6=89=80=E6=9C=89select=E5=85=83?= =?UTF-8?q?=E7=B4=A0=E6=B7=BB=E5=8A=A0=E4=B8=80=E4=B8=AA=E5=8F=B3=E4=BE=A7?= =?UTF-8?q?=E4=B8=8B=E6=8B=89=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/mask.tsx | 10 +++++----- app/components/model-config.tsx | 6 +++--- app/components/settings.tsx | 22 +++++++++++++++------- app/components/ui-lib.module.scss | 25 +++++++++++++++++++++++++ app/components/ui-lib.tsx | 21 +++++++++++++++++++++ app/icons/down.svg | 1 + 6 files changed, 70 insertions(+), 15 deletions(-) create mode 100644 app/icons/down.svg diff --git a/app/components/mask.tsx b/app/components/mask.tsx index a37cfba7..13ffb9ef 100644 --- a/app/components/mask.tsx +++ b/app/components/mask.tsx @@ -14,7 +14,7 @@ import CopyIcon from "../icons/copy.svg"; import { DEFAULT_MASK_AVATAR, Mask, useMaskStore } from "../store/mask"; import { Message, ModelConfig, ROLES, useChatStore } from "../store"; -import { Input, List, ListItem, Modal, Popover } from "./ui-lib"; +import { Input, List, ListItem, Modal, Popover, Select } from "./ui-lib"; import { Avatar, AvatarPicker } from "./emoji"; import Locale, { AllLangs, Lang } from "../locales"; import { useNavigate } from "react-router-dom"; @@ -116,7 +116,7 @@ function ContextPromptItem(props: { return (
{!focusingInput && ( - + )} onSearch(e.currentTarget.value)} /> - + - + - + - + - + ) {
); } + +export function Select( + props: React.DetailedHTMLProps< + React.SelectHTMLAttributes, + HTMLSelectElement + >, +) { + const { className, children, ...otherProps } = props; + return ( +
+ + +
+ ); +} diff --git a/app/icons/down.svg b/app/icons/down.svg new file mode 100644 index 00000000..cca830b8 --- /dev/null +++ b/app/icons/down.svg @@ -0,0 +1 @@ +