@rpg-engine/long-bow 0.8.75 → 0.8.77
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 +12 -10
- 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 +12 -10
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/DailyTasks/DailyTasks.tsx +20 -24
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
|
|
|
@@ -124,8 +137,8 @@ export const DailyTasks: React.FC<IDailyTasksProps> = ({
|
|
|
124
137
|
onCloseButton={onClose}
|
|
125
138
|
cancelDrag=".tasks-container"
|
|
126
139
|
scale={scale}
|
|
127
|
-
width={
|
|
128
|
-
height={
|
|
140
|
+
width={'max(50vw, 900px)'}
|
|
141
|
+
height={'min(85vh, 800px)'}
|
|
129
142
|
isMobile={isMobile}
|
|
130
143
|
>
|
|
131
144
|
<TaskTitle isMobile={isMobile}>Daily Tasks</TaskTitle>
|
|
@@ -197,20 +210,8 @@ export const DailyTasks: React.FC<IDailyTasksProps> = ({
|
|
|
197
210
|
};
|
|
198
211
|
|
|
199
212
|
const TasksContainer = styled(DraggableContainer) <{ isMobile: boolean }>`
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
top: 0 !important;
|
|
203
|
-
left: 0 !important;
|
|
204
|
-
right: 0 !important;
|
|
205
|
-
bottom: 0 !important;
|
|
206
|
-
width: 100vw !important;
|
|
207
|
-
height: 100vh !important;
|
|
208
|
-
margin: 0 !important;
|
|
209
|
-
z-index: 1000 !important;
|
|
210
|
-
` : `
|
|
211
|
-
margin: 0 auto;
|
|
212
|
-
min-width: 50vw;
|
|
213
|
-
`}
|
|
213
|
+
margin: 0 auto;
|
|
214
|
+
min-width: 50vw;
|
|
214
215
|
|
|
215
216
|
.rpgui-container-title {
|
|
216
217
|
width: 100%;
|
|
@@ -225,11 +226,6 @@ const TasksContainer = styled(DraggableContainer) <{ isMobile: boolean }>`
|
|
|
225
226
|
padding: 0 !important;
|
|
226
227
|
overflow: hidden !important;
|
|
227
228
|
background-color: rgba(30, 30, 30, 0.98) !important;
|
|
228
|
-
${props => props.isMobile ? `
|
|
229
|
-
border-radius: 0 !important;
|
|
230
|
-
height: 100vh !important;
|
|
231
|
-
width: 100vw !important;
|
|
232
|
-
` : ''}
|
|
233
229
|
}
|
|
234
230
|
`;
|
|
235
231
|
|
|
@@ -249,7 +245,7 @@ const TasksList = styled.div<{ isMobile: boolean }>`
|
|
|
249
245
|
display: flex;
|
|
250
246
|
flex-direction: column;
|
|
251
247
|
gap: ${props => props.isMobile ? '8px' : '12px'};
|
|
252
|
-
padding: ${props => props.isMobile ? '8px' : '12px'};
|
|
248
|
+
padding: ${props => props.isMobile ? '8px 8px 40px 8px' : '12px 12px 40px 12px'};
|
|
253
249
|
overflow-y: auto;
|
|
254
250
|
flex: 1;
|
|
255
251
|
background-color: transparent;
|