From a938fb4ec5d04c8498663de5b8426e745d9ebdb6 Mon Sep 17 00:00:00 2001 From: freepilot-bot <215356755+freepilot-bot@users.noreply.github.com> Date: Fri, 13 Jun 2025 12:46:43 +0000 Subject: [PATCH] feat: add intermediate loading page for app views - Create new AppLoadingPage component with 5-second countdown - Update routing to serve /apps/:id/view with intermediate page - Replace all /api/apps/:id/view links with /apps/:id/view - Add LNFly branding and AI disclaimer to loading page - Include mobile-responsive design with progress bar - Support preview key parameter forwarding - Automatically redirect to actual app after countdown - Add instant view button for immediate access --- frontend/src/components/ExploreApps.tsx | 2 +- frontend/src/main.tsx | 7 +- frontend/src/pages/AppLoadingPage.tsx | 116 ++++++++++++++++++++++++ frontend/src/pages/AppStatusPage.tsx | 2 +- 4 files changed, 124 insertions(+), 3 deletions(-) create mode 100644 frontend/src/pages/AppLoadingPage.tsx diff --git a/frontend/src/components/ExploreApps.tsx b/frontend/src/components/ExploreApps.tsx index 4f7aafa..b1d1471 100644 --- a/frontend/src/components/ExploreApps.tsx +++ b/frontend/src/components/ExploreApps.tsx @@ -270,7 +270,7 @@ function ExploreApps({ onFork }: ExploreAppsProps) { )} - + + + + {/* Subtitle explaining what LNFly is */} +

+ AI-powered app creation platform +

+ + {/* Warning message */} +
+

⚠️ Important Notice

+

Apps on LNFly are vibe coded with AI. Use at your own risk.

+
+ + {/* Countdown display */} +
+

+ Automatically loading app in: +

+
+ {countdown} +
+
+
+
+

+ {countdown > 0 ? `${countdown} second${countdown !== 1 ? 's' : ''} remaining` : 'Redirecting...'} +

+
+ + {/* Action button */} + + + + + + + ); +} + +export default AppLoadingPage; \ No newline at end of file diff --git a/frontend/src/pages/AppStatusPage.tsx b/frontend/src/pages/AppStatusPage.tsx index 07de8fa..81686e1 100644 --- a/frontend/src/pages/AppStatusPage.tsx +++ b/frontend/src/pages/AppStatusPage.tsx @@ -1102,7 +1102,7 @@ function AppStatusPage() { href={ buttonDisabled ? "#" - : `/api/apps/${id}/view${ + : `/apps/${id}/view${ appData.published ? "" : `?previewKey=${previewKey}` }` }