diff --git a/src/components/AuthGate.tsx b/src/components/AuthGate.tsx index 4291e2d..08c08fa 100644 --- a/src/components/AuthGate.tsx +++ b/src/components/AuthGate.tsx @@ -6,6 +6,18 @@ import { import { loginRequest } from "@/lib/msal-config"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Button } from "@/components/ui/button"; +import { Scissors } from "lucide-react"; + +function MicrosoftLogo() { + return ( + + + + + + + ); +} export function AuthGate({ children }: { children: React.ReactNode }) { const { instance } = useMsal(); @@ -14,23 +26,46 @@ export function AuthGate({ children }: { children: React.ReactNode }) { <> {children} -
- - - SmartCrop -

- Sign in to access the application -

-
- - - -
+
+ {/* Branded panel — hidden on mobile */} +
+ +

+ SmartCrop +

+

+ AI-powered image cropping for every platform. Generate perfectly + framed crops for social, web, and print in seconds. +

+
+ + {/* Login card */} +
+ + + {/* Show brand on mobile (panel hidden) */} +
+ + + SmartCrop + +
+ Sign in to continue +

+ Use your Microsoft account to access SmartCrop. +

+
+ + + +
+
diff --git a/src/pages/Index.tsx b/src/pages/Index.tsx index a755edb..20df465 100644 --- a/src/pages/Index.tsx +++ b/src/pages/Index.tsx @@ -1,4 +1,5 @@ import React, { useState } from "react"; +import { useMsal } from "@azure/msal-react"; import ImageUpload from "@/components/ImageUpload"; import RatioSelector from "@/components/RatioSelector"; import CropPreviewCard from "@/components/CropPreviewCard"; @@ -6,7 +7,7 @@ import CropEditor from "@/components/CropEditor"; import { Button } from "@/components/ui/button"; import { Progress } from "@/components/ui/progress"; import { ScrollArea } from "@/components/ui/scroll-area"; -import { Scissors, Download, Loader2, Sparkles, Cpu } from "lucide-react"; +import { Scissors, Download, Loader2, Sparkles, Cpu, LogOut, User } from "lucide-react"; import { toast } from "sonner"; import type { AspectRatioPreset, CropSuggestion, ImageFile } from "@/lib/crop-types"; import { exportCropsAsZip } from "@/lib/export-zip"; @@ -16,6 +17,8 @@ import { analyzeImageLocal } from "@/lib/analyze-local"; type CropEngine = "ai" | "local"; const Index = () => { + const { instance, accounts } = useMsal(); + const user = accounts[0]; const [images, setImages] = useState([]); const [activeIndex, setActiveIndex] = useState(0); const [selectedRatios, setSelectedRatios] = useState([]); @@ -119,7 +122,20 @@ const Index = () => {

SmartCrop

- v2.0 +
+ + + {user?.name || user?.username} + + +
@@ -133,7 +149,7 @@ const Index = () => { onActiveChange={setActiveIndex} /> - {activeImage && selectedRatios.length > 0 && ( + {activeImage && (
{/* Engine toggle */}
@@ -163,9 +179,10 @@ const Index = () => {