mirror of
https://github.com/OpenCut-app/OpenCut.git
synced 2026-07-13 21:52:53 +02:00
feat: basic audio view in media panel
This commit is contained in:
@@ -4,15 +4,14 @@ import { TabBar } from "./tabbar";
|
|||||||
import { MediaView } from "./views/media";
|
import { MediaView } from "./views/media";
|
||||||
import { useMediaPanelStore, Tab } from "./store";
|
import { useMediaPanelStore, Tab } from "./store";
|
||||||
import { TextView } from "./views/text";
|
import { TextView } from "./views/text";
|
||||||
|
import { AudioView } from "./views/audio";
|
||||||
|
|
||||||
export function MediaPanel() {
|
export function MediaPanel() {
|
||||||
const { activeTab } = useMediaPanelStore();
|
const { activeTab } = useMediaPanelStore();
|
||||||
|
|
||||||
const viewMap: Record<Tab, React.ReactNode> = {
|
const viewMap: Record<Tab, React.ReactNode> = {
|
||||||
media: <MediaView />,
|
media: <MediaView />,
|
||||||
audio: (
|
audio: <AudioView />,
|
||||||
<div className="p-4 text-muted-foreground">Audio view coming soon...</div>
|
|
||||||
),
|
|
||||||
text: <TextView />,
|
text: <TextView />,
|
||||||
stickers: (
|
stickers: (
|
||||||
<div className="p-4 text-muted-foreground">
|
<div className="p-4 text-muted-foreground">
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
"use client";
|
||||||
|
|
||||||
|
import { Input } from "@/components/ui/input";
|
||||||
|
import { useState } from "react";
|
||||||
|
|
||||||
|
export function AudioView() {
|
||||||
|
const [search, setSearch] = useState("");
|
||||||
|
return (
|
||||||
|
<div className="h-full flex flex-col gap-2 p-4">
|
||||||
|
<Input
|
||||||
|
placeholder="Search songs and artists"
|
||||||
|
value={search}
|
||||||
|
onChange={(e) => setSearch(e.target.value)}
|
||||||
|
/>
|
||||||
|
<div className="flex flex-col gap-2"></div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user