group print buttons, manage stop button state, remove unused 3mf metadata

This commit is contained in:
Stewart Allen 2025-02-12 19:53:30 -05:00
commit 1b9f67e30c
4 changed files with 35 additions and 27 deletions

View file

@ -293,6 +293,7 @@ self.kiri.load(api => {
$('bbl_bed_on').checked = bed_target_temper > 0; $('bbl_bed_on').checked = bed_target_temper > 0;
$('bbl_pause').disabled = (gcode_state !== 'RUNNING'); $('bbl_pause').disabled = (gcode_state !== 'RUNNING');
$('bbl_resume').disabled = (gcode_state !== 'PAUSE' || gcode_state === 'FAILED'); $('bbl_resume').disabled = (gcode_state !== 'PAUSE' || gcode_state === 'FAILED');
$('bbl_stop').disabled = (!gcode_file);
$('bbl_fan_part').value = cooling_fan_speed || 0; $('bbl_fan_part').value = cooling_fan_speed || 0;
$('bbl_fan_part_on').checked = cooling_fan_speed > 0 ? true : false; $('bbl_fan_part_on').checked = cooling_fan_speed > 0 ? true : false;
$('bbl_fan_1').value = big_fan1_speed || 0; $('bbl_fan_1').value = big_fan1_speed || 0;
@ -775,37 +776,39 @@ self.kiri.load(api => {
h.select({ id: "bbl_file_spool" }) h.select({ id: "bbl_file_spool" })
]), ]),
h.div({ class: "grow" }), h.div({ class: "grow" }),
h.button({ h.div({ class: "f-row gap3 f-grow" }, [
_: 'print', h.button({
id: "bbl_file_print", _: 'print',
class: "f-col a-center t-center", id: "bbl_file_print",
disabled: true, class: "f-col a-center t-center",
onclick() { disabled: true,
console.log({ printing: selected.file.path }); onclick() {
file_print(selected.file.path); console.log({ printing: selected.file.path });
api.alerts.show(`printing: ${selected.file.path}`,2); file_print(selected.file.path);
}}), api.alerts.show(`printing: ${selected.file.path}`,2);
h.button({ }}),
_: 'delete', h.button({
id: "bbl_file_delete", _: 'delete',
class: "f-col a-center t-center", id: "bbl_file_delete",
disabled: true, class: "f-col a-center t-center",
onclick() { disabled: true,
console.log({ deleting: selected.file.path }); onclick() {
file_delete(selected.file.path); console.log({ deleting: selected.file.path });
}}), file_delete(selected.file.path);
}}),
])
]), ]),
h.div({ class: "t-body t-inset f-col gap3 pad4" }, [ h.div({ class: "t-body t-inset f-col gap3 pad4" }, [
h.label({ class: "set-header dev-sel" }, [ h.label({ class: "set-header dev-sel" }, [
h.a('active file') h.a('active file')
]), ]),
h.div({ class: "var-row" }, [ h.div({ class: "var-row f-grow" }, [
h.input({ id: "bbl_file_active", class: "t-left", readonly }) h.input({ id: "bbl_file_active", class: "t-left", readonly })
]), ]),
h.div([ h.div({ class: "f-row gap3 f-grow" }, [
h.button({ _: "pause", id: "bbl_pause", class: "a-center", onclick() { cmd_if("pause") } }), h.button({ _: "pause", id: "bbl_pause", class: "f-col t-center a-center", onclick() { cmd_if("pause") } }),
h.button({ _: "resume", id: "bbl_resume", class: "a-center", onclick() { cmd_if("resume") } }), h.button({ _: "resume", id: "bbl_resume", class: "f-col t-center a-center", onclick() { cmd_if("resume") } }),
h.button({ _: "stop", class: "a-center", onclick() { cmd_if("cancel") } }), h.button({ _: "stop", id: "bbl_stop", class: "f-col t-center a-center", onclick() { cmd_if("cancel") } }),
]) ])
]) ])
]) ])

View file

@ -160,6 +160,8 @@ module.exports = async (server) => {
password, password,
secure: "implicit", secure: "implicit",
secureOptions: useCA ? { secureOptions: useCA ? {
// this appears to break some
// operations like file deletion
ca: bblCA, ca: bblCA,
servername: args.serial servername: args.serial
} : { } : {

View file

@ -639,9 +639,9 @@ function exportGCodeDialog(gcode, sections, info, names) {
' <metadata key="outside" value="false"/>', ' <metadata key="outside" value="false"/>',
' <metadata key="support_used" value="false"/>', ' <metadata key="support_used" value="false"/>',
' <metadata key="label_object_enabled" value="false"/>', ' <metadata key="label_object_enabled" value="false"/>',
' <object identify_id="560" name="Cube" skipped="false" />', // ' <object identify_id="560" name="Cube" skipped="false" />',
' <filament id="1" tray_info_idx="GFL96" type="PLA" color="#FFFFFF" used_m="0.17" used_g="0.50" />', // ' <filament id="1" tray_info_idx="GFL96" type="PLA" color="#FFFFFF" used_m="0.17" used_g="0.50" />',
' <warning msg="bed_temperature_too_high_than_filament" level="1" error_code ="1000C001" />', // ' <warning msg="bed_temperature_too_high_than_filament" level="1" error_code ="1000C001" />',
' </plate>', ' </plate>',
'</config>' '</config>'
].join('\n') ].join('\n')

View file

@ -689,6 +689,9 @@ details[open] summary::after {
.fcol, .f-col { .fcol, .f-col {
flex-direction: column; flex-direction: column;
} }
.f-grow > * {
flex: 1;
}
.auto { .auto {
flex-basis: auto; flex-basis: auto;
} }