Skip to content

Commit

Permalink
[app] Fix position for MoreMenu and make top region a little smaller
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Hancock committed Nov 28, 2024
1 parent 3c6583a commit 24e00d7
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 28 deletions.
43 changes: 20 additions & 23 deletions ui/desktop/src/ChatWindow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,29 +138,26 @@ function ChatContent({

return (
<div className="chat-content flex flex-col w-screen h-screen bg-window-gradient items-center justify-center p-[10px]">
<div className="flex w-screen">
<div className="flex">
<MoreMenu
className="absolute top-2 right-2 no-drag"
onStopGoose={() => {
stop();
}}
onClearContext={() => {
append({
id: Date.now().toString(),
role: 'system',
content: 'Context cleared',
});
}}
onRestartGoose={() => {
append({
id: Date.now().toString(),
role: 'system',
content: 'Goose restarted',
});
}}
/>
</div>
<div className="relative block h-[20px] w-screen">
<MoreMenu
onStopGoose={() => {
stop();
}}
onClearContext={() => {
append({
id: Date.now().toString(),
role: 'system',
content: 'Context cleared',
});
}}
onRestartGoose={() => {
append({
id: Date.now().toString(),
role: 'system',
content: 'Goose restarted',
});
}}
/>
</div>
<Card className="flex flex-col flex-1 h-[calc(100vh-95px)] w-full bg-card-gradient mt-0 border-none shadow-xl rounded-2xl relative">
{messages.length === 0 ? (
Expand Down
5 changes: 1 addition & 4 deletions ui/desktop/src/components/MoreMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ export default function MoreMenu({ onStopGoose, onClearContext, onRestartGoose }
return (
<Popover open={open} onOpenChange={setOpen}>
<PopoverTrigger asChild>
<button
className="z-30 block w-[30px] h-[30px]"
aria-label="Menu"
>
<button className="z-[100] absolute top-[-4px] right-[10px] w-[20px] h-[20px] cursor-pointer no-drag">
<VertDots size={18} />
</button>
</PopoverTrigger>
Expand Down
2 changes: 1 addition & 1 deletion ui/desktop/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const createChat = async (app, query?: string) => {
const port = await startGoosed(app);
const mainWindow = new BrowserWindow({
titleBarStyle: 'hidden',
trafficLightPosition: { x: 16, y: 18 },
trafficLightPosition: { x: 16, y: 10 },
width: 650,
height: 800,
minWidth: 650,
Expand Down

0 comments on commit 24e00d7

Please sign in to comment.