feat: onboarding trial flow, Google sign-in, dark mode hotspot fixes

- Move trial creation from auth hook to dedicated /subscriptions/trial endpoint
  with eligibility checks (3-day Full Paket trial)
- Add animated onboarding progress (Remotion) with confetti on completion
- Register redirects to subscription page with welcome flow
- Add Google social login/signup support with config injection
- Improve hotspot overlay visibility in dark mode
- Show "Panele Git" on landing page when authenticated
- Turkish translations for API error messages
- Add toast utility wrapper, UUID generation for auth IDs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Sase Dev
2026-02-15 14:53:57 +00:00
parent a5ee147675
commit 87d8eea298
50 changed files with 1116 additions and 298 deletions

View File

@@ -3,7 +3,7 @@ import { Link, createFileRoute } from "@tanstack/react-router";
import { Button } from "@sase/ui";
import { Input } from "@sase/ui";
import { Label } from "@sase/ui";
import { toast } from "sonner";
import { toast } from "@/lib/toast";
export const Route = createFileRoute("/_auth/forgot-password")({
component: ForgotPasswordPage,

View File

@@ -4,7 +4,7 @@ import { Button } from "@sase/ui";
import { Input } from "@sase/ui";
import { Label } from "@sase/ui";
import { signIn } from "@/lib/auth-client";
import { toast } from "sonner";
import { toast } from "@/lib/toast";
export const Route = createFileRoute("/_auth/login")({
component: LoginPage,
@@ -104,7 +104,7 @@ function LoginPage() {
<Button
variant="outline"
className="w-full"
onClick={() => signIn.social({ provider: "google" })}
onClick={() => signIn.social({ provider: "google", callbackURL: "/dashboard/search" })}
>
Google ile Giriş Yap
</Button>

View File

@@ -1,10 +1,10 @@
import { useState } from "react";
import { Link, createFileRoute, useNavigate } from "@tanstack/react-router";
import { Link, createFileRoute } from "@tanstack/react-router";
import { Button } from "@sase/ui";
import { Input } from "@sase/ui";
import { Label } from "@sase/ui";
import { signUp } from "@/lib/auth-client";
import { toast } from "sonner";
import { signIn, signUp } from "@/lib/auth-client";
import { toast } from "@/lib/toast";
import { ShieldCheck } from "lucide-react";
export const Route = createFileRoute("/_auth/register")({
@@ -12,8 +12,6 @@ export const Route = createFileRoute("/_auth/register")({
});
function RegisterPage() {
const navigate = useNavigate();
const vin = new URLSearchParams(window.location.search).get("vin");
const [name, setName] = useState("");
const [email, setEmail] = useState("");
const [password, setPassword] = useState("");
@@ -26,11 +24,7 @@ function RegisterPage() {
try {
await signUp.email({ name, email, password });
toast.success("Hesap oluşturuldu!");
if (vin) {
navigate({ to: "/dashboard/search" });
} else {
navigate({ to: "/dashboard/search" });
}
window.location.href = "/dashboard/subscription?welcome=1";
} catch {
toast.error("Kayıt başarısız. Bu e-posta zaten kullanılıyor olabilir.");
} finally {
@@ -52,7 +46,7 @@ function RegisterPage() {
{/* Trial messaging */}
<div className="mt-3 flex items-center gap-2 rounded-lg bg-emerald-500/10 px-3 py-2 text-sm text-emerald-600 dark:text-emerald-400">
<ShieldCheck className="size-4 shrink-0" />
7 gün ücretsiz deneyin kredi kartı gerekmez
3 gün Full Paket ücretsiz deneyin kredi kartı gerekmez
</div>
</div>
@@ -97,6 +91,28 @@ function RegisterPage() {
</Button>
</form>
{/* Divider + Google */}
<div className="space-y-3">
<div className="relative">
<div className="absolute inset-0 flex items-center">
<span className="w-full border-t" />
</div>
<div className="relative flex justify-center text-xs uppercase">
<span className="bg-background px-2 text-muted-foreground">
veya
</span>
</div>
</div>
<Button
variant="outline"
className="w-full"
onClick={() => signIn.social({ provider: "google", callbackURL: "/dashboard/subscription?welcome=1" })}
>
Google ile Kayıt Ol
</Button>
</div>
<p className="text-center text-xs text-muted-foreground">
Kayıt olunca hemen VIN aramaya başlayın
</p>

View File

@@ -3,7 +3,7 @@ import { createFileRoute, useNavigate } from "@tanstack/react-router";
import { Button } from "@sase/ui";
import { Input } from "@sase/ui";
import { Label } from "@sase/ui";
import { toast } from "sonner";
import { toast } from "@/lib/toast";
export const Route = createFileRoute("/_auth/reset-password")({
validateSearch: (search: Record<string, unknown>) => ({