@rpg-engine/long-bow 0.8.75 → 0.8.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/long-bow.cjs.development.js +9 -3
- package/dist/long-bow.cjs.development.js.map +1 -1
- package/dist/long-bow.cjs.production.min.js +1 -1
- package/dist/long-bow.cjs.production.min.js.map +1 -1
- package/dist/long-bow.esm.js +9 -3
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/DailyTasks/DailyTasks.tsx +16 -3
package/package.json
CHANGED
|
@@ -108,13 +108,26 @@ export const DailyTasks: React.FC<IDailyTasksProps> = ({
|
|
|
108
108
|
return matchesSearch && matchesStatus;
|
|
109
109
|
});
|
|
110
110
|
|
|
111
|
-
// Sort
|
|
111
|
+
// Sort by relevance: pinned first, then by status (in progress, completed, not started)
|
|
112
112
|
return filtered.sort((a, b) => {
|
|
113
113
|
const aIsPinned = pinnedTasks.includes(a.key);
|
|
114
114
|
const bIsPinned = pinnedTasks.includes(b.key);
|
|
115
|
+
|
|
116
|
+
// Pinned tasks always come first
|
|
115
117
|
if (aIsPinned && !bIsPinned) return -1;
|
|
116
118
|
if (!aIsPinned && bIsPinned) return 1;
|
|
117
|
-
|
|
119
|
+
|
|
120
|
+
// If both are pinned or both are not pinned, sort by status priority
|
|
121
|
+
const statusPriority = {
|
|
122
|
+
[TaskStatus.InProgress]: 1,
|
|
123
|
+
[TaskStatus.Completed]: 2,
|
|
124
|
+
[TaskStatus.NotStarted]: 3,
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
const aPriority = statusPriority[a.status] || 4;
|
|
128
|
+
const bPriority = statusPriority[b.status] || 4;
|
|
129
|
+
|
|
130
|
+
return aPriority - bPriority;
|
|
118
131
|
});
|
|
119
132
|
}, [localTasks, searchQuery, selectedStatus, pinnedTasks]);
|
|
120
133
|
|
|
@@ -249,7 +262,7 @@ const TasksList = styled.div<{ isMobile: boolean }>`
|
|
|
249
262
|
display: flex;
|
|
250
263
|
flex-direction: column;
|
|
251
264
|
gap: ${props => props.isMobile ? '8px' : '12px'};
|
|
252
|
-
padding: ${props => props.isMobile ? '8px' : '12px'};
|
|
265
|
+
padding: ${props => props.isMobile ? '8px 8px 40px 8px' : '12px 12px 40px 12px'};
|
|
253
266
|
overflow-y: auto;
|
|
254
267
|
flex: 1;
|
|
255
268
|
background-color: transparent;
|