add × to ItemComposition and fix ItemProgress issues.
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -92,7 +92,7 @@
|
|||||||
{#each list as item}
|
{#each list as item}
|
||||||
<div class="item">
|
<div class="item">
|
||||||
{#if !allOnes}
|
{#if !allOnes}
|
||||||
<span class="amount">{item.amount}x </span>
|
<span class="amount">{item.amount}× </span>
|
||||||
{/if}
|
{/if}
|
||||||
<Link to={item.link}>{item.name}</Link>
|
<Link to={item.link}>{item.name}</Link>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -29,7 +29,12 @@
|
|||||||
} else {
|
} else {
|
||||||
entry.amount += task.completedAmount;
|
entry.amount += task.completedAmount;
|
||||||
}
|
}
|
||||||
entry.target += task.itemAmount;
|
|
||||||
|
if (["completed", "failed", "declined"].includes(task.statusTag)) {
|
||||||
|
entry.target += task.itemAmount - Math.max(0, task.itemAmount - task.completedAmount);
|
||||||
|
} else {
|
||||||
|
entry.target += task.itemAmount;
|
||||||
|
}
|
||||||
|
|
||||||
for (const log of task.logs) {
|
for (const log of task.logs) {
|
||||||
if (log.secondaryItem != null) {
|
if (log.secondaryItem != null) {
|
||||||
@@ -44,13 +49,13 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
list.sort((a,b) => {
|
list = list.sort((a,b) => {
|
||||||
if (a.target === b.target) {
|
if (a.target === b.target) {
|
||||||
return a.item.name.localeCompare(b.item.name);
|
return a.item.name.localeCompare(b.item.name);
|
||||||
} else {
|
} else {
|
||||||
return b.target - a.target;
|
return b.target - a.target;
|
||||||
}
|
}
|
||||||
})
|
}).filter(l => l.extras > 0 || l.target > 0);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user