remove unused icons, roll export dialogs into index.html

This commit is contained in:
Stewart Allen 2024-09-12 10:11:38 -04:00
commit e7fd4b0852
15 changed files with 125 additions and 151 deletions

View file

@ -127,17 +127,18 @@ function exportLaserDialog(data, names) {
);
}
api.ajax("/kiri/output-laser.html", function(html) {
// api.ajax("/kiri/output-laser.html", function(html) {
api.modal.show('xlaser');
let segments = 0;
data.forEach(layer => { segments += layer.length });
ui.print.innerHTML = html;
// ui.print.innerHTML = html;
$('print-filename').value = filename;
$('print-lines').value = util.comma(segments);
$('print-svg').onclick = download_svg;
$('print-dxf').onclick = download_dxf;
$('print-lg').onclick = download_gcode;
api.modal.show('print');
});
// api.modal.show('print');
// });
}
function bindField(field, varname) {
@ -465,8 +466,9 @@ function exportGCodeDialog(gcode, sections, info, names) {
$('output-time').value = [pad(hours),pad(mins),pad(secs)].join(':');
}
fetch("/kiri/output-gcode.html").then(r => r.text()).then(html => {
ui.print.innerHTML = html;
api.modal.show('xany');
// fetch("/kiri/output-gcode.html").then(r => r.text()).then(html => {
// ui.print.innerHTML = html;
let set = api.conf.get();
let fdm = MODE === MODES.FDM;
let octo = set.controller.exportOcto && MODE !== MODES.CAM;
@ -696,8 +698,8 @@ function exportGCodeDialog(gcode, sections, info, names) {
if (preview && gcode) $('code-preview-textarea').value = gcode.substring(0,65535);
// show dialog
api.modal.show('print');
});
// api.modal.show('print');
// });
}
});

View file

@ -1553,7 +1553,9 @@ gapp.register("kiri.init", [], (root, exports) => {
files: $('mod-files'),
saves: $('mod-saves'),
tools: $('mod-tools'),
print: $('mod-print'),
xany: $('mod-x-any'),
xsla: $('mod-x-sla'),
xlaser: $('mod-x-laser'),
local: $('mod-local'),
any: $('mod-any'),

View file

@ -670,7 +670,7 @@ gapp.register("kiri.main", [], (root, exports) => {
visible = modalShowing(),
info = { pct: 0 };
["help","setup","tools","prefs","saves","files","print","local","any"].forEach(function(name) {
["help","setup","tools","prefs","saves","files","xany","xlaser","xsla","local","any"].forEach(name => {
UI[name].style.display = name === which ? 'flex' : '';
});