this repo has no description
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: modify state for priority

+16 -5
+7 -1
mast-react-vite/src/App.tsx
··· 42 42 .join(" OR "); 43 43 44 44 console.log("updating todos: ", whereClause, "newParams: ", newParams); 45 - const todos = useQuery( 45 + const rawTodos = useQuery( 46 46 ctx, 47 47 `SELECT * FROM active_todos ${whereClause ? "WHERE " + whereClause : ""}`, 48 48 newParams, 49 49 ).data; 50 + 51 + // Convert priority field from string to boolean 52 + const todos = rawTodos?.map(todo => ({ 53 + ...todo, 54 + priority: todo.priority === '1' 55 + })); 50 56 51 57 // Keep newText in sync with filterText when in filter mode 52 58 useEffect(() => {
+9 -4
mast-react-vite/src/components/ui/task.tsx
··· 60 60 const displayProject = hasPreviewProject ? data.preview.project : data.project || ''; 61 61 const isPreviewProject = hasPreviewProject && data.project !== data.preview.project; 62 62 63 + // Handle priority display with preview 64 + const hasPreviewPriority = hasPreview && data.preview.priority !== undefined; 65 + const displayPriority = hasPreviewPriority ? data.preview.priority : data.priority; 66 + const isPreviewPriority = hasPreviewPriority && data.priority !== data.preview.priority; 67 + 63 68 const getStateStyles = (status) => { 64 69 switch (status) { 65 70 case 2: // preview-add ··· 182 187 <div className="flex items-start gap-4 relative"> 183 188 <div className="flex-1 min-w-0"> 184 189 {/* Priority flag icon in top right */} 185 - {data.priority && ( 186 - <div className={`absolute top-0 right-0 ${data.completed === 2 ? 'text-yellow-600' : 'text-red-500'}`} title="Priority task"> 190 + {displayPriority && ( 191 + <div className={`absolute top-0 right-0 ${data.completed === 2 || isPreviewPriority ? 'text-yellow-600' : 'text-red-500'}`} title="Priority task"> 187 192 <Flag className="w-5 h-5" fill="currentColor" /> 188 193 </div> 189 194 )} 190 - {!data.priority && ( 191 - <div className={`absolute top-0 right-0 ${data.completed === 2 ? 'text-yellow-600' : 'text-gray-300'}`} title="Normal priority"> 195 + {!displayPriority && ( 196 + <div className={`absolute top-0 right-0 ${data.completed === 2 || isPreviewPriority ? 'text-yellow-600' : 'text-gray-300'}`} title="Normal priority"> 192 197 <Flag className="w-5 h-5" /> 193 198 </div> 194 199 )}