Removed filename, to adhere to standards
This commit is contained in:
parent
562b01e70e
commit
ae8fd0084b
@ -21,58 +21,31 @@ export default function Component({ service }) {
|
|||||||
if (!printStats || !displayStatus || !webHooks) {
|
if (!printStats || !displayStatus || !webHooks) {
|
||||||
return (
|
return (
|
||||||
<Container service={service}>
|
<Container service={service}>
|
||||||
<div class="inline-flex flex-col" style={{width: '100%'}}>
|
<Block label="moonraker.printer_state" />
|
||||||
<Block label="moonraker.printer_state" />
|
|
||||||
<div class="inline-flex flex-row">
|
|
||||||
<Block label="moonraker.layers" />
|
|
||||||
<Block label="moonraker.print_progress" />
|
|
||||||
<Block label="moonraker.print_status" />
|
|
||||||
</div>
|
|
||||||
<Block label="moonraker.filename"/>
|
|
||||||
</div>
|
|
||||||
</Container>
|
</Container>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
let fileName = "-";
|
|
||||||
if(!printStats.result.status.print_stats.filename === "") {
|
|
||||||
fileName = printStats.result.status.print_stats.filename;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (webHooks.result.status.webhooks.state === "shutdown") {
|
if (webHooks.result.status.webhooks.state === "shutdown") {
|
||||||
return (
|
return (
|
||||||
<Container service={service}>
|
<Container service={service}>
|
||||||
<div class="inline-flex flex-col" style={{width: '100%'}}>
|
<Block label="moonraker.printer_state" value={webHooks.result.status.webhooks.state} />
|
||||||
<Block label="moonraker.printer_state" value={webHooks.result.status.webhooks.state} />
|
|
||||||
<div class="inline-flex flex-row">
|
|
||||||
<Block label="moonraker.layers" value="-" />
|
|
||||||
<Block label="moonraker.print_progress" value="-" />
|
|
||||||
<Block label="moonraker.print_status" value="-" />
|
|
||||||
</div>
|
|
||||||
<Block label="moonraker.filename" value="-" />
|
|
||||||
</div>
|
|
||||||
</Container>
|
</Container>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
let currentLayer = "-";
|
let currentLayer = "-";
|
||||||
let totalLayer = "-";
|
let totalLayer = "-";
|
||||||
if(!printStats.result.status.print_stats.info.current_layer === "") {
|
if(!printStats.result.status.print_stats.info.total_layer === "") {
|
||||||
currentLayer = printStats.result.status.print_stats.info.current_layer;
|
currentLayer = printStats.result.status.print_stats.info.current_layer;
|
||||||
totalLayer = printStats.result.status.print_stats.info.total_layer;
|
totalLayer = printStats.result.status.print_stats.info.total_layer;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Container service={service}>
|
<Container service={service}>
|
||||||
<div class="inline-flex flex-col" style={{width: '100%'}}>
|
<Block label="moonraker.layers" value={`${currentLayer} / ${totalLayer}`} />
|
||||||
<Block label="moonraker.printer_state" value={webHooks.result.status.webhooks.state} />
|
<Block label="moonraker.print_progress" value={t("common.percent", { value: (displayStatus.result.status.display_status.progress * 100) })} />
|
||||||
<div class="inline-flex flex-row">
|
<Block label="moonraker.print_status" value={printStats.result.status.print_stats.state} />
|
||||||
<Block label="moonraker.layers" value={`${currentLayer} / ${totalLayer}`} />
|
|
||||||
<Block label="moonraker.print_progress" value={t("common.percent", { value: (displayStatus.result.status.display_status.progress * 100) })} />
|
|
||||||
<Block label="moonraker.print_status" value={printStats.result.status.print_stats.state} />
|
|
||||||
</div>
|
|
||||||
<Block label="moonraker.filename" value={fileName} />
|
|
||||||
</div>
|
|
||||||
</Container>
|
</Container>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user