disable print button when job running, reverse delete/print
This commit is contained in:
parent
d681585d50
commit
569a12d94d
1 changed files with 12 additions and 11 deletions
|
|
@ -295,7 +295,8 @@ 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_stop').disabled = gcode_file ? false : true;
|
||||||
|
$('bbl_file_print').disabled = gcode_file ? true : false;
|
||||||
$('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;
|
||||||
|
|
@ -679,7 +680,7 @@ self.kiri.load(api => {
|
||||||
style: "flex-grow: 1; width: 100%; resize: none; box-sizing: border-box",
|
style: "flex-grow: 1; width: 100%; resize: none; box-sizing: border-box",
|
||||||
wrap: "off",
|
wrap: "off",
|
||||||
spellcheck: "false",
|
spellcheck: "false",
|
||||||
xrows: 15, cols: 65
|
cols: 65
|
||||||
}),
|
}),
|
||||||
h.button({
|
h.button({
|
||||||
id: "bbl_vid_toggle",
|
id: "bbl_vid_toggle",
|
||||||
|
|
@ -747,6 +748,15 @@ self.kiri.load(api => {
|
||||||
]),
|
]),
|
||||||
h.div({ class: "grow" }),
|
h.div({ class: "grow" }),
|
||||||
h.div({ class: "f-row gap3 f-grow" }, [
|
h.div({ class: "f-row gap3 f-grow" }, [
|
||||||
|
h.button({
|
||||||
|
_: 'delete',
|
||||||
|
id: "bbl_file_delete",
|
||||||
|
class: "f-col a-center t-center",
|
||||||
|
disabled: true,
|
||||||
|
onclick() {
|
||||||
|
console.log({ deleting: selected.file.path });
|
||||||
|
file_delete(selected.file.path);
|
||||||
|
}}),
|
||||||
h.button({
|
h.button({
|
||||||
_: 'print',
|
_: 'print',
|
||||||
id: "bbl_file_print",
|
id: "bbl_file_print",
|
||||||
|
|
@ -757,15 +767,6 @@ self.kiri.load(api => {
|
||||||
file_print(selected.file.path);
|
file_print(selected.file.path);
|
||||||
api.alerts.show(`printing: ${selected.file.path}`,2);
|
api.alerts.show(`printing: ${selected.file.path}`,2);
|
||||||
}}),
|
}}),
|
||||||
h.button({
|
|
||||||
_: 'delete',
|
|
||||||
id: "bbl_file_delete",
|
|
||||||
class: "f-col a-center t-center",
|
|
||||||
disabled: true,
|
|
||||||
onclick() {
|
|
||||||
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" }, [
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue