diff --git a/src/components/widgets/spoolman/SpoolmanCard.vue b/src/components/widgets/spoolman/SpoolmanCard.vue index f5185eb0c3..8c2aa8c828 100644 --- a/src/components/widgets/spoolman/SpoolmanCard.vue +++ b/src/components/widgets/spoolman/SpoolmanCard.vue @@ -93,7 +93,7 @@ @@ -160,14 +160,23 @@ align-self="center" class="pa-0" > - - $filament - + + $filament + + + + diff --git a/src/store/spoolman/getters.ts b/src/store/spoolman/getters.ts index fb85139245..c8edeff09e 100644 --- a/src/store/spoolman/getters.ts +++ b/src/store/spoolman/getters.ts @@ -43,6 +43,9 @@ const spoolmanSpoolAsSpool = (spool: SpoolmanSpool): Spool => { initial_length: initial_weight != null ? filamentWeightToLength(initial_weight, filament) : undefined, + progress: !!initial_weight && spool.used_weight != null + ? (initial_weight - spool.used_weight) / initial_weight * 100 + : undefined, filament, }) } diff --git a/src/store/spoolman/types.ts b/src/store/spoolman/types.ts index 94c52f215f..c3c3543a12 100644 --- a/src/store/spoolman/types.ts +++ b/src/store/spoolman/types.ts @@ -83,6 +83,7 @@ export interface Spool extends Omit {