From a5b807d411397fe4e24778676a52db7d3a412bcb Mon Sep 17 00:00:00 2001 From: heimoshuiyu Date: Tue, 18 Jul 2023 14:27:11 +0800 Subject: [PATCH] move setting button to top, lg:w-2/3 --- src/settings.tsx | 87 ++++++++++++++++++++++++++---------------------- 1 file changed, 48 insertions(+), 39 deletions(-) diff --git a/src/settings.tsx b/src/settings.tsx index 661e529..c4a4ba0 100644 --- a/src/settings.tsx +++ b/src/settings.tsx @@ -175,10 +175,54 @@ export default (props: { const importFileRef = createRef(); const [totalCost, setTotalCost] = useState(getTotalCost()); return ( -
-
-

Settings

+
props.setShow(false)} + className="left-0 top-0 overflow-scroll flex justify-center absolute w-screen h-full bg-black bg-opacity-50 z-10" + > +
{ + event.stopPropagation(); + }} + className="m-2 p-2 bg-white rounded-lg h-fit lg:w-2/3 z-20" + > +

Settings


+
+ + + +

Accumulated cost in all sessions ${totalCost.toFixed(4)} @@ -196,6 +240,7 @@ export default (props: {

Total cost in this session ${props.chatStore.cost.toFixed(4)}

+

-
- - - -
);