combined upload buttons
This commit is contained in:
@@ -80,7 +80,7 @@ export const getSuggestionItems = ({ query }: { query: string }): CommandItem[]
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Media / File",
|
title: "Upload",
|
||||||
description: "Upload an image, video, or document.",
|
description: "Upload an image, video, or document.",
|
||||||
aliases: ["image", "video", "file", "upload", "pdf", "movie"],
|
aliases: ["image", "video", "file", "upload", "pdf", "movie"],
|
||||||
icon: FileText,
|
icon: FileText,
|
||||||
|
|||||||
@@ -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, now } from "@/store";
|
import { type Task, removeTask, restoreTask, updateTask, saveTaskAsTemplate, shareTask, revokeShare, splitTask, loadTaskContent, currentTaskContext, cleanupTaskAttachments, getFavoriteTag, now } from "@/store";
|
||||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
|
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
|
||||||
import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover";
|
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, Film, FileText } from "lucide-solid";
|
import { ArrowUpCircle, Clock, Calendar, Type, Trash2, X, Copy, MoreHorizontal, Gauge, Share2, UserMinus, GitBranch, Tag, Settings, Star, FileText } from "lucide-solid";
|
||||||
import { StatusCircle } from "./StatusCircle";
|
import { StatusCircle } from "./StatusCircle";
|
||||||
import { calculateDateFromUrgency, calculateUrgencyFromDate } from "@/store";
|
import { calculateDateFromUrgency, calculateUrgencyFromDate } from "@/store";
|
||||||
import { Button } from "./ui/button";
|
import { Button } from "./ui/button";
|
||||||
@@ -406,7 +406,7 @@ export const TaskDetail: Component<TaskDetailProps> = (props) => {
|
|||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Image Upload Shortcut */}
|
{/* Unified Media Upload Shortcut */}
|
||||||
<div class="flex items-center gap-1 shrink-0">
|
<div class="flex items-center gap-1 shrink-0">
|
||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
@@ -415,48 +415,12 @@ export const TaskDetail: Component<TaskDetailProps> = (props) => {
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
const instance = editorInstance();
|
const instance = editorInstance();
|
||||||
if (instance) {
|
if (instance) {
|
||||||
instance.chain().focus().uploadImage().run();
|
instance.chain().focus().uploadMedia().run();
|
||||||
}
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<ImageIcon size={14} class="opacity-70" />
|
|
||||||
<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>
|
|
||||||
|
|
||||||
{/* File 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().uploadFile().run();
|
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<FileText size={14} class="opacity-70" />
|
<FileText size={14} class="opacity-70" />
|
||||||
<span class="hidden sm:inline">File</span>
|
<span class="hidden sm:inline">Upload</span>
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { type Component, createSignal, createMemo, createEffect, onCleanup, For,
|
|||||||
import { store, renameTagDefinition, updateNote, removeNote, restoreNote, setActiveNoteId, cleanupNoteAttachments, getFavoriteTag } from "@/store";
|
import { store, renameTagDefinition, updateNote, removeNote, restoreNote, setActiveNoteId, cleanupNoteAttachments, getFavoriteTag } from "@/store";
|
||||||
import { pb } from "@/lib/pocketbase";
|
import { pb } from "@/lib/pocketbase";
|
||||||
import { type Note } from "@/store";
|
import { type Note } from "@/store";
|
||||||
import { Plus, X, Lock, Unlock, Trash2, ChevronDown, Link as LinkIcon, Image as ImageIcon, MoreHorizontal, Type, FileText, Film, Search, Star, ChevronRight } from "lucide-solid";
|
import { Plus, X, Lock, Unlock, Trash2, ChevronDown, Link as LinkIcon, MoreHorizontal, Type, FileText, Search, Star, ChevronRight } from "lucide-solid";
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import { Popover, PopoverTrigger, PopoverContent } from "@/components/ui/popover";
|
import { Popover, PopoverTrigger, PopoverContent } from "@/components/ui/popover";
|
||||||
import { DragDropProvider, DragDropSensors, SortableProvider, createSortable, closestCenter } from "@thisbeyond/solid-dnd";
|
import { DragDropProvider, DragDropSensors, SortableProvider, createSortable, closestCenter } from "@thisbeyond/solid-dnd";
|
||||||
@@ -463,38 +463,12 @@ export const NotepadView: Component<{
|
|||||||
class="h-7 px-2 text-[0.625rem] font-bold uppercase tracking-wider hover:bg-muted/50 flex items-center gap-1.5 text-muted-foreground hover:text-foreground transition-all rounded-lg border border-border/40 shadow-sm"
|
class="h-7 px-2 text-[0.625rem] font-bold uppercase tracking-wider hover:bg-muted/50 flex items-center gap-1.5 text-muted-foreground hover:text-foreground transition-all rounded-lg border border-border/40 shadow-sm"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
const instance = editorInstance();
|
const instance = editorInstance();
|
||||||
if (instance) instance.chain().focus().uploadImage().run();
|
if (instance) instance.chain().focus().uploadMedia().run();
|
||||||
}}
|
}}
|
||||||
title="Upload Image"
|
title="Upload"
|
||||||
>
|
|
||||||
<ImageIcon size={14} class="opacity-70" />
|
|
||||||
<span>Image</span>
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
variant="ghost"
|
|
||||||
size="sm"
|
|
||||||
class="h-7 px-2 text-[0.625rem] font-bold uppercase tracking-wider hover:bg-muted/50 flex items-center gap-1.5 text-muted-foreground hover:text-foreground transition-all rounded-lg border border-border/40 shadow-sm"
|
|
||||||
onClick={() => {
|
|
||||||
const instance = editorInstance();
|
|
||||||
if (instance) instance.chain().focus().uploadVideo().run();
|
|
||||||
}}
|
|
||||||
title="Upload Video"
|
|
||||||
>
|
|
||||||
<Film size={14} class="opacity-70" />
|
|
||||||
<span>Video</span>
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
variant="ghost"
|
|
||||||
size="sm"
|
|
||||||
class="h-7 px-2 text-[0.625rem] font-bold uppercase tracking-wider hover:bg-muted/50 flex items-center gap-1.5 text-muted-foreground hover:text-foreground transition-all rounded-lg border border-border/40 shadow-sm"
|
|
||||||
onClick={() => {
|
|
||||||
const instance = editorInstance();
|
|
||||||
if (instance) instance.chain().focus().uploadFile().run();
|
|
||||||
}}
|
|
||||||
title="Attach File"
|
|
||||||
>
|
>
|
||||||
<FileText size={14} class="opacity-70" />
|
<FileText size={14} class="opacity-70" />
|
||||||
<span>File</span>
|
<span>Upload</span>
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user