Skip to content

Create professional demos and 3D mockups in seconds, directly in your browser

feat: Up theme functionaliti components

CristianOlivera1ce97fad59b57
diff --git a/app/[locale]/(editor)/layout.tsx b/app/[locale]/(editor)/layout.tsx
index 1e6f4e2..a04fc05 100644
--- a/app/[locale]/(editor)/layout.tsx
+++ b/app/[locale]/(editor)/layout.tsx
@@ -1,24 +1,14 @@
-import { cookies } from "next/headers";
import { AuthProvider } from "@/app/contexts/useAuth";
import RecordingOverlay from "../../components/ui/RecordingOverlay";
import { Mockup3dProvider } from "@/app/contexts/Mockup3dContext";
import { RecordingProvider } from "@/app/contexts/RecordingContext";
-const THEME_COOKIE = "openvid_theme";
-
export default async function EditorLayout({ children }: { children: React.ReactNode }) {
- // SSR por cookie: el tema efectivo (light|dark, nunca "system") lo escribe
- // UserMenuDropdown. Sin cookie -> dark (look por defecto). Así el primer
- // paint ya coincide con el tema guardado y no hay flash.
- const cookieStore = await cookies();
- const theme = cookieStore.get(THEME_COOKIE)?.value;
- const isDark = theme !== "light";
-
return (
<AuthProvider>
<RecordingProvider>
<Mockup3dProvider>
- <div id="editor-root" className={`min-h-screen bg-background${isDark ? " dark" : ""}`}>
+ <div id="editor-root" className="min-h-screen bg-background">
{children}
</div>
</Mockup3dProvider>
diff --git a/app/[locale]/(home)/donate/DonateClient.tsx b/app/[locale]/(home)/donate/DonateClient.tsx
index b20d5c3..8c360f3 100644
--- a/app/[locale]/(home)/donate/DonateClient.tsx
+++ b/app/[locale]/(home)/donate/DonateClient.tsx
@@ -27,7 +27,7 @@ export default function DonateClient({ methods, defaultMethod }: DonateClientPro
return (
<div className="min-h-screen bg-black text-white overflow-hidden pt-24 pb-16 relative">
<div className="max-w-2xl mx-auto px-4">
- <Link href="/" className="inline-flex items-center gap-2 text-sm text-white/40 hover:text-white mb-12 transition-colors group font-medium" aria-label={t("backHome")}>
+ <Link href="/" className="inline-flex items-center gap-2 text-sm text-white/70 hover:text-white mb-12 transition-colors group font-medium" aria-label={t("backHome")}>
<Icon icon="lucide:arrow-left" width="16" className="group-hover:-translate-x-1 transition-transform" aria-hidden="true" />
{t("backHome")}
</Link>
@@ -65,11 +65,11 @@ export default function DonateClient({ methods, defaultMethod }: DonateClientPro
<div>
<div className="flex items-center gap-2 mb-0.5">
<span className="text-sm font-medium text-white/90 group-hover:text-white transition-colors">{method.name}</span>
- <span className="text-[9px] uppercase tracking-wider text-white/40 border border-white/10 px-1.5 py-0.5 rounded font-medium">
+ <span className="text-[9px] uppercase tracking-wider text-white/70 border border-white/10 px-1.5 py-0.5 rounded font-medium">
{method.tagline}
</span>
</div>
- <p className="text-[11px] text-white/40">{method.detail}</p>
+ <p className="text-[11px] text-white/70">{method.detail}</p>
</div>
</div>
<Icon icon="lucide:chevron-down" width="16" className={`text-white/30 shrink-0 transition-transform duration-300 ${selected === method.id ? "rotate-180 text-white/70" : ""}`} aria-hidden="true" />
@@ -129,7 +129,7 @@ export default function DonateClient({ methods, defaultMethod }: DonateClientPro
<div className="relative w-full max-w-sm bg-[#131315] border border-white/10 rounded-2xl p-6 shadow-2xl flex flex-col items-center animate-in zoom-in-95 duration-200" onClick={(e) => e.stopPropagation()}>
<div className="w-full flex justify-between items-center mb-6">
<span className="text-sm font-semibold text-white/90 tracking-wide" id="qr-modal-title">{t("scanQR")}</span>
- <button onClick={() => setQrModalSrc(null)} className="text-white/40 hover:text-white bg-white/5 hover:bg-white/10 rounded-full p-1.5 transition-colors" aria-label="Close modal">
+ <button onClick={() => setQrModalSrc(null)} className="text-white/70 hover:text-white bg-white/5 hover:bg-white/10 rounded-full p-1.5 transition-colors" aria-label="Close modal">
<Icon icon="lucide:x" width="18" aria-hidden="true" />
</button>
</div>
@@ -160,7 +160,7 @@ function CopyRow({ label, value, copyKey, copied, onCopy, copyText, copiedText }
return (
<div className="flex items-center justify-between bg-black border border-white/10 rounded-lg p-3 group">
<div>
- <p className="text-[11px] uppercase tracking-wider text-white/40 mb-1 font-medium" id={`label-${copyKey}`}>{label}</p>
+ <p className="text-[11px] uppercase tracking-wider text-white/70 mb-1 font-medium" id={`label-${copyKey}`}>{label}</p>
<p className="font-mono text-sm text-white/90 tracking-wide" aria-labelledby={`label-${copyKey}`}>{value}</p>
</div>
<button
diff --git a/app/[locale]/layout.tsx b/app/[locale]/layout.tsx
index 180dc91..af9687e 100644
--- a/app/[locale]/layout.tsx
+++ b/app/[locale]/layout.tsx
@@ -16,6 +16,28 @@ import {
} from "@/lib/seo";
import "../globals.css";
+// Script inline anti-FOUC: aplica el tema sobre <html> antes del primer paint.
+// Lee la preferencia cruda (openvid_theme_pref) y el tema efectivo
+// (openvid_theme); para "system" (o sin cookie) resuelve con
+// prefers-color-scheme. Así el primer paint coincide con el tema guardado,
+// incluso si la cookie efectiva quedó desactualizada tras un cambio de
+// preferencia del OS en modo system.
+const THEME_INLINE_SCRIPT = `
+(function () {
+ try {
+ var get = function (name) {
+ var m = document.cookie.match(new RegExp("(?:^|;\\s*)" + name + "=([^;]*)"));
+ return m ? decodeURIComponent(m[1]) : null;
+ };
+ var pref = get("openvid_theme_pref") || get("openvid_theme") || "system";
+ var dark = pref === "system"
+ ? window.matchMedia("(prefers-color-scheme: dark)").matches
+ : pref === "dark";
+ document.documentElement.classList.toggle("dark", dark);
+ } catch (e) {}
+})();
+`;
+
const inter = Inter({
subsets: ["latin"],
variable: "--font-inter",
@@ -166,6 +188,9 @@ export default async function LocaleLayout({
return (
<html lang={locale || defaultLocale} suppressHydrationWarning>
+ <head>
+ <script dangerouslySetInnerHTML={{ __html: THEME_INLINE_SCRIPT }} />
+ </head>
<body
className={`${inter.variable} ${roboto.variable} ${inter.className} antialiased`}
>
diff --git a/app/components/common/UserMenuDropdown.tsx b/app/components/common/UserMenuDropdown.tsx
index 85d1c3e..936a10c 100644
--- a/app/components/common/UserMenuDropdown.tsx
+++ b/app/components/common/UserMenuDropdown.tsx
@@ -14,6 +14,7 @@ const THEMES: Theme[] = ["light", "dark", "system"];
const DARK_MQ = "(prefers-color-scheme: dark)";
const EDITOR_ROOT_ID = "editor-root";
const THEME_COOKIE = "openvid_theme";
+const THEME_PREF_COOKIE = "openvid_theme_pref";
const THEME_COOKIE_MAX_AGE = 60 * 60 * 24 * 365;
const THEME_ICONS: Record<Theme, string> = {
@@ -40,11 +41,14 @@ function applyThemeClass(theme: Theme, isEditorPage: boolean) {
document.getElementById(EDITOR_ROOT_ID)?.classList.toggle("dark", dark);
}
-// Persiste el tema *efectivo* resuelto (nunca "system") para que el layout del
-// editor pueda renderizarlo en SSR y eliminar el flash de tema.
+// Persiste el tema *efectivo* resuelto (nunca "system") para que el script inline
+// del root layout pueda aplicarlo en SSR antes del primer paint (sin flash de tema).
+// Además guarda la preferencia cruda para que el script pueda resolver "system"
+// contra prefers-color-scheme cuando la cookie efectiva quedó desactualizada.
function writeThemeCookie(theme: Theme) {
const dark = isDarkResolved(theme);
document.cookie = `${THEME_COOKIE}=${dark ? "dark" : "light"}; path=/; max-age=${THEME_COOKIE_MAX_AGE}; samesite=lax`;
+ document.cookie = `${THEME_PREF_COOKIE}=${theme}; path=/; max-age=${THEME_COOKIE_MAX_AGE}; samesite=lax`;
}
interface UserMenuDropdownProps {
@@ -181,7 +185,7 @@ export function UserMenuDropdown({
<Icon icon={THEME_ICONS[value]} className="size-4" aria-hidden="true" />
<span className="flex-1">{themeLabels[value]}</span>
<DropdownMenu.ItemIndicator>
- <Icon icon="lucide:check" className="size-4 text-blue-400" aria-hidden="true" />
+ <Icon icon="lucide:check" className="size-4 text-blue-600 dark:text-blue-400" aria-hidden="true" />
</DropdownMenu.ItemIndicator>
</DropdownMenu.RadioItem>
))}
diff --git a/app/components/ui/PhotoPickerPopover.tsx b/app/components/ui/PhotoPickerPopover.tsx
index d04ca4d..6e545c6 100644
--- a/app/components/ui/PhotoPickerPopover.tsx
+++ b/app/components/ui/PhotoPickerPopover.tsx
@@ -230,7 +230,7 @@ export function PhotoPickerPopover({ onSelect }: PhotoPickerPopoverProps) {
<TooltipAction label={t("tooltip")}>
<PopoverTrigger asChild>
<button
- className="aspect-square bg-[#F3F4F6] border border-white/30 squircle-element flex items-center justify-center transition-all active:scale-90 group disabled:opacity-50 hover:opacity-80"
+ className="aspect-square bg-[#F3F4F6] border squircle-element flex items-center justify-center transition-all active:scale-90 group disabled:opacity-50 hover:opacity-80"
aria-label={t("tooltip")}
>
<Icon
diff --git a/app/components/ui/WallpaperSections.tsx b/app/components/ui/WallpaperSections.tsx
index 37dc262..cd1344a 100644
--- a/app/components/ui/WallpaperSections.tsx
+++ b/app/components/ui/WallpaperSections.tsx
@@ -48,7 +48,7 @@ function CustomImagePickerButton({ onSelect }: { onSelect?: (url: string) => voi
<TooltipAction label={t("options.upload")}>
<button
onClick={() => inputRef.current?.click()}
- className="aspect-square bg-[#F3F4F6] border border-white/30 squircle-element flex items-center justify-center transition-all active:scale-90 group disabled:opacity-50 hover:opacity-80"
+ className="aspect-square bg-[#F3F4F6] border squircle-element flex items-center justify-center transition-all active:scale-90 group disabled:opacity-50 hover:opacity-80"
aria-label={t("options.upload")}
>
<Icon icon="material-symbols:upload-rounded" width="24" className="text-black transition-colors" aria-hidden="true" />
@@ -65,7 +65,7 @@ export function OptionsGrid({ selectedIndex = -1, onSelect, onUnsplashSelect, on
<TooltipAction label={t("options.none")}>
<button
onClick={() => onSelect?.(-1)}
- className={`aspect-square squircle-element cursor-pointer transition-all flex items-center justify-center relative overflow-hidden ${selectedIndex === -1
+ className={`aspect-square squircle-element cursor-pointer transition-all flex items-center justify-center relative overflow-hidden border ${selectedIndex === -1
? "ring-2 ring-foreground/80 shadow-lg shadow-black/40"
: "hover:ring-2 ring-foreground/60"
}`}
diff --git a/app/components/ui/editor/AudioTrimModal.tsx b/app/components/ui/editor/AudioTrimModal.tsx
index d690274..4bfddac 100644
--- a/app/components/ui/editor/AudioTrimModal.tsx
+++ b/app/components/ui/editor/AudioTrimModal.tsx
@@ -278,7 +278,7 @@ export function AudioTrimModal({
<div className="flex items-start justify-between mb-6">
<div className="flex items-center gap-3">
<div className="p-2 bg-blue-500/10 border border-blue-500/20 squircle-element-camera">
- <Icon icon="mdi:content-cut" className="text-blue-400" width="24" aria-hidden="true" />
+ <Icon icon="mdi:content-cut" className="text-blue-600 dark:text-blue-400" width="24" aria-hidden="true" />
</div>
<div>
<h2 id="audio-trim-title" className="text-xl font-bold text-foreground">
diff --git a/app/components/ui/editor/ControlPanel.tsx b/app/components/ui/editor/ControlPanel.tsx
index 2a47e56..9397b4d 100644
--- a/app/components/ui/editor/ControlPanel.tsx
+++ b/app/components/ui/editor/ControlPanel.tsx
@@ -7,7 +7,7 @@ import { TabButton } from "../../../../components/ui/TabButton";
import type { ControlPanelProps } from "@/types/control-panel.types";
import Link from "next/link";
import Image from "next/image";
-import { lazy, Suspense, useState } from "react";
+import { lazy, Suspense, useEffect, useState } from "react";
import { useTranslations } from "next-intl";
import { ElementsMenuSkeleton, ZoomGlobalConfigSkeleton, MockupMenuSkeleton, WallpaperSkeleton, BackgroundColorSkeleton, ZoomFragmentEditorSkeleton, AudioMenuSkeleton, VideosMenuSkeleton, HistoryMenuSkeleton, MotionGlobalConfigSkeleton, MotionFragmentEditorSkeleton } from "../Skeleton";
@@ -133,11 +133,27 @@ export function ControlPanel({
const [isGlobalMotionEnabled, setIsGlobalMotionEnabled] = useState(true);
const hasMockup2D = mediaType === "video" && !imagePhoneActive;
+ const [isDark, setIsDark] = useState(
+ () => typeof window !== "undefined" && document.documentElement.classList.contains("dark")
+ );
+
+ useEffect(() => {
+ const html = document.documentElement;
+ const update = () => setIsDark(html.classList.contains("dark"));
+ update();
+ const observer = new MutationObserver(update);
+ observer.observe(html, { attributes: true, attributeFilter: ["class"] });
+ return () => observer.disconnect();
+ }, []);
+
return (
<div className="relative w-full sm:w-[320px] h-screen bg-background flex flex-col shrink-0" role="complementary" aria-label="Control panel">
<header className="relative flex items-center justify-between h-13 p-2 border-r shrink-0 bg-transparent isolation-isolate" role="banner">
<div
- className="absolute inset-0 z-0 bg-[url('/images/pages/header-gradient2.avif')] bg-cover bg-center bg-no-repeat pointer-events-none opacity-90"
+ className={`absolute inset-0 z-0 bg-cover bg-center bg-no-repeat pointer-events-none opacity-90 ${isDark
+ ? "bg-[url('/images/pages/header-gradient.avif')]"
+ : "bg-[url('/images/pages/header-gradient-light2.png')]"
+ }`}
style={{
maskImage: `
linear-gradient(to bottom, black 55%, transparent 99%),
@@ -160,7 +176,12 @@ export function ControlPanel({
className="relative flex items-center gap-2 group pl-2 z-10"
aria-label="Openvid home"
>
- <Image src="/svg/openvid-complete-static.svg" alt="Openvid" width={100} height={80} />
+ <Image
+ src={isDark ? "/svg/openvid-complete-static.svg" : "/svg/openvid-complete-light.svg"}
+ alt="Openvid"
+ width={100}
+ height={80}
+ />
</Link>
<TooltipAction label={t("header.close")} side="right">
diff --git a/app/components/ui/editor/ImageMaskEditor.tsx b/app/components/ui/editor/ImageMaskEditor.tsx
index 0ae76c7..832ea72 100644
--- a/app/components/ui/editor/ImageMaskEditor.tsx
+++ b/app/components/ui/editor/ImageMaskEditor.tsx
@@ -85,7 +85,7 @@ export function ImageMaskEditor({
<Button
variant="outline"
className={`gap-2 text-xs transition-all duration-200 ${maskConfig.enabled
- ? "bg-gradient-radial-primary text-cyan-500 border border-cyan-500/50!"
+ ? "bg-gradient-radial-primary text-cyan-600 dark:text-cyan-500 border border-cyan-600/50! dark:border-cyan-500/50!"
: ""
}`}
size="sm"
@@ -102,7 +102,7 @@ export function ImageMaskEditor({
<PopoverHeader className="px-4 py-3 border-b border-border bg-muted/40">
<div className="flex items-center justify-between">
<PopoverTitle className="text-xs font-semibold text-popover-foreground/90 tracking-wide uppercase flex items-center gap-2">
- <Icon icon="material-symbols:gradient-outline" width="14" className="text-blue-400" aria-hidden="true" />
+ <Icon icon="material-symbols:gradient-outline" width="14" className="text-blue-600 dark:text-blue-400" aria-hidden="true" />
{t("title")}
</PopoverTitle>
</div>
@@ -161,7 +161,7 @@ export function ImageMaskEditor({
<Icon
icon={preset.icon}
width="28"
- className={`transition-colors ${active ? "text-blue-400" : "text-white/40 group-hover:text-blue-400"}`}
+ className={`transition-colors ${active ? "text-blue-400" : "text-white/70 group-hover:text-blue-400"}`}
/>
</div>
)}
diff --git a/app/components/ui/editor/LayersPanel.tsx b/app/components/ui/editor/LayersPanel.tsx
index 3184fdf..21b493d 100644
--- a/app/components/ui/editor/LayersPanel.tsx
+++ b/app/components/ui/editor/LayersPanel.tsx
@@ -675,8 +675,8 @@ export function LayersPanelInner({
className="flex flex-col bg-card border-l border-border select-none h-full"
style={{ width: toolbar ? "auto" : "210px", minWidth: "210px" }}
>
- {toolbar && <div className="shrink-0 border-b border-border">{toolbar}</div>}
- <div className="flex items-center justify-between px-3 py-2 border-b border-border shrink-0">
+ {toolbar && <div className="shrink-0">{toolbar}</div>}
+ <div className="flex items-center justify-between px-3 py-2 border-b shrink-0">
<span className="text-[11px] font-semibold text-foreground/80 tracking-wide uppercase">
{t("layerPanel.layers")}
</span>
diff --git a/app/components/ui/editor/Mockup2dMenu.tsx b/app/components/ui/editor/Mockup2dMenu.tsx
index 0fc3ab1..4dda22d 100644
--- a/app/components/ui/editor/Mockup2dMenu.tsx
+++ b/app/components/ui/editor/Mockup2dMenu.tsx
@@ -101,7 +101,7 @@ export function Mockup2dMenu({
<button
onClick={() => handleDarkModeChange(true)}
className={`flex items-center gap-1 px-2 py-1 rounded-md text-[11px] transition-colors ${mockupConfig?.darkMode
- ? "bg-muted border border-border text-muted-foreground"
+ ? "bg-background text-foreground shadow-xs"
: "text-muted-foreground/40 hover:text-muted-foreground"
}`}
aria-pressed={mockupConfig?.darkMode}
@@ -113,7 +113,7 @@ export function Mockup2dMenu({
<button
onClick={() => handleDarkModeChange(false)}
className={`flex items-center gap-1 px-2 py-1 rounded-md text-[11px] transition-colors ${!mockupConfig?.darkMode
- ? "bg-muted border border-border text-muted-foreground"
+ ? "bg-background text-foreground shadow-xs"
: "text-muted-foreground/40 hover:text-muted-foreground"
}`}
aria-pressed={!mockupConfig?.darkMode}
diff --git a/app/components/ui/editor/PlayerControls.tsx b/app/components/ui/editor/PlayerControls.tsx
index 6e980a0..382cc02 100644
--- a/app/components/ui/editor/PlayerControls.tsx
+++ b/app/components/ui/editor/PlayerControls.tsx
@@ -115,7 +115,7 @@ export function PlayerControls({
<button
onClick={() => onSplitClip?.()}
disabled={!canSplitClip}
- className="text-muted-foreground hover:text-foreground active:scale-95 transition-all p-1 flex items-center justify-center disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:text-muted-foreground disabled:active:scale-100"
+ className="text-muted-foreground/70 hover:text-foreground active:scale-95 transition-all p-1 flex items-center justify-center disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:text-muted-foreground/70 disabled:active:scale-100"
aria-label={t("split.clip")}
>
<Icon icon="mingcute:scissors-fill" width="15" aria-hidden="true" />
@@ -129,7 +129,7 @@ export function PlayerControls({
<button
onClick={handleZoomOut}
disabled={zoomLevel <= MIN_ZOOM}
- className="text-muted-foreground hover:text-foreground transition-colors disabled:opacity-50 disabled:cursor-not-allowed"
+ className="text-muted-foreground/70 hover:text-foreground transition-colors disabled:opacity-50 disabled:cursor-not-allowed"
aria-label={t("zoom.out")}
>
<Icon icon="mdi:magnify-minus-outline" width="16" aria-hidden="true" />
@@ -164,14 +164,14 @@ export function PlayerControls({
<button
onClick={handleZoomIn}
disabled={zoomLevel >= MAX_ZOOM}
- className="text-muted-foreground hover:text-foreground transition-colors disabled:opacity-50 disabled:cursor-not-allowed"
+ className="text-muted-foreground/70 hover:text-foreground transition-colors disabled:opacity-50 disabled:cursor-not-allowed"
aria-label={t("zoom.in")}
>
<Icon icon="mdi:magnify-plus-outline" width="16" aria-hidden="true" />
</button>
</TooltipAction>
- <span className="text-[11px] font-mono text-muted-foreground min-w-5" aria-live="polite" aria-atomic="true">
+ <span className="text-[11px] font-mono text-muted-foreground/70 min-w-5" aria-live="polite" aria-atomic="true">
{Math.round(zoomLevel)}×
</span>
</div>
@@ -180,7 +180,7 @@ export function PlayerControls({
<TooltipAction label={fullscreenLabel}>
<button
onClick={onToggleFullscreen}
- className="text-muted-foreground hover:text-foreground transition-colors"
+ className="text-muted-foreground/70 hover:text-foreground transition-colors"
aria-label={fullscreenLabel}
aria-pressed={isFullscreen}
>
@@ -191,7 +191,7 @@ export function PlayerControls({
<div className="flex items-center gap-4" role="group" aria-label={t("transport.group")}>
<span
- className="text-[11px] font-mono text-muted-foreground"
+ className="text-[11px] font-mono text-muted-foreground/70"
aria-label={t("transport.currentTime", { time: formatTime(currentTime) })}
>
{formatTime(currentTime)}
@@ -200,7 +200,7 @@ export function PlayerControls({
<div className="flex items-center gap-2.5">
<TooltipAction label={t("transport.backward")}>
<button
- className="text-muted-foreground hover:text-foreground transition-colors"
+ className="text-muted-foreground/70 hover:text-foreground transition-colors"
onClick={onSkipBackward}
aria-label={t("transport.backward")}
>
@@ -221,7 +221,7 @@ export function PlayerControls({
<TooltipAction label={t("transport.forward")}>
<button
- className="text-muted-foreground hover:text-foreground transition-colors"
+ className="text-muted-foreground/70 hover:text-foreground transition-colors"
onClick={onSkipForward}
aria-label={t("transport.forward")}
>
@@ -231,7 +231,7 @@ export function PlayerControls({
</div>
<span
- className="text-[11px] font-mono text-muted-foreground"
+ className="text-[11px] font-mono text-muted-foreground/70"
aria-label={t("transport.totalTime", { time: formatTime(videoDuration) })}
>
{formatTime(videoDuration)}
diff --git a/app/components/ui/editor/Timeline.tsx b/app/components/ui/editor/Timeline.tsx
index 849a3ba..8a02bce 100644
--- a/app/components/ui/editor/Timeline.tsx
+++ b/app/components/ui/editor/Timeline.tsx
@@ -499,7 +499,7 @@ export function Timeline({
{validDuration > 0 && timeMarkers.map((marker, i) => (
<span
key={i}
- className="absolute top-1 select-none text-[11px] leading-none text-muted-foreground font-mono"
+ className="absolute top-1 select-none text-[11px] leading-none text-muted-foreground/70 font-mono"
style={{
left: marker.position,
transform: i === 0 ? 'translateX(0)' : i === timeMarkers.length - 1 ? 'translateX(-100%)' : 'translateX(-50%)',
diff --git a/app/components/ui/editor/ToolsSidebar.tsx b/app/components/ui/editor/ToolsSidebar.tsx
index ef4fccb..244bbd2 100644
--- a/app/components/ui/editor/ToolsSidebar.tsx
+++ b/app/components/ui/editor/ToolsSidebar.tsx
@@ -222,7 +222,7 @@ export function ToolsSidebar({
return (
<div ref={sidebarWrapperRef} className="relative shrink-0 bg-background" style={{ width: '90px' }} role="complementary" aria-label={t("tools.toolbar")}>
<aside
- className="absolute top-1/2 left-12 -translate-x-1/2 -translate-y-1/2 flex flex-col items-center justify-center gap-4 squircle-element-xl border shadow-md shadow-black/10 border-border dark:border-white/10 dark:shadow-white/20 z-40 bg-[radial-gradient(circle_at_50%_30%,#ffffff_0%,#ececec_64%)] dark:bg-[radial-gradient(circle_at_50%_30%,#2a2a2a_0%,#131313_64%)]"
+ className="absolute top-1/2 left-12 -translate-x-1/2 -translate-y-1/2 flex flex-col items-center justify-center gap-4 squircle-element-xl border border-border dark:border-white/10 z-40 bg-[radial-gradient(circle_at_50%_30%,#ffffff_0%,#ececec_64%)] dark:bg-[radial-gradient(circle_at_50%_30%,#2a2a2a_0%,#131313_64%)] shadow-[2px_5px_10px_0px_rgba(0,0,0,0.12)] dark:shadow-[2px_5px_10px_0px_rgba(255,255,255,0.22)]"
style={{
height: sidebarHeight ? `${sidebarHeight}px` : 'calc(100% - 1rem)',
maxHeight: sidebarHeight ? `${sidebarHeight}px` : '800px',
@@ -232,6 +232,7 @@ export function ToolsSidebar({
aria-orientation="vertical"
aria-label={t("tools.toolbar")}
>
+
<div className="flex flex-col gap-4 w-full overflow-y-auto px-2 custom-scrollbar mask-y-from-85% mask-y-to-99%">
<div className="shrink-0 h-12" aria-hidden="true" />
<SidebarTool
diff --git a/app/components/ui/editor/ZoomFragmentEditor.tsx b/app/components/ui/editor/ZoomFragmentEditor.tsx
index ef8616b..99cfed0 100644
--- a/app/components/ui/editor/ZoomFragmentEditor.tsx
+++ b/app/components/ui/editor/ZoomFragmentEditor.tsx
@@ -111,13 +111,13 @@ export function ZoomFragmentEditor({
<div className="ml-auto flex gap-1">
<button
onClick={() => setEditingPoint('start')}
- className={`px-2 py-0.5 rounded text-[11px] font-mono transition-colors ${editingPoint === 'start' ? 'bg-blue-500/30 text-blue-300 border border-blue-500/50' : 'bg-muted/60 text-muted-foreground/80 hover:bg-muted'}`}
+ className={`px-2 py-0.5 rounded text-[11px] font-mono transition-colors ${editingPoint === 'start' ? 'bg-blue-500/30 text-blue-600 dark:text-blue-300 border border-blue-500/50' : 'bg-muted/60 text-muted-foreground/80 hover:bg-muted'}`}
>
{t("focusPoints.start")}
</button>
<button
onClick={() => setEditingPoint('end')}
- className={`px-2 py-0.5 rounded text-[11px] font-mono transition-colors ${editingPoint === 'end' ? 'bg-emerald-500/30 text-emerald-300 border border-emerald-500/50' : 'bg-muted/60 text-muted-foreground/80 hover:bg-muted'}`}
+ className={`px-2 py-0.5 rounded text-[11px] font-mono transition-colors ${editingPoint === 'end' ? 'bg-emerald-500/30 text-emerald-600 dark:text-emerald-300 border border-emerald-500/50' : 'bg-muted/60 text-muted-foreground/80 hover:bg-muted'}`}
>
{t("focusPoints.end")}
</button>
@@ -255,7 +255,7 @@ export function ZoomFragmentEditor({
<span>{t("movement.timeline.title")}</span>
</div>
<div className="flex items-center gap-2">
- <span className="text-[11px] font-mono text-emerald-400/80 bg-emerald-500/5 px-1.5 py-0.5 rounded border border-emerald-500/10">
+ <span className="text-[11px] font-mono text-emerald-600 dark:text-emerald-400/80 bg-emerald-500/5 px-1.5 py-0.5 rounded border border-emerald-500/10">
{t("movement.timeline.active", { seconds: (endOffset - startOffset).toFixed(1) })}
</span>
</div>
diff --git a/app/components/ui/home/Hero.tsx b/app/components/ui/home/Hero.tsx
index e2c3b8b..f374987 100644
--- a/app/components/ui/home/Hero.tsx
+++ b/app/components/ui/home/Hero.tsx
@@ -149,7 +149,7 @@ export default function Hero({ onVideoUpload, onPhotoUpload }: HeroProps) {
className={`relative flex items-center justify-center px-5 squircle-element border-2 border-dashed cursor-pointer transition-all duration-200 text-sm font-medium w-full h-13 ${isDraggingVideo
? "border-blue-400/70 bg-blue-500/10 text-blue-300 scale-[1.02]"
: isUploadingVideo
- ? "border-white/20 bg-white/5 text-white/40 cursor-not-allowed"
+ ? "border-white/20 bg-white/5 text-white/70 cursor-not-allowed"
: "border-white/20 bg-white/5 text-white/90 hover:border-white/40 hover:bg-white/10 hover:text-white/80"
}`}
>
@@ -169,7 +169,7 @@ export default function Hero({ onVideoUpload, onPhotoUpload }: HeroProps) {
<Icon icon="mage:video-upload" width="22" className="shrink-0" aria-hidden="true" />
<div className="flex items-center gap-2">
<span>{t("uploadButton")}</span>
- <span className="text-white/40 text-xs font-mono select-none">MP4, WebM, MOV</span>
+ <span className="text-white/70 text-xs font-mono select-none">MP4, WebM, MOV</span>
</div>
</>
)}
@@ -201,7 +201,7 @@ export default function Hero({ onVideoUpload, onPhotoUpload }: HeroProps) {
className={`relative flex items-center justify-center px-5 squircle-element border-2 border-dashed cursor-pointer transition-all duration-200 text-sm font-medium w-full h-13 ${isDraggingPhoto
? "border-red-400/70 bg-red-500/10 text-red-300 scale-[1.02]"
: isUploadingPhoto
- ? "border-white/20 bg-white/5 text-white/40 cursor-not-allowed"
+ ? "border-white/20 bg-white/5 text-white/70 cursor-not-allowed"
: "border-white/20 bg-white/5 text-white/90 hover:border-white/40 hover:bg-white/10 hover:text-white/80"
}`}
>
@@ -221,7 +221,7 @@ export default function Hero({ onVideoUpload, onPhotoUpload }: HeroProps) {
<Icon icon="solar:gallery-wide-linear" width="20" className="shrink-0" aria-hidden="true" />
<div className="flex items-center gap-2">
<span>{t("uploadPhotoButton")}</span>
- <span className="text-white/40 text-xs font-mono select-none">JPG, PNG, WEBP</span>
+ <span className="text-white/70 text-xs font-mono select-none">JPG, PNG, WEBP</span>
</div>
</>
)}
diff --git a/app/globals.css b/app/globals.css
index 3926660..2de09fd 100644
--- a/app/globals.css
+++ b/app/globals.css
@@ -84,7 +84,7 @@
--sidebar-border: oklch(0.922 0 0);
--sidebar-ring: oklch(0.708 0 0);
--gradient-primary: linear-gradient(90deg, #00A3EE, #00A3FF, #003780);
- --gradient-radial-primary: radial-gradient(circle, #002940, #00131E, #000910);
+ --gradient-radial-primary: radial-gradient(circle, #EAF4FF, #D5E8FB, #BEDAF6);
}
.dark {
@@ -99,7 +99,7 @@
--secondary: oklch(0.269 0 0);
--secondary-foreground: oklch(0.985 0 0);
--muted: oklch(0.269 0 0);
- --muted-foreground: oklch(0.708 0 0);
+ --muted-foreground: oklch(1 0 0 / 0.7);
--accent: oklch(0.269 0 0);
--accent-foreground: oklch(0.985 0 0);
--destructive: oklch(0.704 0.191 22.216);
@@ -121,6 +121,7 @@
--sidebar-accent-foreground: oklch(0.985 0 0);
--sidebar-border: oklch(1 0 0 / 10%);
--sidebar-ring: oklch(0.556 0 0);
+ --gradient-radial-primary: radial-gradient(circle, #002940, #00131E, #000910);
}
@layer base {
diff --git a/components/ui/Position3DPresetsEditor.tsx b/components/ui/Position3DPresetsEditor.tsx
index 9b4689a..83eff03 100644
--- a/components/ui/Position3DPresetsEditor.tsx
+++ b/components/ui/Position3DPresetsEditor.tsx
@@ -80,7 +80,7 @@ export function Position3DPresetsEditor({
<PopoverHeader className="px-4 py-3 border-b border-border bg-muted/40">
<div className="flex items-center justify-between">
<PopoverTitle className="text-xs font-semibold text-popover-foreground/80 tracking-wide uppercase flex items-center gap-2">
- <Icon icon="mdi:image-multiple-outline" width="14" className="text-blue-400" aria-hidden="true" />
+ <Icon icon="mdi:image-multiple-outline" width="14" className="text-blue-600 dark:text-blue-400" aria-hidden="true" />
{t("title")}
</PopoverTitle>
</div>
@@ -90,7 +90,7 @@ export function Position3DPresetsEditor({
<button
onClick={() => setActiveTab("presets")}
className={`flex-1 px-4 py-2.5 text-xs font-medium transition-all ${activeTab === "presets"
- ? "text-blue-400 border-b-2 border-blue-400 bg-blue-500/5"
+ ? "text-blue-600 dark:text-blue-400 border-b-2 border-blue-500 bg-blue-500/5"
: "text-muted-foreground hover:text-popover-foreground/80 hover:bg-muted"
}`}
>
@@ -100,7 +100,7 @@ export function Position3DPresetsEditor({
<button
onClick={() => setActiveTab("custom")}
className={`flex-1 px-4 py-2.5 text-xs font-medium transition-all ${activeTab === "custom"
- ? "text-blue-400 border-b-2 border-blue-400 bg-blue-500/5"
+ ? "text-blue-600 dark:text-blue-400 border-b-2 border-blue-500 bg-blue-500/5"
: "text-muted-foreground hover:text-popover-foreground/80 hover:bg-muted"
}`}
>
@@ -118,14 +118,14 @@ export function Position3DPresetsEditor({
className="group relative flex flex-col squircle-element border border-dashed border-border hover:border-foreground/40 bg-muted/40 hover:bg-muted/60 transition-all overflow-hidden"
>
<div className="relative w-full aspect-video bg-zinc-900 flex flex-col items-center justify-center gap-1.5">
- <div className="size-8 rounded-full bg-muted/60 border border-border flex items-center justify-center">
+ <div className="size-8 rounded-full bg-white/10 border border-white/10 flex items-center justify-center">
<Icon
icon="mdi:restore"
width="16"
- className="text-popover-foreground/70 group-hover:text-blue-400 transition-colors"
+ className="text-white/70 group-hover:text-blue-400 transition-colors"
/>
</div>
- <span className="text-[11px] font-semibold text-muted-foreground group-hover:text-popover-foreground/80 transition-colors">
+ <span className="text-[11px] font-semibold text-white/80 group-hover:text-white transition-colors">
{t("resetDefault")}
</span>
</div>