diff --git a/README.md b/README.md index 997e180..e646c5d 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ If a `WEBHOOK_URL` is provided, the endpoint is called with the following events | `task.deleted` | Triggered when a task is deleted | | `task.status_changed` | Triggered when a task's status changes | | `task.assigned` | Triggered when a task is assigned to a user | +| `task.pinned` | Triggered when a task is pinned or unpinned | | `comment.created` | Triggered when a comment is added to a task | | `user.joined` | Triggered when a new user joins the system | diff --git a/app/components/status-menu.tsx b/app/components/status-menu.tsx index 17cf3fe..09107c7 100644 --- a/app/components/status-menu.tsx +++ b/app/components/status-menu.tsx @@ -3,6 +3,7 @@ import clsx from "clsx"; import React from "react"; import { statuses } from "~/lib/statuses"; import { useTaskDelete } from "~/lib/use-task-delete"; +import { useTaskPin } from "~/lib/use-task-pin"; import { usePopoverContext } from "./popover"; interface StatusMenuProps { @@ -13,6 +14,7 @@ interface StatusMenuProps { export function StatusMenu({ task, onStatusUpdate }: StatusMenuProps) { const [confirmingDelete, setConfirmingDelete] = React.useState(false); const remove = useTaskDelete(task); + const pin = useTaskPin(task); const popover = usePopoverContext(); @@ -36,7 +38,8 @@ export function StatusMenu({ task, onStatusUpdate }: StatusMenuProps) { className={clsx( "flex items-center pl-3 rounded-lg hover:bg-neutral-200/80 dark:hover:bg-neutral-800/20", { - "bg-neutral-200/80 dark:bg-neutral-800/20": s.id === task.status, + "bg-neutral-200/80 dark:bg-neutral-800/20": + s.id === task.status, }, )} > @@ -59,11 +62,28 @@ export function StatusMenu({ task, onStatusUpdate }: StatusMenuProps) {
Actions