working video

This commit is contained in:
2026-03-12 16:33:57 -05:00
parent 75723ed133
commit 1e5f80739c
7 changed files with 183 additions and 7 deletions
+10 -1
View File
@@ -7,7 +7,7 @@ import {
Bold, Italic, Underline,
Grid3X3, Highlighter,
AlignLeft, AlignCenter, AlignRight,
Trash2, AppWindow
Trash2, AppWindow, Film
} from "lucide-solid";
import { cn } from "@/lib/utils";
@@ -123,6 +123,15 @@ export const getSuggestionItems = ({ query }: { query: string }): CommandItem[]
editor.chain().focus().deleteRange(range).uploadImage().run();
},
},
{
title: "Video",
description: "Upload a video.",
aliases: ["movie", "mp4", "mov"],
icon: Film,
command: ({ editor, range }: { editor: any, range: any }) => {
editor.chain().focus().deleteRange(range).uploadVideo().run();
},
},
{
title: "Job File",
description: "Embed a job file from Prism.",
+19 -1
View File
@@ -3,7 +3,7 @@ import { Sheet, SheetContent } from "@/components/ui/sheet";
import { type Task, removeTask, restoreTask, updateTask, saveTaskAsTemplate, shareTask, revokeShare, splitTask, loadTaskContent, currentTaskContext, cleanupTaskAttachments, getFavoriteTag } from "@/store";
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover";
import { ArrowUpCircle, Clock, Calendar, Type, Trash2, X, Copy, MoreHorizontal, Gauge, Share2, UserMinus, GitBranch, Tag, Settings, Star, Image as ImageIcon } from "lucide-solid";
import { ArrowUpCircle, Clock, Calendar, Type, Trash2, X, Copy, MoreHorizontal, Gauge, Share2, UserMinus, GitBranch, Tag, Settings, Star, Image as ImageIcon, Film } from "lucide-solid";
import { StatusCircle } from "./StatusCircle";
import { calculateDateFromUrgency, calculateUrgencyFromDate } from "@/store";
import { Button } from "./ui/button";
@@ -416,6 +416,24 @@ export const TaskDetail: Component<TaskDetailProps> = (props) => {
<span class="hidden sm:inline">Image</span>
</Button>
</div>
{/* Video Upload Shortcut */}
<div class="flex items-center gap-1 shrink-0">
<Button
variant="ghost"
size="sm"
class="h-8 px-1 sm:px-2 text-[0.625rem] font-bold uppercase tracking-wider hover:bg-muted/50 flex items-center gap-1 sm:gap-1.5 text-muted-foreground hover:text-foreground transition-colors"
onClick={() => {
const instance = editorInstance();
if (instance) {
instance.chain().focus().uploadVideo().run();
}
}}
>
<Film size={14} class="opacity-70" />
<span class="hidden sm:inline">Video</span>
</Button>
</div>
</div>
{/* Metadata Row (Dates/Timestamps) */}
+4
View File
@@ -28,6 +28,8 @@ import { Mention } from "@tiptap/extension-mention";
import { userSuggestion, noteSuggestion } from "@/lib/mention-suggestion";
import { FileViewer } from "@/lib/extensions/file-viewer";
import { ImageUpload } from "@/lib/extensions/image-upload";
import { Video } from "@/lib/extensions/video";
import { VideoUpload } from "@/lib/extensions/video-upload";
interface TaskEditorProps {
content?: string;
@@ -163,6 +165,8 @@ export const TaskEditor: Component<TaskEditorProps> = (props) => {
}),
FileViewer,
ImageUpload,
Video,
VideoUpload,
],
// Use untrack so the editor doesn't re-initialize when props.content changes
content: untrack(() => props.content) || "",