checkpoint2
This commit is contained in:
@@ -4,15 +4,10 @@ import React, { useState, useEffect } from 'react';
|
||||
import QRCode from 'qrcode';
|
||||
import {
|
||||
Smartphone,
|
||||
QrCode,
|
||||
Copy,
|
||||
Check,
|
||||
Gift,
|
||||
ExternalLink,
|
||||
Sparkles,
|
||||
Zap,
|
||||
ShieldCheck,
|
||||
Star
|
||||
ShieldCheck
|
||||
} from 'lucide-react';
|
||||
import { AppItem, ToolItem, resolveLocalised } from '@/types';
|
||||
|
||||
@@ -53,17 +48,17 @@ export function AppHandoffSection({
|
||||
useEffect(() => {
|
||||
if (showQr) {
|
||||
QRCode.toDataURL(targetUrl, {
|
||||
width: 240,
|
||||
width: 220,
|
||||
margin: 1,
|
||||
color: {
|
||||
dark: '#020617',
|
||||
light: '#ffffff',
|
||||
dark: '#141E28',
|
||||
light: '#F8F9FA',
|
||||
},
|
||||
})
|
||||
.then(setQrDataUrl)
|
||||
.catch(console.error);
|
||||
.then((url) => setQrDataUrl(url))
|
||||
.catch(() => {});
|
||||
}
|
||||
}, [targetUrl, showQr]);
|
||||
}, [showQr, targetUrl]);
|
||||
|
||||
const copyPromo = () => {
|
||||
navigator.clipboard.writeText(bonusCode);
|
||||
@@ -71,7 +66,7 @@ export function AppHandoffSection({
|
||||
setTimeout(() => setCopiedPromo(false), 2000);
|
||||
};
|
||||
|
||||
const copyTargetUrl = () => {
|
||||
const copyLink = () => {
|
||||
navigator.clipboard.writeText(targetUrl);
|
||||
setCopiedLink(true);
|
||||
setTimeout(() => setCopiedLink(false), 2000);
|
||||
@@ -81,206 +76,120 @@ export function AppHandoffSection({
|
||||
const appTagline = resolveLocalised(app.tagline, locale);
|
||||
|
||||
return (
|
||||
<section
|
||||
id="app-handoff"
|
||||
className="py-16 sm:py-24 bg-gradient-to-b from-[#FAF8F5] via-white to-[#FAF8F5] border-t border-slate-900/[0.08] relative overflow-hidden scroll-mt-24"
|
||||
>
|
||||
{/* Ambient background glow */}
|
||||
<div className="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-full max-w-7xl h-96 bg-gradient-to-r from-blue-500/[0.04] via-indigo-500/[0.05] to-teal-500/[0.04] blur-3xl pointer-events-none -z-10" />
|
||||
<section id="app-handoff" className="py-16 sm:py-24 bg-paper border-b border-rule relative">
|
||||
<div className="max-w-container mx-auto px-4 sm:px-6 lg:px-8 space-y-10">
|
||||
{/* Section Header */}
|
||||
<div className="max-w-2xl space-y-2 border-b border-rule pb-5">
|
||||
<h2 className="text-3xl sm:text-4xl font-display font-bold text-ink tracking-tight">
|
||||
Continue on mobile
|
||||
</h2>
|
||||
<p className="text-sm sm:text-base text-ink-2 font-body text-pretty">
|
||||
Handoff this tool directly to your iOS or Android phone with 50 bonus credits.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8 relative z-10">
|
||||
<div className="bg-white rounded-[2.5rem] p-8 sm:p-12 lg:p-14 border border-slate-900/[0.09] shadow-cinematic-3d flex flex-col lg:flex-row items-center justify-between gap-10 lg:gap-14">
|
||||
|
||||
{/* Left Column: Copy, Bonus & Clickable Store Buttons */}
|
||||
<div className="space-y-6 max-w-xl">
|
||||
{/* Header Badge */}
|
||||
<div className="flex flex-wrap items-center gap-2.5">
|
||||
<span className="inline-flex items-center gap-2 px-3.5 py-1.5 rounded-full bg-blue-50 border border-blue-200/80 text-xs font-mono font-bold text-blue-700 shadow-2xs">
|
||||
<Smartphone className="w-3.5 h-3.5 text-blue-600" />
|
||||
<span>NATIVE IOS & ANDROID APP</span>
|
||||
</span>
|
||||
|
||||
{app.rating && (
|
||||
<span className="inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full bg-amber-50 border border-amber-200 text-xs font-bold text-amber-800 shadow-2xs">
|
||||
<Star className="w-3.5 h-3.5 fill-amber-400 text-amber-400" />
|
||||
<span>{app.rating.value}</span>
|
||||
<span className="text-[11px] font-mono text-amber-700 font-normal">
|
||||
({(app.rating.count / 1000).toFixed(0)}k+ creators)
|
||||
</span>
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Main Headline */}
|
||||
<div>
|
||||
<h2 className="text-2xl sm:text-3xl lg:text-4xl font-display font-black text-slate-900 tracking-tight leading-snug">
|
||||
{tool
|
||||
? `Continue in ${appName} with 4K Lossless Export`
|
||||
: `Download ${appName}`}
|
||||
</h2>
|
||||
<p className="mt-2 text-xs sm:text-sm text-slate-600 font-normal leading-relaxed">
|
||||
Experience zero-latency hardware-accelerated neural processing, batch photoshoot enhancement, fine-tuning sliders, and uncompressed 4K export directly on your phone.
|
||||
<div className="grid grid-cols-1 lg:grid-cols-12 gap-8 items-start">
|
||||
{/* Left Column: App Specifications & Store Buttons */}
|
||||
<div className="lg:col-span-7 studio-sheet p-6 sm:p-8 crop-marked space-y-6">
|
||||
<div className="border-b border-rule pb-5 space-y-2">
|
||||
<span className="text-xs text-muted font-body">Dedicated companion client</span>
|
||||
<h3 className="text-2xl font-display font-bold text-ink">
|
||||
{appName}
|
||||
</h3>
|
||||
<p className="text-sm text-ink-2 font-body leading-relaxed">
|
||||
{appTagline}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{/* Key Feature Perks List */}
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 gap-2.5 pt-1 text-xs text-slate-700">
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="w-5 h-5 rounded-full bg-emerald-50 border border-emerald-200 flex items-center justify-center shrink-0">
|
||||
<Check className="w-3 h-3 text-emerald-600" />
|
||||
</div>
|
||||
<span className="font-medium">4K Lossless Uncompressed Export</span>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="w-5 h-5 rounded-full bg-blue-50 border border-blue-200 flex items-center justify-center shrink-0">
|
||||
<Zap className="w-3 h-3 text-blue-600" />
|
||||
</div>
|
||||
<span className="font-medium">On-Device Neural Engine Acceleration</span>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="w-5 h-5 rounded-full bg-indigo-50 border border-indigo-200 flex items-center justify-center shrink-0">
|
||||
<Sparkles className="w-3 h-3 text-indigo-600" />
|
||||
</div>
|
||||
<span className="font-medium">Batch Multi-Photo Enhancement</span>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="w-5 h-5 rounded-full bg-emerald-50 border border-emerald-200 flex items-center justify-center shrink-0">
|
||||
<ShieldCheck className="w-3 h-3 text-emerald-600" />
|
||||
</div>
|
||||
<span className="font-medium">Offline Private Mode (100% Private)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Welcome Bonus Promo Banner */}
|
||||
{/* Promo Voucher */}
|
||||
{showBonus && (
|
||||
<div className="p-4 sm:p-5 rounded-2xl bg-gradient-to-r from-amber-500/10 via-amber-400/5 to-amber-500/10 border border-amber-300/80 flex items-center justify-between gap-4 shadow-sm">
|
||||
<div className="flex items-center gap-3.5">
|
||||
<div className="w-11 h-11 rounded-2xl bg-amber-100 border border-amber-300 flex items-center justify-center text-amber-700 shrink-0 shadow-sm">
|
||||
<Gift className="w-5 h-5" />
|
||||
</div>
|
||||
<div>
|
||||
<p className="text-xs sm:text-sm font-display font-bold text-slate-900">
|
||||
{app.welcomeBonus?.title || '50 Free 4K HD Export Credits'}
|
||||
</p>
|
||||
<p className="text-[11px] font-mono text-slate-600">
|
||||
Claim promo code on first mobile launch
|
||||
</p>
|
||||
</div>
|
||||
<div className="p-4 bg-paper-2 border border-rule rounded-card flex flex-col sm:flex-row items-start sm:items-center justify-between gap-3">
|
||||
<div className="space-y-0.5">
|
||||
<span className="text-xs font-body font-semibold text-ink">
|
||||
50 Free credits voucher code
|
||||
</span>
|
||||
<p className="text-xs text-muted font-body">
|
||||
Enter during installation for complimentary batch runs.
|
||||
</p>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<span className="font-body text-sm font-semibold text-accent px-2.5 py-1 bg-paper-hi border border-rule rounded">
|
||||
{bonusCode}
|
||||
</span>
|
||||
<button
|
||||
type="button"
|
||||
onClick={copyPromo}
|
||||
className="btn-secondary text-xs px-2.5 py-1"
|
||||
aria-label="Copy voucher code"
|
||||
>
|
||||
{copiedPromo ? <Check className="w-3.5 h-3.5 text-accent" aria-hidden="true" /> : <Copy className="w-3.5 h-3.5 text-muted" aria-hidden="true" />}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
onClick={copyPromo}
|
||||
className="inline-flex items-center gap-1.5 px-3.5 py-2 rounded-xl text-xs font-mono font-bold bg-white border border-amber-300 text-amber-900 hover:bg-amber-100 shadow-sm transition-all active:scale-95 shrink-0"
|
||||
title="Click to copy promo code"
|
||||
>
|
||||
{copiedPromo ? <Check className="w-3.5 h-3.5 text-emerald-600" /> : <Copy className="w-3.5 h-3.5 text-amber-700" />}
|
||||
<span>{copiedPromo ? 'COPIED!' : bonusCode}</span>
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Official Clickable App Store & Google Play Buttons */}
|
||||
<div className="pt-2 space-y-2">
|
||||
<p className="text-[11px] font-mono uppercase tracking-wider text-slate-500 font-semibold">
|
||||
Available now for instant install:
|
||||
</p>
|
||||
<div className="flex flex-wrap items-center gap-3.5">
|
||||
{/* Apple App Store Official Badge Button */}
|
||||
{/* Official Store Buttons */}
|
||||
<div className="pt-2 space-y-3">
|
||||
<span className="text-xs text-muted font-body block">Direct store installation</span>
|
||||
<div className="flex flex-wrap gap-3">
|
||||
<a
|
||||
href={app.stores?.ios?.url || `/go/${tool?.slug || 'explore'}/${app.slug}`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="px-6 py-3 rounded-2xl text-white bg-slate-950 hover:bg-black border border-slate-800 shadow-md hover:shadow-xl hover:-translate-y-0.5 active:translate-y-0 transition-all flex items-center gap-3.5 group"
|
||||
className="btn-secondary"
|
||||
>
|
||||
<svg className="w-6 h-6 fill-white group-hover:scale-110 transition-transform" viewBox="0 0 24 24">
|
||||
<path d="M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.81-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M15.97 6.37c.62-.75 1.04-1.8 0.92-2.87-.9.04-2 .6-2.65 1.36-.58.67-1.08 1.74-.95 2.78 1.01.08 2.05-.52 2.68-1.27z" />
|
||||
</svg>
|
||||
<div className="text-left leading-tight">
|
||||
<span className="block text-[9.5px] uppercase font-mono tracking-wider text-slate-400">Download on the</span>
|
||||
<span className="block text-sm font-bold text-white font-display">Apple App Store</span>
|
||||
</div>
|
||||
<ExternalLink className="w-3.5 h-3.5 text-slate-400 group-hover:text-white transition-colors ml-1" />
|
||||
<Smartphone className="w-4 h-4 text-accent" aria-hidden="true" />
|
||||
<span>Apple App Store</span>
|
||||
<ExternalLink className="w-3 h-3 text-muted ml-1" aria-hidden="true" />
|
||||
</a>
|
||||
|
||||
{/* Google Play Store Official Badge Button */}
|
||||
<a
|
||||
href={app.stores?.android?.url || `/go/${tool?.slug || 'explore'}/${app.slug}`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="px-6 py-3 rounded-2xl text-white bg-slate-950 hover:bg-black border border-slate-800 shadow-md hover:shadow-xl hover:-translate-y-0.5 active:translate-y-0 transition-all flex items-center gap-3.5 group"
|
||||
className="btn-secondary"
|
||||
>
|
||||
<svg className="w-5 h-5 group-hover:scale-110 transition-transform" viewBox="0 0 24 24">
|
||||
<path fill="#4285F4" d="M3.609 1.814L13.792 12 3.61 22.186c-.378-.344-.61-.853-.61-1.436V3.25c0-.583.232-1.092.61-1.436z" />
|
||||
<path fill="#FBBC04" d="M17.156 8.636l-3.364 3.364 3.364 3.364 3.805-2.174c.773-.442.773-1.162 0-1.604l-3.805-2.95z" />
|
||||
<path fill="#EA4335" d="M13.792 12L3.609 1.814c.31-.282.72-.454 1.171-.454.407 0 .807.14 1.157.34l11.219 6.936-3.364 3.364z" />
|
||||
<path fill="#34A853" d="M13.792 12l3.364 3.364-11.219 6.936c-.35.2-.75.34-1.157.34-.451 0-.861-.172-1.171-.454L13.792 12z" />
|
||||
</svg>
|
||||
<div className="text-left leading-tight">
|
||||
<span className="block text-[9.5px] uppercase font-mono tracking-wider text-slate-400">GET IT ON</span>
|
||||
<span className="block text-sm font-bold text-white font-display">Google Play</span>
|
||||
</div>
|
||||
<ExternalLink className="w-3.5 h-3.5 text-slate-400 group-hover:text-white transition-colors ml-1" />
|
||||
<Smartphone className="w-4 h-4 text-accent" aria-hidden="true" />
|
||||
<span>Google Play</span>
|
||||
<ExternalLink className="w-3 h-3 text-muted ml-1" aria-hidden="true" />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Disclaimer */}
|
||||
<p className="text-[11px] font-mono text-slate-400 italic">
|
||||
{resolveLocalised(app.creditsNote, locale, 'Credits and in-app purchases are specific to this app.')}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{/* Right Column: High-Tech Futuristic QR Code Scanner Card */}
|
||||
{showQr && qrDataUrl && (
|
||||
<div className="relative group text-center p-6 sm:p-8 rounded-3xl bg-slate-950 border border-slate-800 shadow-2xl shrink-0 overflow-hidden w-full sm:w-auto flex flex-col items-center">
|
||||
{/* Ambient Glow */}
|
||||
<div className="absolute -inset-1 bg-gradient-to-tr from-blue-600/30 via-indigo-600/25 to-teal-500/30 rounded-3xl blur-2xl opacity-40 group-hover:opacity-70 transition-opacity pointer-events-none" />
|
||||
|
||||
{/* Animated Futuristic Laser Reticle Corners */}
|
||||
<span className="absolute top-3 left-3 w-4 h-4 border-t-2 border-l-2 border-blue-400 rounded-tl-sm pointer-events-none" />
|
||||
<span className="absolute top-3 right-3 w-4 h-4 border-t-2 border-r-2 border-blue-400 rounded-tr-sm pointer-events-none" />
|
||||
<span className="absolute bottom-3 left-3 w-4 h-4 border-b-2 border-l-2 border-blue-400 rounded-bl-sm pointer-events-none" />
|
||||
<span className="absolute bottom-3 right-3 w-4 h-4 border-b-2 border-r-2 border-blue-400 rounded-br-sm pointer-events-none" />
|
||||
|
||||
{/* QR Code Presentation Canvas */}
|
||||
<div className="relative z-10 p-3.5 bg-white rounded-2xl shadow-xl inline-block border border-white/20 transition-transform duration-300 group-hover:scale-[1.02]">
|
||||
{/* eslint-disable-next-line @next/next/no-img-element */}
|
||||
<img
|
||||
src={qrDataUrl}
|
||||
alt="Scan QR code to install app"
|
||||
className="w-40 h-40 sm:w-44 sm:h-44 object-contain rounded-lg"
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* Status Beacon & Camera Target */}
|
||||
<div className="relative z-10 mt-4 flex items-center justify-center gap-2">
|
||||
<span className="relative flex h-2 w-2">
|
||||
<span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"></span>
|
||||
<span className="relative inline-flex rounded-full h-2 w-2 bg-emerald-500"></span>
|
||||
</span>
|
||||
<span className="text-xs font-mono font-bold tracking-wider uppercase text-slate-200">
|
||||
Point Camera to Scan
|
||||
</span>
|
||||
</div>
|
||||
<p className="relative z-10 text-[11px] font-mono text-slate-400 mt-1 max-w-[210px] mx-auto">
|
||||
Opens app store listing instantly with promo code pre-applied
|
||||
</p>
|
||||
|
||||
{/* Quick Copy Link Action */}
|
||||
<div className="relative z-10 mt-3 pt-3 border-t border-slate-800/80 w-full flex justify-center">
|
||||
<button
|
||||
type="button"
|
||||
onClick={copyTargetUrl}
|
||||
className="inline-flex items-center gap-1.5 px-3.5 py-1.5 rounded-lg text-[11px] font-mono text-slate-400 hover:text-white bg-slate-900 border border-slate-800 hover:border-slate-700 transition-colors shadow-2xs active:scale-95"
|
||||
onClick={copyLink}
|
||||
className="btn-secondary"
|
||||
aria-label="Copy direct deep link"
|
||||
>
|
||||
{copiedLink ? <Check className="w-3.5 h-3.5 text-emerald-400" /> : <Copy className="w-3.5 h-3.5" />}
|
||||
<span>{copiedLink ? 'Copied Link!' : 'Copy Mobile Link'}</span>
|
||||
{copiedLink ? <Check className="w-4 h-4 text-accent" aria-hidden="true" /> : <Copy className="w-4 h-4 text-muted" aria-hidden="true" />}
|
||||
<span>{copiedLink ? 'Link copied' : 'Copy link'}</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className="pt-2 text-xs text-muted font-body">
|
||||
{resolveLocalised(app.creditsNote, locale, 'Credits and in-app purchases are specific to this app.')}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Right Column: Clean QR Code Card */}
|
||||
{showQr && qrDataUrl && (
|
||||
<div className="lg:col-span-5 studio-sheet p-6 sm:p-8 crop-marked text-center flex flex-col items-center">
|
||||
<span className="text-xs text-muted font-body mb-4">Scan with phone camera</span>
|
||||
|
||||
<div className="p-3 bg-paper-hi border border-rule rounded-card inline-block shadow-sm">
|
||||
<img
|
||||
src={qrDataUrl}
|
||||
alt="Scan QR code to install app"
|
||||
className="w-44 h-44 object-contain rounded"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="mt-4 space-y-1 text-xs font-body text-muted">
|
||||
<p className="font-medium text-ink">Instant mobile handoff</p>
|
||||
<p>Directs to App Store or Google Play with {bonusCode} applied automatically.</p>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user