Made ctrl shortcut go straight to typing.
This commit is contained in:
@@ -12,7 +12,7 @@ interface NavItem {
|
||||
const navItems: NavItem[] = [
|
||||
{ icon: ListTodo, label: "Focus", view: "critical" },
|
||||
{ icon: Clock, label: "Time", view: "urgency" },
|
||||
{ icon: ArrowUpCircle, label: "Impact", view: "priority" },
|
||||
{ icon: ArrowUpCircle, label: "Priority", view: "priority" },
|
||||
{ icon: LayoutDashboard, label: "Matrix", view: "matrix" },
|
||||
{ icon: Settings, label: "Settings", view: "settings" },
|
||||
];
|
||||
|
||||
@@ -32,11 +32,23 @@ export const QuickEntry: Component = () => {
|
||||
|
||||
// Explicit date string for the input (YYYY-MM-DDTHH:mm)
|
||||
const [dateString, setDateString] = createSignal<string>("");
|
||||
let inputRef: HTMLInputElement | undefined;
|
||||
|
||||
createEffect(() => {
|
||||
if (isOpen()) {
|
||||
// Slight delay to ensure DOM is ready and animations don't interfere
|
||||
setTimeout(() => inputRef?.focus(), 50);
|
||||
}
|
||||
});
|
||||
|
||||
const handleKeyDown = (e: KeyboardEvent) => {
|
||||
if ((e.metaKey || e.ctrlKey) && e.key === "k") {
|
||||
e.preventDefault();
|
||||
setIsOpen(true);
|
||||
if (isOpen()) {
|
||||
inputRef?.focus();
|
||||
} else {
|
||||
setIsOpen(true);
|
||||
}
|
||||
}
|
||||
if (e.key === "Escape") {
|
||||
setIsOpen(false);
|
||||
@@ -142,7 +154,7 @@ export const QuickEntry: Component = () => {
|
||||
<Search class="text-muted-foreground mr-3" size={20} />
|
||||
<TextField class="flex-1">
|
||||
<TextFieldInput
|
||||
autofocus
|
||||
ref={inputRef}
|
||||
value={input()}
|
||||
onInput={(e) => setInput(e.currentTarget.value)}
|
||||
onKeyDown={(e) => e.key === "Enter" && parseAndAdd()}
|
||||
@@ -154,7 +166,7 @@ export const QuickEntry: Component = () => {
|
||||
|
||||
<div class="flex flex-col md:flex-row items-stretch md:items-center p-4 gap-4 border-b border-border bg-muted/10">
|
||||
<div class="flex-1 space-y-1.5">
|
||||
<label class="text-[10px] font-bold uppercase tracking-wider text-muted-foreground ml-1">Priority (Impact)</label>
|
||||
<label class="text-[10px] font-bold uppercase tracking-wider text-muted-foreground ml-1">Priority</label>
|
||||
<Select
|
||||
value={priority()}
|
||||
onChange={(val) => val && setPriority(val)}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { type Component, createMemo } from "solid-js";
|
||||
import { type Task, toggleTask, calculateUrgencyFromDate, setActiveTaskId } from "@/store";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { CheckCircle2, Circle, Clock } from "lucide-solid";
|
||||
import { CheckCircle2, Circle, Clock, ArrowUpCircle } from "lucide-solid";
|
||||
|
||||
export const TaskCard: Component<{ task: Task }> = (props) => {
|
||||
const urgencyLevel = createMemo(() => calculateUrgencyFromDate(props.task.dueDate));
|
||||
@@ -46,12 +46,10 @@ export const TaskCard: Component<{ task: Task }> = (props) => {
|
||||
{props.task.title}
|
||||
</h3>
|
||||
<div class="flex items-center space-x-4 mt-1">
|
||||
{/* Priority (Impact) */}
|
||||
<div class="flex items-center space-x-1.5 text-xs text-muted-foreground font-medium">
|
||||
<div class="w-2 h-2 rounded-full bg-primary/20 flex items-center justify-center">
|
||||
<div class="w-1 h-1 rounded-full bg-primary" />
|
||||
</div>
|
||||
<span>Impact {props.task.priority}</span>
|
||||
{/* Priority */}
|
||||
<div class="flex items-center gap-1.5 min-w-[32px]">
|
||||
<ArrowUpCircle size={12} class="text-primary opacity-60" />
|
||||
<span>P{props.task.priority}</span>
|
||||
</div>
|
||||
|
||||
{/* Due Date + Urgency Slide-out */}
|
||||
|
||||
@@ -98,7 +98,7 @@ export const TaskDetail: Component<TaskDetailProps> = (props) => {
|
||||
<div class="flex flex-row items-center gap-1.5 sm:gap-4 mt-2 text-sm overflow-x-auto no-scrollbar flex-nowrap">
|
||||
{/* Priority */}
|
||||
<div class="flex items-center gap-1 group shrink-0">
|
||||
<span class="text-[10px] uppercase font-bold tracking-wider text-muted-foreground/70 hidden sm:inline">Impact</span>
|
||||
<span class="text-[10px] uppercase font-bold tracking-wider text-muted-foreground/70 hidden sm:inline">Priority</span>
|
||||
<Select
|
||||
value={props.task.priority.toString()}
|
||||
onChange={(val) => val && updatePriority(val)}
|
||||
|
||||
@@ -12,7 +12,7 @@ export const MatrixView: Component = () => {
|
||||
<div class="h-[calc(100vh-12rem)] md:h-[calc(100vh-8rem)] flex flex-col">
|
||||
<header class="mb-6">
|
||||
<h2 class="text-3xl font-bold tracking-tight">Strategy Matrix</h2>
|
||||
<p class="text-muted-foreground mt-1 text-lg">Urgency vs Impact mapping.</p>
|
||||
<p class="text-muted-foreground mt-1 text-lg">Urgency vs Priority mapping.</p>
|
||||
</header>
|
||||
|
||||
<div class="flex-1 relative border-2 border-dashed border-muted rounded-3xl overflow-hidden bg-muted/20">
|
||||
|
||||
@@ -16,7 +16,7 @@ export const PriorityView: Component = () => {
|
||||
return (
|
||||
<div class="space-y-6">
|
||||
<header>
|
||||
<h2 class="text-3xl font-bold tracking-tight">Impact</h2>
|
||||
<h2 class="text-3xl font-bold tracking-tight">Priority</h2>
|
||||
<p class="text-muted-foreground mt-1 text-lg">Your tasks ordered by priority.</p>
|
||||
</header>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user