Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix(home): mobile view (#3737)

dev-rb8afbf4f68d86
diff --git a/js/app/packages/app/component/home/home.tsx b/js/app/packages/app/component/home/home.tsx
index ecb90ea1e2..699f5c067b 100644
--- a/js/app/packages/app/component/home/home.tsx
+++ b/js/app/packages/app/component/home/home.tsx
@@ -84,12 +84,8 @@ function HomeContent() {
return (
<main class="relative h-full overflow-y-auto bg-surface">
- <div class="@container/home size-full px-0 pb-10 p-2 md:p-4">
- <div class="mx-auto h-full flex flex-col justify-center -mt-15 w-full min-w-0 max-w-2xl gap-10">
- <HomeSectionBoundary title="hero">
- <section class="relative">
- <style>{
- /*css*/ `
+ <style>{
+ /*css*/ `
@keyframes home-hero-fade-up {
from { opacity: 0; transform: translateY(8px); }
to { opacity: 1; transform: translateY(0); }
@@ -116,22 +112,25 @@ function HomeContent() {
}
}
`
- }</style>
- <div class="home-hero-stagger mx-auto flex max-w-3xl flex-col items-center gap-8 px-4 sm:px-0">
- <div class="flex w-full items-center gap-3 justify-center">
- <AnimatedHeroLogo class="size-6 text-accent" />
+ }</style>
+
+ <div class="@container/home size-full sm:pb-10 p-2 md:p-4">
+ <HomeSectionBoundary title="hero">
+ <section class="relative flex flex-col size-full">
+ <div class="home-hero-stagger mx-auto flex flex-col items-center gap-8 justify-end sm:justify-center sm:-mt-15 max-w-2xl size-full">
+ <div class="flex flex-col sm:flex-row w-full items-center gap-3 justify-center my-auto sm:m-0">
+ <AnimatedHeroLogo class="size-6 text-accent" />
+ <div class="flex flex-col gap-1 items-center">
<h1 class="relative min-w-0 text-balance text-2xl font-medium font-serif tracking-tight text-ink">
{greeting()}, <span class="capitalize">{firstName()}</span>
</h1>
</div>
-
- <div class="flex flex-col gap-4 w-full text-left">
- <HomeChatInput />
- </div>
</div>
- </section>
- </HomeSectionBoundary>
- </div>
+
+ <HomeChatInput />
+ </div>
+ </section>
+ </HomeSectionBoundary>
</div>
</main>
);
diff --git a/js/app/packages/core/component/AI/component/input/ChatInput.tsx b/js/app/packages/core/component/AI/component/input/ChatInput.tsx
index 34d71e6258..4035c1105e 100644
--- a/js/app/packages/core/component/AI/component/input/ChatInput.tsx
+++ b/js/app/packages/core/component/AI/component/input/ChatInput.tsx
@@ -131,16 +131,15 @@ export function ChatInput(props: ChatInputComponentProps) {
attachments.attached().length > 0 || uploadQueue.uploading().length > 0;
const LeftButton = () => (
- <div ref={setAttachMenuAnchorRef} class="shrink-0 flex">
- <Button
- variant="ghost"
- size="icon-sm"
- class="text-ink"
- onClick={() => setShowAttachMenu((prev) => !prev)}
- >
- <PaperclipIcon />
- </Button>
- </div>
+ <Button
+ ref={setAttachMenuAnchorRef}
+ variant="ghost"
+ size="icon-sm"
+ class="text-ink"
+ onClick={() => setShowAttachMenu((prev) => !prev)}
+ >
+ <PaperclipIcon />
+ </Button>
);
const StopButton = () => (
@@ -162,7 +161,7 @@ export function ChatInput(props: ChatInputComponentProps) {
const SendButton = () => (
<UiSendButton
- tooltip={'Ask Ai'}
+ tooltip={'Ask AI'}
shortcut="enter"
tooltipPlacement="top"
disabled={!canSendMessage()}
@@ -263,23 +262,16 @@ export function ChatInput(props: ChatInputComponentProps) {
</div>
<div
- class={cn({
+ class={cn('contents', {
'flex justify-between items-center': isTallVariant(),
})}
>
- <div
- class={cn(
- !isTallVariant() && 'absolute left-2 top-1/2 -translate-y-1/2'
- )}
- >
+ <div class={cn(!isTallVariant() && 'absolute left-2 bottom-1.5')}>
<LeftButton />
</div>
<div
- class={cn(
- !isTallVariant() &&
- 'absolute right-1.5 top-1/2 -translate-y-1/2'
- )}
+ class={cn(!isTallVariant() && 'absolute right-1.5 bottom-1.5')}
>
<RightControls />
</div>