Skip to content

Commit

Permalink
Remove widow logic from 'main'
Browse files Browse the repository at this point in the history
  • Loading branch information
Acumen-Desktop committed Feb 10, 2025
1 parent 6a27a7c commit 0f7f4c9
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 61 deletions.
9 changes: 0 additions & 9 deletions ui-svelte/src-main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,15 +170,6 @@ async function createChat(
},
});

const primaryDisplay = screen.getPrimaryDisplay();
const { width } = primaryDisplay.workAreaSize;
windowCounter++;
const direction = windowCounter % 2 === 0 ? 1 : -1;
const initialOffset = 50;
const baseXPosition = Math.round(width / 2 - mainWindow.getSize()[0] / 2);
const xOffset = direction * initialOffset * Math.floor(windowCounter / 2);
mainWindow.setPosition(baseXPosition + xOffset, 100);

const queryParam = query
? `?initialQuery=${encodeURIComponent(query)}`
: "";
Expand Down
97 changes: 45 additions & 52 deletions ui-svelte/src-renderer/routes/welcome/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,32 @@
};
</script>

<div class="size-full select-none bg-background">
<div class="size-full overflow-hidden">
<ScrollArea class="h-full w-full">
<div
class="flex min-h-full flex-col justify-center px-8 py-8 md:px-16 max-w-4xl mx-auto"
>
<!-- Header Section -->
<div class="mb-8 mt-4">
<div class="flex items-center gap-4 mb-4">
<div class="group/logo">
<GooseLogo class="h-16 w-16 md:h-20 md:w-20" />
</div>
<div>
<h1
class="text-4xl font-medium text-foreground tracking-tight md:text-5xl"
>
Welcome to goose
</h1>
<p class="text-lg text-muted-foreground max-w-2xl">
Your intelligent AI assistant for seamless productivity and
creativity.
</p>
</div>
</div>
</div>
<div class="size-full select-none bg-background flex flex-col">
<!-- Fixed Header -->
<header class="flex-none px-8 py-6 md:px-16 border-b">
<div class="flex items-center gap-4 max-w-4xl mx-auto">
<div class="group/logo">
<GooseLogo class="h-16 w-16 md:h-20 md:w-20" />
</div>
<div>
<h1
class="text-4xl font-medium text-foreground tracking-tight md:text-5xl"
>
Welcome to goose
</h1>
<p class="text-lg text-muted-foreground max-w-2xl">
Your intelligent AI assistant for seamless productivity and
creativity.
</p>
</div>
</div>
</header>

<!-- ProviderGrid -->
<!-- Scrollable Main Content -->
<main class="flex-1 overflow-hidden">
<ScrollArea class="h-full w-full">
<div class="px-8 py-8 md:px-16 max-w-4xl mx-auto">
<!-- Provider Section -->
<div class="w-full">
<h2 class="text-3xl font-medium text-foreground tracking-tight mb-2">
Choose a Provider
Expand All @@ -50,32 +49,26 @@
</p>
<ProviderGrid {onSubmit} />
</div>

<!-- Get started -->
<div class="mt-12">
<p class="text-sm text-muted-foreground">
Not sure where to start?{" "}
<Button
variant="link"
class="text-primary hover:text-primary/90 p-0 h-auto"
onclick={() =>
window.electron.openInChrome(
"https://block.github.io/goose/docs/quickstart"
)}
>
Quick Start Guide
</Button>
<!--
onclick={() =>
window.open(
"https://block.github.io/goose/docs/quickstart",
"_blank"
)}
-->
</p>
</div>
</div>
</ScrollArea>
</div>
</main>

<!-- Fixed Footer -->
<footer class="flex-none px-8 py-4 md:px-16 border-t">
<div class="max-w-4xl mx-auto">
<p class="text-sm text-muted-foreground">
Not sure where to start?{" "}
<Button
variant="link"
class="text-primary hover:text-primary/90 p-0 h-auto"
onclick={() =>
window.electron.openInChrome(
"https://block.github.io/goose/docs/quickstart"
)}
>
Quick Start Guide
</Button>
</p>
</div>
</footer>
</div>

0 comments on commit 0f7f4c9

Please sign in to comment.