Skip to content

Commit

Permalink
draggable
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelneale committed Nov 27, 2024
1 parent 9e76bfe commit b884982
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/desktop/src/ChatWindow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import Splash from './components/Splash';
import GooseMessage from './components/GooseMessage';
import UserMessage from './components/UserMessage';
import Input from './components/Input';
import Tabs from './components/Tabs';
import MoreMenu from './components/MoreMenu';
import { Bird } from './components/ui/icons';
import LoadingGoose from './components/LoadingGoose';
Expand Down Expand Up @@ -142,7 +141,7 @@ function ChatContent({
<div className="flex w-screen">
<div className="flex">
<MoreMenu
className="absolute top-2 right-2"
className="absolute top-2 right-2 no-drag"
onStopGoose={() => {
stop();
}}
Expand Down Expand Up @@ -254,6 +253,7 @@ export default function ChatWindow() {

return (
<div className="relative w-screen h-screen overflow-hidden bg-transparent flex flex-col">
<div className="titlebar-drag-region" />
{apiCredsMissing ? (
<div className="w-full h-full">
<ApiKeyWarning className="w-full h-full" />
Expand Down
13 changes: 13 additions & 0 deletions ui/desktop/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,19 @@
}

@layer components {
.titlebar-drag-region {
-webkit-app-region: drag;
height: 32px;
width: 100%;
position: fixed;
top: 0;
left: 0;
z-index: 50;
}

.no-drag {
-webkit-app-region: no-drag;
}
.ask-goose-type {
color: #000;
font-family: "Square Sans Mono";
Expand Down

0 comments on commit b884982

Please sign in to comment.