- Remove BMAD framework, IDE configs, dev screenshots, test files, internal docs, and backup files - Rename keep-notes/ to memento-note/ - Update all references from keep-notes to memento-note - Add Apache 2.0 license with Commons Clause (non-commercial restriction) - Add clean .gitignore and .env.docker.example
55 lines
1.4 KiB
TypeScript
55 lines
1.4 KiB
TypeScript
'use client'
|
|
|
|
import { Edit2, MoreVertical, FileText } from 'lucide-react'
|
|
import { Button } from '@/components/ui/button'
|
|
import { useLanguage } from '@/lib/i18n'
|
|
import {
|
|
DropdownMenu,
|
|
DropdownMenuContent,
|
|
DropdownMenuItem,
|
|
DropdownMenuTrigger,
|
|
} from '@/components/ui/dropdown-menu'
|
|
import { Notebook } from '@/lib/types'
|
|
|
|
interface NotebookActionsProps {
|
|
notebook: Notebook
|
|
onEdit: () => void
|
|
onDelete: () => void
|
|
onSummary?: () => void
|
|
}
|
|
|
|
export function NotebookActions({ notebook, onEdit, onDelete, onSummary }: NotebookActionsProps) {
|
|
const { t } = useLanguage()
|
|
return (
|
|
<DropdownMenu>
|
|
<DropdownMenuTrigger asChild>
|
|
<Button
|
|
variant="ghost"
|
|
size="sm"
|
|
className="h-8 w-8 p-0"
|
|
>
|
|
<MoreVertical className="h-3 w-3" />
|
|
</Button>
|
|
</DropdownMenuTrigger>
|
|
<DropdownMenuContent align="end">
|
|
{onSummary && (
|
|
<DropdownMenuItem onClick={onSummary}>
|
|
<FileText className="h-4 w-4 mr-2" />
|
|
{t('notebook.summary')}
|
|
</DropdownMenuItem>
|
|
)}
|
|
<DropdownMenuItem onClick={onEdit}>
|
|
<Edit2 className="h-4 w-4 mr-2" />
|
|
{t('notebook.edit')}
|
|
</DropdownMenuItem>
|
|
<DropdownMenuItem
|
|
onClick={onDelete}
|
|
className="text-red-600"
|
|
>
|
|
{t('notebook.delete')}
|
|
</DropdownMenuItem>
|
|
</DropdownMenuContent>
|
|
</DropdownMenu>
|
|
)
|
|
}
|