Skip to content

Commit fd0f7ff

Browse files
committed
Merge main into feat/native-video-thumbnails
Resolved conflicts in: - apps/web/src/components/editor-header.tsx: Added theme toggle functionality and imports - apps/web/src/components/editor/timeline/index.tsx: Preserved bookmark functionality - apps/web/src/components/editor/timeline/timeline-element.tsx: Kept improved aspect ratio handling for images
2 parents a0a8fdd + 68da487 commit fd0f7ff

21 files changed

+703
-467
lines changed

apps/web/src/app/editor/[project_id]/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,15 +167,15 @@ export default function Editor() {
167167
{/* Main content area */}
168168
<ResizablePanelGroup
169169
direction="horizontal"
170-
className="h-full w-full gap-[0.19rem] px-2"
170+
className="h-full w-full gap-[0.19rem] px-3"
171171
>
172172
{/* Tools Panel */}
173173
<ResizablePanel
174174
defaultSize={toolsPanel}
175175
minSize={15}
176176
maxSize={40}
177177
onResize={setToolsPanel}
178-
className="min-w-0"
178+
className="min-w-0 rounded-sm"
179179
>
180180
<MediaPanel />
181181
</ResizablePanel>
@@ -214,7 +214,7 @@ export default function Editor() {
214214
minSize={15}
215215
maxSize={70}
216216
onResize={setTimeline}
217-
className="min-h-0 px-2 pb-2"
217+
className="min-h-0 px-3 pb-3"
218218
>
219219
<Timeline />
220220
</ResizablePanel>

apps/web/src/app/globals.css

Lines changed: 51 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -9,38 +9,40 @@
99

1010
:root {
1111
/* Custom colors - light mode (default) */
12-
--background: hsl(0 0% 100%);
13-
--foreground: hsl(0 0% 3.9%);
14-
--card: hsl(0 0% 100%);
15-
--card-foreground: hsl(0 0% 3.9%);
16-
--popover: hsl(0 0% 100%);
17-
--popover-foreground: hsl(0 0% 3.9%);
18-
--primary: hsl(0 0% 9%);
19-
--primary-foreground: hsl(0 0% 98%);
20-
--secondary: hsl(0 0% 96.1%);
21-
--secondary-foreground: hsl(0 0% 9%);
22-
--muted: hsl(0 0% 96.1%);
23-
--muted-foreground: hsl(0 0% 45.1%);
24-
--accent: hsl(0 0% 96.1%);
25-
--accent-foreground: hsl(0 0% 9%);
26-
--destructive: hsl(0 84.2% 60.2%);
27-
--destructive-foreground: hsl(0 0% 98%);
28-
--border: hsl(0 0% 89.8%);
29-
--input: hsl(0 0% 89.8%);
30-
--ring: hsl(0 0% 3.9%);
31-
--chart-1: hsl(12 76% 61%);
32-
--chart-2: hsl(173 58% 39%);
33-
--chart-3: hsl(197 37% 24%);
34-
--chart-4: hsl(43 74% 66%);
35-
--chart-5: hsl(27 87% 67%);
36-
--sidebar-background: hsl(0 0% 100%);
37-
--sidebar-foreground: hsl(0 0% 3.9%);
38-
--sidebar-primary: hsl(0 0% 9%);
39-
--sidebar-primary-foreground: hsl(0 0% 98%);
40-
--sidebar-accent: hsl(0 0% 96.1%);
41-
--sidebar-accent-foreground: hsl(0 0% 9%);
42-
--sidebar-border: hsl(0 0% 89.8%);
43-
--sidebar-ring: hsl(0 0% 3.9%);
12+
--background: hsl(0, 0%, 100%);
13+
--foreground: hsl(0 0% 11%);
14+
--card: hsl(0 0% 85.1%);
15+
--card-foreground: hsl(0 0% 2%);
16+
--popover: hsl(0, 0%, 100%);
17+
--popover-foreground: hsl(0 0% 2%);
18+
--primary: hsl(205, 84%, 47%);
19+
--primary-foreground: hsl(0 0% 91%);
20+
--secondary: hsl(216, 13%, 92%);
21+
--secondary-foreground: hsl(0 0% 2%);
22+
--muted: hsl(0 0% 85.1%);
23+
--muted-foreground: hsl(0 0% 36.1%);
24+
--accent: hsl(216, 13%, 92%);
25+
--accent-foreground: hsl(0 0% 2%);
26+
--destructive: hsl(0 100% 40%);
27+
--destructive-foreground: hsl(0, 0%, 100%);
28+
--border: hsl(0 0% 83%);
29+
--input: hsl(0 0% 85.1%);
30+
--ring: hsl(0, 0%, 55%);
31+
--chart-1: hsl(220 70% 50%);
32+
--chart-2: hsl(160 60% 45%);
33+
--chart-3: hsl(30 80% 55%);
34+
--chart-4: hsl(280 65% 60%);
35+
--chart-5: hsl(340 75% 55%);
36+
--sidebar-background: hsl(0 0% 96.1%);
37+
--sidebar-foreground: hsl(0 0% 2%);
38+
--sidebar-primary: hsl(0 0% 2%);
39+
--sidebar-primary-foreground: hsl(0 0% 91%);
40+
--sidebar-accent: hsl(0 0% 85.1%);
41+
--sidebar-accent-foreground: hsl(0 0% 2%);
42+
--sidebar-border: hsl(0 0% 85.1%);
43+
--sidebar-ring: hsl(0 0% 16.9%);
44+
--panel-background: hsl(216 13% 92%);
45+
--panel-accent: hsl(216, 8%, 86%);
4446

4547
/* Radius base */
4648
--radius: 1rem;
@@ -224,3 +226,20 @@
224226
display: none;
225227
}
226228
}
229+
230+
@utility scrollbar-thin {
231+
&::-webkit-scrollbar {
232+
width: 8px;
233+
height: 8px;
234+
}
235+
&::-webkit-scrollbar-track {
236+
background: transparent;
237+
}
238+
&::-webkit-scrollbar-thumb {
239+
background: var(--border);
240+
border-radius: 4px;
241+
}
242+
&::-webkit-scrollbar-thumb:hover {
243+
background: var(--muted-foreground);
244+
}
245+
}

apps/web/src/app/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default function RootLayout({
3030
<BotIdClient protect={protectedRoutes} />
3131
</head>
3232
<body className={`${defaultFont.className} font-sans antialiased`}>
33-
<ThemeProvider attribute="class" forcedTheme="dark">
33+
<ThemeProvider attribute="class" defaultTheme="dark">
3434
<TooltipProvider>
3535
<StorageProvider>{children}</StorageProvider>
3636
<Analytics />

apps/web/src/components/editor-header.tsx

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
Download,
99
SquarePen,
1010
Trash,
11+
Sun,
1112
} from "lucide-react";
1213
import { useTimelineStore } from "@/stores/timeline-store";
1314
import { HeaderBase } from "./header-base";
@@ -27,13 +28,17 @@ import { RenameProjectDialog } from "./rename-project-dialog";
2728
import { DeleteProjectDialog } from "./delete-project-dialog";
2829
import { useRouter } from "next/navigation";
2930
import { FaDiscord } from "react-icons/fa6";
31+
import { useTheme } from "next-themes";
32+
import { usePlaybackStore } from "@/stores/playback-store";
3033

3134
export function EditorHeader() {
3235
const { getTotalDuration } = useTimelineStore();
36+
const { currentTime } = usePlaybackStore();
3337
const { activeProject, renameProject, deleteProject } = useProjectStore();
3438
const [isDeleteDialogOpen, setIsDeleteDialogOpen] = useState(false);
3539
const [isRenameDialogOpen, setIsRenameDialogOpen] = useState(false);
3640
const router = useRouter();
41+
const { theme, setTheme } = useTheme();
3742

3843
const handleExport = () => {
3944
// Export functionality to be implemented
@@ -114,7 +119,11 @@ export function EditorHeader() {
114119

115120
const centerContent = (
116121
<div className="flex items-center gap-2 text-xs">
117-
<span>
122+
<span className="text-foreground tabular-nums">
123+
{formatTimeCode(currentTime, "HH:MM:SS:FF", activeProject?.fps || 30)}
124+
</span>
125+
<span className="text-foreground/50">/</span>
126+
<span className="text-foreground/50 tabular-nums">
118127
{formatTimeCode(
119128
getTotalDuration(),
120129
"HH:MM:SS:FF",
@@ -133,11 +142,20 @@ export function EditorHeader() {
133142

134143
<Button
135144
size="sm"
136-
className="h-7 text-xs !bg-linear-to-r from-cyan-400 to-blue-500 text-white hover:opacity-85 transition-opacity"
145+
className="h-8 text-xs !bg-linear-to-r from-cyan-400 to-blue-500 text-white hover:opacity-85 transition-opacity"
137146
onClick={handleExport}
138147
>
139148
<Download className="h-4 w-4" />
140-
<span className="text-sm">Export</span>
149+
<span className="text-sm pr-1">Export</span>
150+
</Button>
151+
<Button
152+
size="icon"
153+
variant="text"
154+
className="h-7"
155+
onClick={() => setTheme(theme === "dark" ? "light" : "dark")}
156+
>
157+
<Sun className="!size-[1.1rem]" />
158+
<span className="sr-only">{theme === "dark" ? "Light" : "Dark"}</span>
141159
</Button>
142160
</nav>
143161
);
@@ -148,7 +166,7 @@ export function EditorHeader() {
148166
leftContent={leftContent}
149167
centerContent={centerContent}
150168
rightContent={rightContent}
151-
className="bg-background h-[3.2rem] px-4 items-center"
169+
className="bg-background h-[3.2rem] px-3 items-center mt-0.5"
152170
/>
153171

154172
{/* Dialogs */}

apps/web/src/components/editor/media-panel/index.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { MediaView } from "./views/media";
55
import { useMediaPanelStore, Tab } from "./store";
66
import { TextView } from "./views/text";
77
import { AudioView } from "./views/audio";
8+
import { Separator } from "@/components/ui/separator";
89

910
export function MediaPanel() {
1011
const { activeTab } = useMediaPanelStore();
@@ -46,9 +47,10 @@ export function MediaPanel() {
4647
};
4748

4849
return (
49-
<div className="h-full flex flex-col bg-panel rounded-sm">
50+
<div className="h-full flex bg-panel">
5051
<TabBar />
51-
<div className="flex-1 overflow-y-auto">{viewMap[activeTab]}</div>
52+
<Separator orientation="vertical" />
53+
<div className="flex-1 overflow-hidden">{viewMap[activeTab]}</div>
5254
</div>
5355
);
5456
}

apps/web/src/components/editor/media-panel/tabbar.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,15 @@ export function TabBar() {
6161
}, []);
6262

6363
return (
64-
<div className="flex">
64+
<div className="flex pt-4">
6565
<ScrollButton
6666
direction="left"
6767
onClick={scrollToStart}
6868
isVisible={!isAtStart}
6969
/>
7070
<div
7171
ref={scrollContainerRef}
72-
className="h-12 bg-panel-accent px-3 flex justify-start items-center gap-5 overflow-x-auto scrollbar-x-hidden relative w-full"
72+
className="h-full px-4 flex flex-col justify-start items-center gap-5 overflow-x-auto scrollbar-x-hidden relative w-full"
7373
>
7474
{(Object.keys(tabs) as Tab[]).map((tabKey) => {
7575
const tab = tabs[tabKey];
@@ -83,7 +83,6 @@ export function TabBar() {
8383
key={tabKey}
8484
>
8585
<tab.icon className="size-[1.1rem]!" />
86-
<span className="text-[0.65rem]">{tab.label}</span>
8786
</div>
8887
);
8988
})}

apps/web/src/components/editor/media-panel/views/audio.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export function AudioView() {
99
<div className="h-full flex flex-col gap-2 p-4">
1010
<Input
1111
placeholder="Search songs and artists"
12+
className="bg-panel-accent"
1213
value={search}
1314
onChange={(e) => setSearch(e.target.value)}
1415
/>

0 commit comments

Comments
 (0)