From fca99d6126c31fbb18ed9f1034cee6f940b040e8 Mon Sep 17 00:00:00 2001 From: Maze Winther Date: Tue, 10 Feb 2026 16:28:21 +0100 Subject: refactor --- apps/web/src/components/editable-timecode.tsx | 4 +- apps/web/src/components/editor/editor-header.tsx | 127 ++- apps/web/src/components/editor/export-button.tsx | 51 +- .../editor/panels/assets/draggable-item.tsx | 4 +- .../src/components/editor/panels/assets/index.tsx | 2 +- .../src/components/editor/panels/assets/tabbar.tsx | 29 +- .../editor/panels/assets/views/captions.tsx | 9 +- .../editor/panels/assets/views/media.tsx | 6 +- .../editor/panels/assets/views/settings.tsx | 103 +-- .../editor/panels/assets/views/sounds.tsx | 4 +- .../editor/panels/assets/views/stickers.tsx | 2 +- .../components/editor/panels/assets/views/text.tsx | 2 +- .../components/editor/panels/panel-base-view.tsx | 4 +- .../src/components/editor/panels/preview/index.tsx | 141 +++- .../editor/panels/properties/empty-view.tsx | 20 + .../components/editor/panels/properties/index.tsx | 25 +- .../editor/panels/properties/property-item.tsx | 79 +- .../editor/panels/properties/text-properties.tsx | 905 ++++++++++++--------- .../editor/panels/timeline/audio-waveform.tsx | 176 ++++ .../editor/panels/timeline/bookmarks.tsx | 111 +++ .../editor/panels/timeline/drag-line.tsx | 28 + .../components/editor/panels/timeline/index.tsx | 535 ++++++++++++ .../editor/panels/timeline/snap-indicator.tsx | 52 ++ .../editor/panels/timeline/timeline-element.tsx | 566 +++++++++++++ .../editor/panels/timeline/timeline-playhead.tsx | 92 +++ .../editor/panels/timeline/timeline-ruler.tsx | 126 +++ .../editor/panels/timeline/timeline-tick.tsx | 39 + .../editor/panels/timeline/timeline-toolbar.tsx | 285 +++++++ .../editor/panels/timeline/timeline-track.tsx | 112 +++ .../components/editor/timeline/audio-waveform.tsx | 176 ---- .../src/components/editor/timeline/bookmarks.tsx | 111 --- .../src/components/editor/timeline/drag-line.tsx | 28 - apps/web/src/components/editor/timeline/index.tsx | 535 ------------ .../components/editor/timeline/snap-indicator.tsx | 52 -- .../editor/timeline/timeline-element.tsx | 554 ------------- .../editor/timeline/timeline-playhead.tsx | 92 --- .../components/editor/timeline/timeline-ruler.tsx | 108 --- .../components/editor/timeline/timeline-tick.tsx | 39 - .../editor/timeline/timeline-toolbar.tsx | 354 -------- .../components/editor/timeline/timeline-track.tsx | 117 --- apps/web/src/components/theme-toggle.tsx | 4 +- apps/web/src/components/ui/button.tsx | 7 +- apps/web/src/components/ui/color-picker.tsx | 19 +- apps/web/src/components/ui/command.tsx | 2 +- apps/web/src/components/ui/dropdown-menu.tsx | 2 +- apps/web/src/components/ui/font-picker.tsx | 6 +- apps/web/src/components/ui/input-with-back.tsx | 4 +- apps/web/src/components/ui/label.tsx | 2 +- apps/web/src/components/ui/popover.tsx | 1 - apps/web/src/components/ui/select.tsx | 6 +- apps/web/src/components/ui/slider.tsx | 2 +- apps/web/src/components/ui/split-button.tsx | 4 +- apps/web/src/components/ui/tabs.tsx | 2 +- 53 files changed, 3058 insertions(+), 2808 deletions(-) create mode 100644 apps/web/src/components/editor/panels/properties/empty-view.tsx create mode 100644 apps/web/src/components/editor/panels/timeline/audio-waveform.tsx create mode 100644 apps/web/src/components/editor/panels/timeline/bookmarks.tsx create mode 100644 apps/web/src/components/editor/panels/timeline/drag-line.tsx create mode 100644 apps/web/src/components/editor/panels/timeline/index.tsx create mode 100644 apps/web/src/components/editor/panels/timeline/snap-indicator.tsx create mode 100644 apps/web/src/components/editor/panels/timeline/timeline-element.tsx create mode 100644 apps/web/src/components/editor/panels/timeline/timeline-playhead.tsx create mode 100644 apps/web/src/components/editor/panels/timeline/timeline-ruler.tsx create mode 100644 apps/web/src/components/editor/panels/timeline/timeline-tick.tsx create mode 100644 apps/web/src/components/editor/panels/timeline/timeline-toolbar.tsx create mode 100644 apps/web/src/components/editor/panels/timeline/timeline-track.tsx delete mode 100644 apps/web/src/components/editor/timeline/audio-waveform.tsx delete mode 100644 apps/web/src/components/editor/timeline/bookmarks.tsx delete mode 100644 apps/web/src/components/editor/timeline/drag-line.tsx delete mode 100644 apps/web/src/components/editor/timeline/index.tsx delete mode 100644 apps/web/src/components/editor/timeline/snap-indicator.tsx delete mode 100644 apps/web/src/components/editor/timeline/timeline-element.tsx delete mode 100644 apps/web/src/components/editor/timeline/timeline-playhead.tsx delete mode 100644 apps/web/src/components/editor/timeline/timeline-ruler.tsx delete mode 100644 apps/web/src/components/editor/timeline/timeline-tick.tsx delete mode 100644 apps/web/src/components/editor/timeline/timeline-toolbar.tsx delete mode 100644 apps/web/src/components/editor/timeline/timeline-track.tsx (limited to 'apps/web/src/components') diff --git a/apps/web/src/components/editable-timecode.tsx b/apps/web/src/components/editable-timecode.tsx index d32f067a..61f23372 100644 --- a/apps/web/src/components/editable-timecode.tsx +++ b/apps/web/src/components/editable-timecode.tsx @@ -122,8 +122,8 @@ export function EditableTimecode({ onKeyDown={handleKeyDown} onBlur={handleBlur} className={cn( - "border-none bg-transparent font-mono text-xs outline-none", - "focus:bg-background focus:border-primary focus:rounded focus:border focus:px-1", + "-mx-1 border border-transparent bg-transparent px-1 font-mono text-xs outline-none", + "focus:bg-background focus:border-primary focus:rounded", "text-primary tabular-nums", hasError && "text-destructive focus:border-destructive", className, diff --git a/apps/web/src/components/editor/editor-header.tsx b/apps/web/src/components/editor/editor-header.tsx index d74d78d7..e70bda37 100644 --- a/apps/web/src/components/editor/editor-header.tsx +++ b/apps/web/src/components/editor/editor-header.tsx @@ -1,8 +1,7 @@ "use client"; import { Button } from "../ui/button"; -import { ChevronDown } from "lucide-react"; -import { useState } from "react"; +import { useRef, useState } from "react"; import { DropdownMenu, DropdownMenuContent, @@ -17,23 +16,21 @@ import { useRouter } from "next/navigation"; import { FaDiscord } from "react-icons/fa6"; import { ExportButton } from "./export-button"; import { ThemeToggle } from "../theme-toggle"; -import { SOCIAL_LINKS } from "@/constants/site-constants"; +import { DEFAULT_LOGO_URL, SOCIAL_LINKS } from "@/constants/site-constants"; import { toast } from "sonner"; import { useEditor } from "@/hooks/use-editor"; -import { - ArrowLeft02Icon, - Edit03Icon, - Delete02Icon, - CommandIcon, -} from "@hugeicons/core-free-icons"; +import { ArrowLeft02Icon, CommandIcon } from "@hugeicons/core-free-icons"; import { HugeiconsIcon } from "@hugeicons/react"; import { ShortcutsDialog } from "./dialogs/shortcuts-dialog"; +import Image from "next/image"; +import { cn } from "@/utils/ui"; export function EditorHeader() { return ( -
-
+
+
+