diff --git a/svelte-ui/src/components/Composition.svelte b/svelte-ui/src/components/Composition.svelte
index da360ea..24fb631 100644
--- a/svelte-ui/src/components/Composition.svelte
+++ b/svelte-ui/src/components/Composition.svelte
@@ -92,7 +92,7 @@
{#each list as item}
{#if !allOnes}
- {item.amount}x
+ {item.amount}×
{/if}
{item.name}
diff --git a/svelte-ui/src/components/ItemProgress.svelte b/svelte-ui/src/components/ItemProgress.svelte
index 8b777e1..27d0565 100644
--- a/svelte-ui/src/components/ItemProgress.svelte
+++ b/svelte-ui/src/components/ItemProgress.svelte
@@ -29,7 +29,12 @@
} else {
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) {
if (log.secondaryItem != null) {
@@ -44,13 +49,13 @@
}
}
- list.sort((a,b) => {
+ list = list.sort((a,b) => {
if (a.target === b.target) {
return a.item.name.localeCompare(b.item.name);
} else {
return b.target - a.target;
}
- })
+ }).filter(l => l.extras > 0 || l.target > 0);
}