Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions .github/workflows/build-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,25 @@ jobs:
fi
echo "$CHANGED" | xargs pnpm prettier --check

- name: Lint (OxLint)
- name: Lint changed files (OxLint)
working-directory: Zero
run: pnpm dlx oxlint@latest
run: |
CHANGED=$(git diff --name-only --diff-filter=ACMR origin/${{ github.base_ref }}...HEAD -- '*.ts' '*.tsx' | grep '^Zero/' | sed 's|^Zero/||' || true)
if [ -z "$CHANGED" ]; then
echo "No lintable files changed"
exit 0
fi
echo "$CHANGED" | xargs pnpm dlx oxlint@latest

- name: Lint (ESLint)
- name: Lint changed files (ESLint)
working-directory: Zero
run: pnpm lint
run: |
CHANGED=$(git diff --name-only --diff-filter=ACMR origin/${{ github.base_ref }}...HEAD -- '*.ts' '*.tsx' | grep '^Zero/' | sed 's|^Zero/||' || true)
if [ -z "$CHANGED" ]; then
echo "No lintable files changed"
exit 0
fi
echo "$CHANGED" | xargs pnpm eslint

build:
name: Build
Expand Down
23 changes: 16 additions & 7 deletions Zero/apps/mail/components/home/HomeContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ import {
Expand,
} from '../icons/icons';
import { PixelatedBackground, PixelatedLeft, PixelatedRight } from '@/components/home/pixelated-bg';
import { SignInDialog } from '../connection/sign-in-dialog';
import { Tabs, TabsContent } from '@/components/ui/tabs';
import { useSession, signIn } from '@/lib/auth-client';
import { Link, useNavigate } from 'react-router';
import { Button } from '@/components/ui/button';
import { Balancer } from 'react-wrap-balancer';
import { useSession } from '@/lib/auth-client';
import { Navigation } from '../navigation';
import { motion } from 'motion/react';
import { Type } from 'lucide-react';
import { useEffect } from 'react';
import { toast } from 'sonner';
import Footer from './footer';
import React from 'react';

Expand Down Expand Up @@ -112,11 +112,20 @@ export default function HomeContent() {
Get Started
</Link>
) : (
<SignInDialog>
<button className="inline-flex h-10 items-center justify-center gap-2 whitespace-nowrap rounded-lg bg-white px-6 text-sm font-medium text-black no-underline transition-colors hover:bg-white/90">
Get Started
</button>
</SignInDialog>
<button
className="inline-flex h-10 items-center justify-center gap-2 whitespace-nowrap rounded-lg bg-white px-6 text-sm font-medium text-black no-underline transition-colors hover:bg-white/90"
onClick={() => {
toast.promise(
signIn.social({
provider: 'google',
callbackURL: `${window.location.origin}/mail`,
}),
{ error: 'Login redirect failed' },
);
}}
>
Get Started
</button>
)}
</motion.div>
</section>
Expand Down
23 changes: 16 additions & 7 deletions Zero/apps/mail/components/navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ import {
import { Sheet, SheetContent, SheetHeader, SheetTitle, SheetTrigger } from '@/components/ui/sheet';
import { useState, useEffect, useRef, startTransition } from 'react';
import { AnimatedNumber } from '@/components/ui/animated-number';
import { SignInDialog } from './connection/sign-in-dialog';
import { useSession, signIn } from '@/lib/auth-client';
import { Separator } from '@/components/ui/separator';
import { useQuery } from '@tanstack/react-query';
import { Link, useNavigate } from 'react-router';
import { Menu, ChevronDown } from 'lucide-react';
import { Button } from '@/components/ui/button';
import { useSession } from '@/lib/auth-client';
import { GitHub, Star } from './icons/icons';
import { cn } from '@/lib/utils';
import { toast } from 'sonner';

const aboutLinks = [
{
Expand Down Expand Up @@ -229,11 +229,20 @@ export function Navigation() {
Get Started
</Link>
) : (
<SignInDialog>
<button className="inline-flex h-8 items-center justify-center gap-2 whitespace-nowrap rounded-lg bg-white px-4 text-sm font-medium text-black no-underline transition-colors hover:bg-white/90">
Get Started
</button>
</SignInDialog>
<button
className="inline-flex h-8 items-center justify-center gap-2 whitespace-nowrap rounded-lg bg-white px-4 text-sm font-medium text-black no-underline transition-colors hover:bg-white/90"
onClick={() => {
toast.promise(
signIn.social({
provider: 'google',
callbackURL: `${window.location.origin}/mail`,
}),
{ error: 'Login redirect failed' },
);
}}
>
Get Started
</button>
)}
</div>
</nav>
Expand Down
4 changes: 0 additions & 4 deletions Zero/apps/mail/lib/auth-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ import type { Auth } from '@zero/server/auth';

const backendURL = import.meta.env.VITE_PUBLIC_BACKEND_URL || 'http://localhost:8787';

// Debug: Log the backend URL being used
console.log('Auth client baseURL:', backendURL);
console.log('Environment VITE_PUBLIC_BACKEND_URL:', import.meta.env.VITE_PUBLIC_BACKEND_URL);

export const authClient = createAuthClient({
baseURL: backendURL,
fetchOptions: {
Expand Down
Loading