From 5a3d405ff42bec73cf887c8126b9eb726a67c56f Mon Sep 17 00:00:00 2001 From: alireza Date: Mon, 29 Jun 2026 14:23:24 +0330 Subject: [PATCH] fix: update VITE_PANEL_API URL and improve login form accessibility refactor: streamline SpreadFeatures component by removing unused video handling feat: implement SSO hand-off for Statista integration in server --- frontend/Dockerfile | 2 +- frontend/public/hero-bg.mp4 | 4 +- frontend/src/pages/Auth/AuthPage.tsx | 4 +- .../pages/Home/sections/SpreadFeatures.tsx | 46 +++++------------- frontend/src/pages/Pulse/Pulse.tsx | 6 ++- panel/server.js | 47 +++++++++++++++---- 6 files changed, 60 insertions(+), 49 deletions(-) diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 9328a4b..9c913ba 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -20,7 +20,7 @@ RUN npm config set registry https://package-mirror.liara.ir/repository/npm/ \ # Build the static bundle. # VITE_PANEL_API is inlined into the bundle at build time (Vite reads it during # `npm run build`), so it must be present as an env var here — not at runtime. -ARG VITE_PANEL_API=https://cms-steelforesight.liara.run +ARG VITE_PANEL_API=https://api.steelforesight.ir ENV VITE_PANEL_API=$VITE_PANEL_API COPY . . RUN npm run build diff --git a/frontend/public/hero-bg.mp4 b/frontend/public/hero-bg.mp4 index 1953b0a..188e0bc 100644 --- a/frontend/public/hero-bg.mp4 +++ b/frontend/public/hero-bg.mp4 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7252b958029e1bbd72b2c774a2c02f9d423a4daa1be7926bb1208b020f702bb6 -size 32234368 +oid sha256:a6e2cb352e5bd25693baac943cc3aad44e6dc1595213bd64fc19f6a0230e57c8 +size 30295491 diff --git a/frontend/src/pages/Auth/AuthPage.tsx b/frontend/src/pages/Auth/AuthPage.tsx index 1d3e843..f9fdc68 100644 --- a/frontend/src/pages/Auth/AuthPage.tsx +++ b/frontend/src/pages/Auth/AuthPage.tsx @@ -178,8 +178,8 @@ function LoginForm({ lang, login, navigate }: { {!otpMode ? ( <>
- - setPhone(e.target.value)} placeholder="09123456789" dir="ltr" icon={} /> + + setPhone(e.target.value)} placeholder={fa ? 'شماره موبایل یا ایمیل' : 'Phone or email'} dir="ltr" icon={} /> setPassword(e.target.value)} dir="ltr" icon={} suffix={ setShowPass(s => !s)} />} /> diff --git a/frontend/src/pages/Home/sections/SpreadFeatures.tsx b/frontend/src/pages/Home/sections/SpreadFeatures.tsx index 5fe6eb2..853468e 100644 --- a/frontend/src/pages/Home/sections/SpreadFeatures.tsx +++ b/frontend/src/pages/Home/sections/SpreadFeatures.tsx @@ -1,4 +1,4 @@ -import { useState, useEffect, useRef } from 'react' +import { useState, useEffect } from 'react' import { motion } from 'framer-motion' const GOLD = '#CD9E53' @@ -7,8 +7,6 @@ const EASE = [0.22, 1, 0.36, 1] as const export default function SpreadFeatures() { const [isMobile, setIsMobile] = useState(false) - const [videoSrc, setVideoSrc] = useState(null) - const blobUrl = useRef(null) useEffect(() => { const mq = window.matchMedia('(max-width: 767px)') @@ -18,42 +16,22 @@ export default function SpreadFeatures() { return () => mq.removeEventListener('change', update) }, []) - // Fetch video as blob to bypass range-request issues on tunnels/proxies - useEffect(() => { - let cancelled = false - fetch('/hero-bg.mp4') - .then(r => { if (!r.ok) throw new Error('fetch failed'); return r.blob() }) - .then(blob => { - if (cancelled) return - const url = URL.createObjectURL(blob) - blobUrl.current = url - setVideoSrc(url) - }) - .catch(() => { /* keep navy background */ }) - return () => { - cancelled = true - if (blobUrl.current) URL.revokeObjectURL(blobUrl.current) - } - }, []) - return (
{/* navy fallback — visible until video blob is ready */}
- {/* full-bleed video — src is a local blob URL, no range requests */} - {videoSrc && ( -