This commit is contained in:
ct
2025-06-20 13:03:52 +08:00
parent eef45fdc9d
commit b502120091
22 changed files with 426 additions and 164 deletions

View File

@@ -4,7 +4,7 @@ import { Button } from '@/components/ui/button';
import { cn } from '@/lib/utils';
import { useMitt } from '@/plugins/MittContext';
import useVideoEditorStore from '@/stores/VideoEditorStore';
import { Download, Edit3, Play, Square, Type } from 'lucide-react';
import { Download, Edit3, Play, Square } from 'lucide-react';
const EditorControls = ({ className = '', onEditClick = () => {}, isEditActive = false }) => {
const { videoIsPlaying } = useVideoEditorStore();
@@ -40,9 +40,9 @@ const EditorControls = ({ className = '', onEditClick = () => {}, isEditActive =
<span className="text-sm font-medium ">9:16</span>
</Button> */}
<Button variant="outline" size="icon" className="h-12 w-12 rounded-full border shadow-sm">
{/* <Button variant="outline" size="icon" className="h-12 w-12 rounded-full border shadow-sm">
<Type className="h-8 w-8" />
</Button>
</Button> */}
<Button
id="edit"

View File

@@ -183,7 +183,7 @@ export default function TextSidebar({ isOpen, onClose }) {
return (
<Sheet open={isOpen} onOpenChange={(open) => !open && onClose()}>
<SheetContent side="right" className="max-[140px] w-full overflow-y-auto dark:bg-neutral-900">
<SheetContent side="right" className="max-w-[300px] overflow-y-auto dark:bg-neutral-900">
<SheetHeader>
<SheetTitle className="flex items-center gap-3">
<Type className="h-6 w-6" />
@@ -201,11 +201,12 @@ export default function TextSidebar({ isOpen, onClose }) {
value={textValue}
onChange={handleTextChange}
placeholder="Enter your text..."
className="mt-2 text-center text-nowrap dark:bg-neutral-800"
className="mx-auto mt-2 text-center text-wrap dark:bg-neutral-800"
rows={4}
style={{
maxWidth: 300,
fontFamily: fontFamily,
fontSize: `${fontSize * 0.45}px`, // Cap preview size for readability
fontSize: `${fontSize * 0.5}px`, // Cap preview size for readability
fontWeight: isBold ? 'bold' : 'normal',
fontStyle: isItalic ? 'italic' : 'normal',
color: fillColor,