Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/components/layout/task-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ export function TaskList() {
variant="ghost"
size="icon-xs"
iconOnly
hotkeyEnabled
className="text-muted-foreground shadow-none hover:border-transparent hover:shadow-none"
/>
</div>
Expand Down
9 changes: 7 additions & 2 deletions src/components/new-task-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,14 @@ type ButtonProps = ComponentProps<typeof Button>;

type NewTaskButtonProps = Omit<ButtonProps, "children" | "disabled" | "onClick"> & {
iconOnly?: boolean;
hotkeyEnabled?: boolean;
};

export function NewTaskButton({ iconOnly = false, ...props }: NewTaskButtonProps) {
export function NewTaskButton({
iconOnly = false,
hotkeyEnabled = false,
...props
}: NewTaskButtonProps) {
const navigate = useNavigate();
const [creating, setCreating] = useState(false);
const { data: projects } = useLiveQuery((query) =>
Expand All @@ -25,7 +30,7 @@ export function NewTaskButton({ iconOnly = false, ...props }: NewTaskButtonProps

const [defaultProject] = projects;

useHotkey(hotkeys.newTask.keys, () => handleNewTask());
useHotkey(hotkeys.newTask.keys, () => handleNewTask(), { enabled: hotkeyEnabled });

function handleNewTask() {
const repoUrl = defaultProject?.repo_url;
Expand Down
Loading