feat(webhook): ensure webhook source badge displays for triage thoughts and tasks
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 1m0s
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 1m0s
This commit is contained in:
1 parent
baac20ea10
commit
0e06f6761d
6 files changed
+233
-27
No files matched your search
@@ -14,6 +14,7 @@ import {
|
||||
Flame,
|
||||
ChevronRight,
|
||||
Folder,
|
||||
Webhook,
|
||||
} from 'lucide-react';
|
||||
import { Thought, SubTask, TaskList, KanbanColumn } from '../../lib/types';
|
||||
import { triggerHaptic } from '../../lib/api';
|
||||
@@ -192,6 +193,12 @@ export const TaskDetailModal: React.FC<TaskDetailModalProps> = ({
|
||||
<span className="text-xs font-semibold text-main truncate">
|
||||
{task.isCompleted ? 'Erledigte Aufgabe' : 'Aufgabe bearbeiten'}
|
||||
</span>
|
||||
{task.source?.toLowerCase() === 'webhook' && (
|
||||
<span className="px-1.5 py-0.5 border border-border bg-canvas text-muted rounded-btn text-[10px] font-medium flex items-center gap-1 flex-shrink-0">
|
||||
<Webhook className="w-2.5 h-2.5 text-accent" />
|
||||
<span>Webhook</span>
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="flex items-center gap-1.5">
|
||||
|
||||
@@ -24,6 +24,7 @@ import {
|
||||
ChevronDown,
|
||||
Folder,
|
||||
Filter,
|
||||
Webhook,
|
||||
} from 'lucide-react';
|
||||
import { TaskList, Thought, SubTask, Team, User, TaskListShare, KanbanColumn, PriorityLevel } from '../../lib/types';
|
||||
import { api, triggerHaptic } from '../../lib/api';
|
||||
@@ -1170,6 +1171,16 @@ export const TasksView: React.FC<TasksViewProps> = ({
|
||||
</button>
|
||||
)}
|
||||
|
||||
{task.source?.toLowerCase() === 'webhook' && (
|
||||
<span
|
||||
className="px-1.5 py-0.5 border border-border bg-canvas text-muted rounded-btn text-[10px] font-medium flex items-center gap-1 flex-shrink-0"
|
||||
title="Erstellt über Webhook"
|
||||
>
|
||||
<Webhook className="w-2.5 h-2.5 text-accent" />
|
||||
<span>Webhook</span>
|
||||
</span>
|
||||
)}
|
||||
|
||||
{/* Note indicator */}
|
||||
{task.notes && (
|
||||
<button
|
||||
@@ -2174,6 +2185,15 @@ export const TasksView: React.FC<TasksViewProps> = ({
|
||||
⚠️ Wichtig
|
||||
</button>
|
||||
)}
|
||||
{task.source?.toLowerCase() === 'webhook' && (
|
||||
<span
|
||||
className="px-1.5 py-0.2 border border-border bg-canvas text-muted rounded-btn text-[9px] font-medium flex items-center gap-1"
|
||||
title="Erstellt über Webhook"
|
||||
>
|
||||
<Webhook className="w-2.5 h-2.5 text-accent" />
|
||||
<span>Webhook</span>
|
||||
</span>
|
||||
)}
|
||||
{task.dueDate && (
|
||||
<span className="inline-flex items-center gap-0.5 text-[9px] text-muted">
|
||||
<Calendar className="w-2.5 h-2.5" />
|
||||
|
||||
@@ -139,11 +139,21 @@ const SwipeableQueueItem: React.FC<SwipeableQueueItemProps> = ({
|
||||
}}
|
||||
className="relative bg-panel px-4 py-3.5 sm:px-3.5 sm:py-2.5 min-h-[56px] sm:min-h-[44px] flex items-center justify-between gap-3 hover:bg-panel-hover transition-colors group cursor-pointer"
|
||||
>
|
||||
<div className="flex-1 min-w-0 flex items-center gap-3">
|
||||
<div className="flex-1 min-w-0 flex items-center gap-2">
|
||||
<span className="w-2 h-2 rounded-full bg-accent flex-shrink-0" />
|
||||
<span className="text-sm sm:text-xs font-medium text-main line-clamp-2 sm:truncate">
|
||||
{item.content}
|
||||
</span>
|
||||
{item.source?.toLowerCase() === 'webhook' && (
|
||||
<span className="px-1.5 py-0.5 text-[10px] bg-canvas text-muted border border-border rounded-btn flex items-center gap-1 flex-shrink-0">
|
||||
<Webhook className="w-2.5 h-2.5 text-accent" /> Webhook
|
||||
</span>
|
||||
)}
|
||||
{item.source?.toLowerCase() === 'voice' && (
|
||||
<span className="px-1.5 py-0.5 text-[10px] bg-canvas text-accent border border-border rounded-btn flex items-center gap-1 flex-shrink-0">
|
||||
<Mic className="w-2.5 h-2.5" /> Diktat
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Desktop quick buttons (hidden on mobile so queue items are clean & easy to tap/swipe) */}
|
||||
@@ -413,15 +423,16 @@ export const TriageDeck: React.FC<TriageDeckProps> = ({
|
||||
}
|
||||
};
|
||||
|
||||
const sourceBadge = (source: string) => {
|
||||
if (source === 'voice') {
|
||||
const sourceBadge = (source?: string) => {
|
||||
const s = (source || '').toLowerCase().trim();
|
||||
if (s === 'voice') {
|
||||
return (
|
||||
<span className="px-2 py-0.5 text-[11px] bg-canvas text-accent border border-border rounded-btn flex items-center gap-1">
|
||||
<Mic className="w-3 h-3" /> Diktat
|
||||
</span>
|
||||
);
|
||||
}
|
||||
if (source === 'webhook') {
|
||||
if (s === 'webhook') {
|
||||
return (
|
||||
<span className="px-2 py-0.5 text-[11px] bg-canvas text-muted border border-border rounded-btn flex items-center gap-1">
|
||||
<Webhook className="w-3 h-3 text-accent" /> Webhook
|
||||
@@ -500,7 +511,10 @@ export const TriageDeck: React.FC<TriageDeckProps> = ({
|
||||
key={nextCard.id + '-preview'}
|
||||
className="absolute inset-x-3 top-3 bottom-0 panel-surface p-4 opacity-40 scale-[0.97] pointer-events-none flex flex-col justify-between"
|
||||
>
|
||||
<div className="flex items-center gap-2">{priorityBadge(nextCard.priority)}</div>
|
||||
<div className="flex items-center gap-1.5">
|
||||
{priorityBadge(nextCard.priority)}
|
||||
{sourceBadge(nextCard.source)}
|
||||
</div>
|
||||
<p className="text-sm text-muted line-clamp-2">{nextCard.content}</p>
|
||||
<div className="text-[11px] text-faint">Nächster Quick Dump…</div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user