|
|
|
@ -36,20 +36,11 @@ export default function Component({ service }) {
|
|
|
|
|
|
|
|
|
|
const printStatsInfo = printStats.result.status.print_stats.info ?? {};
|
|
|
|
|
const { current_layer: currentLayer = "-", total_layer: totalLayer = "-" } = printStatsInfo;
|
|
|
|
|
const layers = printStats.result.status.print_stats.state === "standby" ? "- / -" : `${currentLayer} / ${totalLayer}`;
|
|
|
|
|
|
|
|
|
|
if (printStats.result.status.print_stats.state === "standby") {
|
|
|
|
|
return (
|
|
|
|
|
<Container service={service}>
|
|
|
|
|
<Block label="moonraker.layers" value="-" />
|
|
|
|
|
<Block label="moonraker.print_progress" value="-" />
|
|
|
|
|
<Block label="moonraker.print_status" value={printStats.result.status.print_stats.state} />
|
|
|
|
|
</Container>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<Container service={service}>
|
|
|
|
|
<Block label="moonraker.layers" value={`${currentLayer} / ${totalLayer}`} />
|
|
|
|
|
<Block label="moonraker.layers" value={layers} />
|
|
|
|
|
<Block
|
|
|
|
|
label="moonraker.print_progress"
|
|
|
|
|
value={t("common.percent", { value: displayStatus.result.status.display_status.progress * 100 })}
|
|
|
|
@ -57,5 +48,4 @@ export default function Component({ service }) {
|
|
|
|
|
<Block label="moonraker.print_status" value={printStats.result.status.print_stats.state} />
|
|
|
|
|
</Container>
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|