feat(mobile): simplify triage quick dump capture and convert priority to 4 buttons across tasks
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 1m4s

This commit is contained in:
sandrodach committed 2026-10-26 12:56:11 +01:00
1 parent 832f2f9c2b
commit baac20ea10
4 files changed
+269 -199

No files matched your search

+45 -23
View File
@@ -1660,31 +1660,53 @@ export const TasksView: React.FC<TasksViewProps> = ({
</div>
)}
{/* Priority & Due Date */}
<div className="grid grid-cols-2 gap-2 pt-1">
<div>
<label className="text-[11px] font-semibold text-muted block mb-1">Priorität</label>
<select
value={mobileCreatePriority}
onChange={(e) => setMobileCreatePriority(e.target.value as PriorityLevel)}
className="w-full input-field px-2 py-2 text-xs bg-panel"
>
<option value="normal">Normal</option>
<option value="high">⚠️ Wichtig</option>
<option value="urgent">🔥 Dringend</option>
<option value="low">Niedrig</option>
</select>
{/* Priority - 4 Buttons */}
<div className="space-y-1.5 pt-1">
<label className="text-[11px] font-semibold text-muted block">Priorität</label>
<div className="grid grid-cols-4 gap-1.5">
{(['low', 'normal', 'high', 'urgent'] as PriorityLevel[]).map((p) => {
const config: Record<PriorityLevel, { label: string; icon?: React.ReactNode; activeClass: string }> = {
low: { label: 'Niedrig', activeClass: 'bg-canvas border-strong text-main font-semibold shadow-xs' },
normal: { label: 'Normal', activeClass: 'bg-accent/15 border-accent text-accent font-semibold shadow-xs' },
high: { label: 'Wichtig', icon: <AlertTriangle className="w-3 h-3 text-status-warn" />, activeClass: 'bg-status-warn/15 border-status-warn text-status-warn font-semibold shadow-xs' },
urgent: { label: 'Dringend', icon: <Flame className="w-3 h-3 text-status-err" />, activeClass: 'bg-status-err/15 border-status-err text-status-err font-semibold shadow-xs' },
};
const active = mobileCreatePriority === p;
const item = config[p];
return (
<button
key={p}
type="button"
onClick={() => {
triggerHaptic(10);
setMobileCreatePriority(p);
}}
className={`h-9 px-1 text-xs rounded-btn font-medium transition-colors border flex items-center justify-center gap-1 cursor-pointer ${
active
? item.activeClass
: 'bg-canvas border-border text-muted hover:text-main'
}`}
>
{item.icon}
<span className="truncate">{item.label}</span>
</button>
);
})}
</div>
</div>
<div>
<label className="text-[11px] font-semibold text-muted block mb-1">Fällig am</label>
<input
type="date"
value={mobileCreateDueDate}
onChange={(e) => setMobileCreateDueDate(e.target.value)}
className="w-full input-field px-2 py-2 text-xs"
/>
</div>
{/* Due Date */}
<div className="space-y-1 pt-1">
<label className="text-[11px] font-semibold text-muted flex items-center gap-1">
<Calendar className="w-3.5 h-3.5 text-accent" />
<span>Fällig am</span>
</label>
<input
type="date"
value={mobileCreateDueDate}
onChange={(e) => setMobileCreateDueDate(e.target.value)}
className="w-full input-field px-3 py-2 text-xs"
/>
</div>
<div className="pt-2 flex justify-end gap-2">