Merge branch 'dev-4.0-refactor-ui'

This commit is contained in:
Stewart Allen 2024-06-01 16:53:36 -04:00
commit b5924dc134
12 changed files with 179 additions and 304 deletions

View file

@ -1,6 +1,6 @@
{ {
"name": "grid-apps", "name": "grid-apps",
"version": "4.0.7D", "version": "4.0.8D",
"description": "grid.space 3d slice & modeling tools", "description": "grid.space 3d slice & modeling tools",
"author": "Stewart Allen <sa@grid.space>", "author": "Stewart Allen <sa@grid.space>",
"license": "MIT", "license": "MIT",

View file

@ -27,6 +27,7 @@ gapp.register("kiri.init", [], (root, exports) => {
CAM = [MODES.CAM], CAM = [MODES.CAM],
SLA = [MODES.SLA], SLA = [MODES.SLA],
FDM = [MODES.FDM], FDM = [MODES.FDM],
FDM_CAM = [MODES.FDM,MODES.CAM],
FDM_SLA = [MODES.FDM,MODES.SLA], FDM_SLA = [MODES.FDM,MODES.SLA],
FDM_LZR = [MODES.LASER,MODES.FDM], FDM_LZR = [MODES.LASER,MODES.FDM],
FDM_CAM_SLA = [MODES.CAM,MODES.FDM,MODES.SLA], FDM_CAM_SLA = [MODES.CAM,MODES.FDM,MODES.SLA],
@ -274,18 +275,18 @@ gapp.register("kiri.init", [], (root, exports) => {
return active && (active.nodeName === "INPUT" || active.nodeName === "TEXTAREA"); return active && (active.nodeName === "INPUT" || active.nodeName === "TEXTAREA");
} }
function inputTextOK() { // function inputTextOK() {
return DOC.activeElement === ui.deviceName; // return DOC.activeElement === ui.deviceName;
} // }
function textAreaHasFocus() { // function textAreaHasFocus() {
let active = DOC.activeElement; // let active = DOC.activeElement;
return active && active.nodeName === "TEXTAREA"; // return active && active.nodeName === "TEXTAREA";
} // }
function inputSize() { // function inputSize() {
return parseInt(DOC.activeElement.size); // return parseInt(DOC.activeElement.size);
} // }
function cca(c) { function cca(c) {
return c.charCodeAt(0); return c.charCodeAt(0);
@ -784,7 +785,7 @@ gapp.register("kiri.init", [], (root, exports) => {
dev.new = false; dev.new = false;
dev.deviceName = devicename; dev.deviceName = devicename;
ui.deviceName.value = devicename; // ui.deviceName.value = devicename;
ui.deviceBelt.checked = dev.bedBelt; ui.deviceBelt.checked = dev.bedBelt;
ui.deviceRound.checked = dev.bedRound; ui.deviceRound.checked = dev.bedRound;
ui.deviceOrigin.checked = dev.outputOriginCenter || dev.originCenter || dev.bedRound; ui.deviceOrigin.checked = dev.outputOriginCenter || dev.originCenter || dev.bedRound;
@ -802,7 +803,7 @@ gapp.register("kiri.init", [], (root, exports) => {
// disable editing for non-local devices // disable editing for non-local devices
[ [
ui.deviceName, // ui.deviceName,
ui.gcodePre, ui.gcodePre,
ui.gcodePost, ui.gcodePost,
ui.bedDepth, ui.bedDepth,
@ -847,14 +848,19 @@ gapp.register("kiri.init", [], (root, exports) => {
ui.deviceSave.disabled = !local; ui.deviceSave.disabled = !local;
ui.deviceDelete.disabled = !local; ui.deviceDelete.disabled = !local;
ui.deviceRename.disabled = !local;
ui.deviceExport.disabled = !local; ui.deviceExport.disabled = !local;
ui.deviceAdd.style.display = mode === 'SLA' ? 'none' : '';
if (local) { if (local) {
ui.deviceAdd.innerText = "copy"; ui.deviceAdd.innerText = "copy";
ui.deviceDelete.style.display = ''; ui.deviceDelete.style.display = '';
ui.deviceRename.style.display = '';
ui.deviceExport.style.display = ''; ui.deviceExport.style.display = '';
} else { } else {
ui.deviceAdd.innerText = "customize"; ui.deviceAdd.innerText = "customize";
ui.deviceDelete.style.display = 'none'; ui.deviceDelete.style.display = 'none';
ui.deviceRename.style.display = 'none';
ui.deviceExport.style.display = 'none'; ui.deviceExport.style.display = 'none';
} }
ui.deviceAdd.disabled = dev.noclone; ui.deviceAdd.disabled = dev.noclone;
@ -981,9 +987,8 @@ gapp.register("kiri.init", [], (root, exports) => {
space.world.add(deviceImage = mesh); space.world.add(deviceImage = mesh);
} }
function updateDeviceName() { function updateDeviceName(newname) {
let newname = ui.deviceName.value, let selected = api.device.get(),
selected = api.device.get(),
devs = settings().devices; devs = settings().devices;
if (newname !== selected) { if (newname !== selected) {
devs[newname] = devs[selected]; devs[newname] = devs[selected];
@ -1000,8 +1005,7 @@ gapp.register("kiri.init", [], (root, exports) => {
} }
function renderDevices(devices) { function renderDevices(devices) {
let selectedIndex = -1, let selected = api.device.get() || devices[0],
selected = api.device.get(),
features = api.feature, features = api.feature,
devs = settings().devices, devs = settings().devices,
dfilter = typeof(features.device_filter) === 'function' ? features.device_filter : undefined; dfilter = typeof(features.device_filter) === 'function' ? features.device_filter : undefined;
@ -1039,8 +1043,13 @@ gapp.register("kiri.init", [], (root, exports) => {
ui.deviceDelete.onclick = function() { ui.deviceDelete.onclick = function() {
api.function.clear(); api.function.clear();
removeLocalDevice(getSelectedDevice()); removeLocalDevice(getSelectedDevice());
selectDevice(getModeDevices()[0]);
showDevices(); showDevices();
}; };
ui.deviceRename.onclick = function() {
const newname = prompt(`Rename "${selected}`, selected);
if (newname) updateDeviceName(newname);
};
ui.deviceExport.onclick = function(event) { ui.deviceExport.onclick = function(event) {
const record = { const record = {
version: kiri.version, version: kiri.version,
@ -1054,12 +1063,9 @@ gapp.register("kiri.init", [], (root, exports) => {
api.device.export(exp, selected, { event, record }); api.device.export(exp, selected, { event, record });
}; };
ui.deviceList.innerHTML = '';
ui.deviceMy.innerHTML = '';
let incr = 0;
let found = null;
let first = devices[0];
let dedup = {}; let dedup = {};
let list_cdev = [];
let list_mdev = [];
devices.forEach(function(device, index) { devices.forEach(function(device, index) {
// prevent device from appearing twice // prevent device from appearing twice
// such as local name = standard device name // such as local name = standard device name
@ -1068,48 +1074,31 @@ gapp.register("kiri.init", [], (root, exports) => {
} }
dedup[device] = device; dedup[device] = device;
let loc = isLocalDevice(device); let loc = isLocalDevice(device);
// if filter set, use
if (!loc && deviceFilter && device.toLowerCase().indexOf(deviceFilter) < 0) {
return;
}
// allow for device filter feature
if (dfilter && dfilter(device) === false) { if (dfilter && dfilter(device) === false) {
return; return;
} }
if (incr === 0) {
first = device;
}
let opt = DOC.createElement('button');
opt.appendChild(DOC.createTextNode(device.replace(/\./g,' ')));
opt.onclick = function() {
selectDevice(device);
opt.classList.add("selected");
if (found && found !== opt) {
found.classList.remove("selected");
}
found = opt;
api.platform.layout();
};
if (loc) { if (loc) {
ui.deviceMy.appendChild(opt); list_mdev.push(h.option(device));
} else { } else {
ui.deviceList.appendChild(opt); list_cdev.push(h.option(device));
} }
if (device === selected) {
// scroll to highlighted selection
setTimeout(() => ui.deviceList.scrollTop = opt.offsetTop, 0);
opt.classList.add("selected");
selectedIndex = incr;
found = opt;
}
incr++;
}); });
if (selectedIndex >= 0) { let dev_list = $('dev-list');
selectDevice(selected); h.bind(dev_list, [
} else { h.option({ _: '-- My Devices --', disabled: true }),
selectDevice(first); ...list_mdev,
h.option({ _: '-- Stock Devices --', disabled: true }),
...list_cdev
]);
let dev_opts = [...dev_list.options].map(o => o.label);
dev_list.selectedIndex = dev_opts.indexOf(selected);
dev_list.onchange = ev => {
const seldev = dev_list.options[dev_list.selectedIndex];
selectDevice(seldev.label);
api.platform.layout();
} }
selectDevice(selected);
} }
function renderTools() { function renderTools() {
@ -1362,8 +1351,12 @@ gapp.register("kiri.init", [], (root, exports) => {
// not the best way to do this, but main decl of api.show is broken // not the best way to do this, but main decl of api.show is broken
api.show.tools = showTools; api.show.tools = showTools;
function getModeDevices() {
return Object.keys(devices[api.mode.get_lower()]).sort();
}
function updateDeviceList() { function updateDeviceList() {
renderDevices(Object.keys(devices[api.mode.get_lower()]).sort()); renderDevices(getModeDevices());
} }
async function sync_get() { async function sync_get() {
@ -1379,10 +1372,8 @@ gapp.register("kiri.init", [], (root, exports) => {
} }
function _showDevices() { function _showDevices() {
// disable device filter and show devices updateDeviceList();
ui.dev.header.onclick(true);
api.modal.show('setup'); api.modal.show('setup');
ui.deviceList.focus();
} }
function dragOverHandler(evt) { function dragOverHandler(evt) {
@ -1516,7 +1507,7 @@ gapp.register("kiri.init", [], (root, exports) => {
let { event, conf, view, show } = api; let { event, conf, view, show } = api;
let { bound, toInt, toFloat } = uc; let { bound, toInt, toFloat } = uc;
let { newBlank, newButton, newBoolean, newGroup, newInput } = uc; let { newBlank, newButton, newBoolean, newGroup, newInput } = uc;
let { newInput2, newSelect, newText, newRow, newGCode } = uc; let { newSelect, newText, newRow, newGCode } = uc;
event.emit('init.one'); event.emit('init.one');
@ -1624,13 +1615,6 @@ gapp.register("kiri.init", [], (root, exports) => {
speedbar: $('speedbar'), speedbar: $('speedbar'),
context: $('context-menu'), context: $('context-menu'),
// options: {
// // area: $('lt-options'),
// // trash: $('lt-trash'),
// // enable: $('lt-w-enable'),
// // disable: $('lt-w-disable'),
// },
back: $('lt-back'), back: $('lt-back'),
ltsetup: $('lt-setup'), ltsetup: $('lt-setup'),
ltfile: $('lt-file'), ltfile: $('lt-file'),
@ -1638,7 +1622,6 @@ gapp.register("kiri.init", [], (root, exports) => {
ltact: $('lt-start'), ltact: $('lt-start'),
edit: $('lt-tools'), edit: $('lt-tools'),
nozzle: $('menu-nozzle'), nozzle: $('menu-nozzle'),
// render: $('menu-render'),
modal: $('modal'), modal: $('modal'),
modalBox: $('modal-box'), modalBox: $('modal-box'),
@ -1656,10 +1639,9 @@ gapp.register("kiri.init", [], (root, exports) => {
catalogList: $('catalogList'), catalogList: $('catalogList'),
devices: $('devices'), devices: $('devices'),
deviceList: $('device-list'),
deviceMy: $('device-my'),
deviceAdd: $('device-add'), deviceAdd: $('device-add'),
deviceDelete: $('device-del'), deviceDelete: $('device-del'),
deviceRename: $('device-ren'),
deviceExport: $('device-exp'), deviceExport: $('device-exp'),
deviceSave: $('device-save'), deviceSave: $('device-save'),
@ -1715,45 +1697,45 @@ gapp.register("kiri.init", [], (root, exports) => {
/** Device Browser / Editor */ /** Device Browser / Editor */
device: newGroup(LANG.dv_gr_dev, $('device1'), {group:"ddev", inline:true, class:"noshow"}), _____: uc.newDiv({ class: "f-col t-body t-inset", addto: $('dev-config'), set:true }),
deviceName: newInput(LANG.dv_name_s, {title:LANG.dv_name_l, size:"70%", text:true, action:updateDeviceName}), device: newGroup(LANG.dv_gr_dev, null, {group:"ddev", inline:true, class:"noshow"}),
devbed: newRow([ _____: newGroup("workspace", null, {group:"dext", inline:true}),
uc.newLabel(LANG.volume, { class: "grow" }), bedWidth: newInput('X (width)', {title:LANG.dv_bedw_l, convert:toFloat, size:6, units:true, round:2, action:updateDeviceSize}),
uc.newLabel('X'), bedDepth: newInput('Y (depth)', {title:LANG.dv_bedw_l, convert:toFloat, size:6, units:true, round:2, action:updateDeviceSize}),
ui.bedWidth = newInput2({title:LANG.dv_bedw_l, convert:toFloat, size:5, units:true, round:2, action:updateDeviceSize}), maxHeight: newInput('Z (height)', {title:LANG.dv_bedw_l, convert:toFloat, size:6, units:true, round:2, action:updateDeviceSize}),
uc.newLabel('Y'), resolutionX: newInput(LANG.dv_rezx_s, {title:LANG.dv_rezx_l, convert:toInt, size:6, modes:SLA}),
ui.bedDepth = newInput2({title:LANG.dv_bedd_l, convert:toFloat, size:5, units:true, round:2, action:updateDeviceSize}), resolutionY: newInput(LANG.dv_rezy_s, {title:LANG.dv_rezy_l, convert:toInt, size:6, modes:SLA}),
uc.newLabel('Z'), _____: uc.newDiv({ class: "f-col t-body t-inset", addto: $('dev-config'), set:true, modes:GCODE }),
ui.maxHeight = newInput2({title:LANG.dv_bedh_l, convert:toFloat, size:5, modes:FDM_SLA, action:updateDeviceSize}), _____: newGroup("firmware", null, {group:"dext", inline:true}),
], { class: "var-area" }), fwRetract: newBoolean(LANG.dv_retr_s, onBooleanClick, {title:LANG.dv_retr_l, modes:FDM}),
deviceOrigin: newBoolean(LANG.dv_orgc_s, onBooleanClick, {title:LANG.dv_orgc_l, modes:FDM_LZR, show:() => !ui.deviceRound.checked}),
resolutionX: newInput(LANG.dv_rezx_s, {title:LANG.dv_rezx_l, convert:toInt, size:5, modes:SLA}), deviceRound: newBoolean(LANG.dv_bedc_s, onBooleanClick, {title:LANG.dv_bedc_l, modes:FDM, trigger:true, show:isNotBelt}),
resolutionY: newInput(LANG.dv_rezy_s, {title:LANG.dv_rezy_l, convert:toInt, size:5, modes:SLA}), deviceBelt: newBoolean(LANG.dv_belt_s, onBooleanClick, {title:LANG.dv_belt_l, modes:FDM, trigger:true, show:() => !ui.deviceRound.checked}),
separator: newBlank({class:"pop-sep", modes:FDM, driven:true}),
spindleMax: newInput(LANG.dv_spmx_s, {title:LANG.dv_spmx_l, convert:toInt, size:5, modes:CAM, trigger:1}), spindleMax: newInput(LANG.dv_spmx_s, {title:LANG.dv_spmx_l, convert:toInt, size:5, modes:CAM, trigger:1}),
deviceZMax: newInput(LANG.dv_zmax_s, {title:LANG.dv_zmax_l, convert:toInt, size:5, modes:FDM}), deviceZMax: newInput(LANG.dv_zmax_s, {title:LANG.dv_zmax_l, convert:toInt, size:5, modes:FDM}),
gcodeTime: newInput(LANG.dv_time_s, {title:LANG.dv_time_l, convert:toFloat, size:5, modes:FDM}), gcodeTime: newInput(LANG.dv_time_s, {title:LANG.dv_time_l, convert:toFloat, size:5, modes:FDM}),
separator: newBlank({class:"pop-sep", modes:FDM}), filamentSource: newSelect(LANG.dv_fsrc_s, {title: LANG.dv_fsrc_l, action: filamentSourceSave, modes:FDM, show:() => false}, "filasrc"),
filamentSource: newSelect(LANG.dv_fsrc_s, {title: LANG.dv_fsrc_l, action: filamentSourceSave, modes:FDM}, "filasrc"), _____: uc.newDiv({ class: "f-col t-body t-inset", addto: $('dev-config'), set:true, modes:FDM }),
fwRetract: newBoolean(LANG.dv_retr_s, onBooleanClick, {title:LANG.dv_retr_l, modes:FDM}), extruder: newGroup(LANG.dv_gr_ext, null, {group:"dext", inline:true}),
deviceOrigin: newBoolean(LANG.dv_orgc_s, onBooleanClick, {title:LANG.dv_orgc_l, modes:FDM_LZR, show:() => !ui.deviceRound.checked}),
deviceRound: newBoolean(LANG.dv_bedc_s, onBooleanClick, {title:LANG.dv_bedc_l, trigger:true, show:isNotBelt}),
deviceBelt: newBoolean(LANG.dv_belt_s, onBooleanClick, {title:LANG.dv_belt_l, trigger:true, show:() => !ui.deviceRound.checked}),
extruder: newGroup(LANG.dv_gr_ext, $('device2'), {group:"dext", inline:true, modes:FDM}),
extFilament: newInput(LANG.dv_fila_s, {title:LANG.dv_fila_l, convert:toFloat, modes:FDM}), extFilament: newInput(LANG.dv_fila_s, {title:LANG.dv_fila_l, convert:toFloat, modes:FDM}),
extNozzle: newInput(LANG.dv_nozl_s, {title:LANG.dv_nozl_l, convert:toFloat, modes:FDM}), extNozzle: newInput(LANG.dv_nozl_s, {title:LANG.dv_nozl_l, convert:toFloat, modes:FDM}),
extOffsetX: newInput(LANG.dv_exox_s, {title:LANG.dv_exox_l, convert:toFloat, modes:FDM}), extOffsetX: newInput(LANG.dv_exox_s, {title:LANG.dv_exox_l, convert:toFloat, modes:FDM}),
extOffsetY: newInput(LANG.dv_exoy_s, {title:LANG.dv_exoy_l, convert:toFloat, modes:FDM}), extOffsetY: newInput(LANG.dv_exoy_s, {title:LANG.dv_exoy_l, convert:toFloat, modes:FDM}),
extSelect: newText(LANG.dv_exts_s, {title:LANG.dv_exts_l, size:14, height:3, area:gcode}), _____: uc.newDiv({ class: "f-col t-body t-inset", addto: $('dev-config'), set:true, modes:GCODE }),
extDeselect: newText(LANG.dv_dext_s, {title:LANG.dv_dext_l, size:14, height:3, area:gcode}), _____: newGroup(LANG.dv_gr_too, null, {group:"dext", inline:true}),
extSelect: newText(LANG.dv_exts_s, {title:LANG.dv_exts_l, size:14, height:3, area:gcode, modes:GCODE}),
extDeselect: newText(LANG.dv_dext_s, {title:LANG.dv_dext_l, size:14, height:3, area:gcode, modes:GCODE}),
extPad: newBlank({class:"grow", modes:FDM}), extPad: newBlank({class:"grow", modes:FDM}),
extActions: newRow([ extActions: newRow([
ui.extPrev = newButton(undefined, undefined, {icon:'<i class="fas fa-less-than"></i>'}), ui.extPrev = newButton(undefined, undefined, {icon:'<i class="fas fa-less-than"></i>'}),
ui.extAdd = newButton(undefined, undefined, {icon:'<i class="fas fa-plus"></i>'}), ui.extAdd = newButton(undefined, undefined, {icon:'<i class="fas fa-plus"></i>'}),
ui.extDel = newButton(undefined, undefined, {icon:'<i class="fas fa-minus"></i>'}), ui.extDel = newButton(undefined, undefined, {icon:'<i class="fas fa-minus"></i>'}),
ui.extNext = newButton(undefined, undefined, {icon:'<i class="fas fa-greater-than"></i>'}) ui.extNext = newButton(undefined, undefined, {icon:'<i class="fas fa-greater-than"></i>'})
], {class:"dev-buttons ext-buttons"}), ], {class:"dev-buttons ext-buttons", modes:FDM}),
palette: newGroup(LANG.dv_gr_pal, $('palette3'), {group:"dext2", inline:true, modes:FDM}), _____: uc.newDiv({ class: "f-col t-body t-inset", addto: $('dev-config'), set:true, modes:FDM, show: () => false && ui.filamentSource.selectedOptions[0].value === 'palette3' }),
palette: newGroup(LANG.dv_gr_pal, null, {group:"dext2", inline:true, modes:FDM}),
paletteId: newInput(LANG.dv_paid_s, {title:LANG.dv_paid_l, modes:FDM, size:15, text:true}), paletteId: newInput(LANG.dv_paid_s, {title:LANG.dv_paid_l, modes:FDM, size:15, text:true}),
palettePing: newInput(LANG.dv_paps_s, {title:LANG.dv_paps_l, modes:FDM, convert:toInt}), palettePing: newInput(LANG.dv_paps_s, {title:LANG.dv_paps_l, modes:FDM, convert:toInt}),
paletteFeed: newInput(LANG.dv_pafe_s, {title:LANG.dv_pafe_l, modes:FDM, convert:toInt}), paletteFeed: newInput(LANG.dv_pafe_s, {title:LANG.dv_pafe_l, modes:FDM, convert:toInt}),
@ -1763,7 +1745,8 @@ gapp.register("kiri.init", [], (root, exports) => {
paletteHeat: newInput(LANG.dv_pahe_s, {title:LANG.dv_pahe_l, modes:FDM, convert:toInt}), paletteHeat: newInput(LANG.dv_pahe_s, {title:LANG.dv_pahe_l, modes:FDM, convert:toInt}),
paletteCool: newInput(LANG.dv_paco_s, {title:LANG.dv_paco_l, modes:FDM, convert:toInt}), paletteCool: newInput(LANG.dv_paco_s, {title:LANG.dv_paco_l, modes:FDM, convert:toInt}),
palettePress: newInput(LANG.dv_pacm_s, {title:LANG.dv_pacm_l, modes:FDM, convert:toInt}), palettePress: newInput(LANG.dv_pacm_s, {title:LANG.dv_pacm_l, modes:FDM, convert:toInt}),
gcode: newGroup(LANG.dv_gr_out, $('device2'), {group:"dgco", inline:true, modes:CAM_LZR}), _____: uc.newDiv({ class: "f-col t-body t-inset", addto: $('dev-config'), set:true, modes:CAM_LZR }),
_____: newGroup(LANG.dv_gr_out, null, {group:"dgco", inline:true}),
gcodeStrip: newBoolean(LANG.dv_strc_s, onBooleanClick, {title:LANG.dv_strc_l, modes:CAM}), gcodeStrip: newBoolean(LANG.dv_strc_s, onBooleanClick, {title:LANG.dv_strc_l, modes:CAM}),
gcodeSpace: newBoolean(LANG.dv_tksp_s, onBooleanClick, {title:LANG.dv_tksp_l, modes:CAM_LZR}), gcodeSpace: newBoolean(LANG.dv_tksp_s, onBooleanClick, {title:LANG.dv_tksp_l, modes:CAM_LZR}),
useLaser: newBoolean(LANG.dv_lazr_s, onBooleanClick, {title:LANG.dv_lazr_l, modes:CAM}), useLaser: newBoolean(LANG.dv_lazr_s, onBooleanClick, {title:LANG.dv_lazr_l, modes:CAM}),
@ -1785,13 +1768,13 @@ gapp.register("kiri.init", [], (root, exports) => {
/** Preferences Menu */ /** Preferences Menu */
lprefs: newGroup(LANG.op_menu, $('prefs-gen1'), {inline: true}), _____: newGroup(LANG.op_menu, $('prefs-gen1'), {inline: true}),
antiAlias: newBoolean(LANG.op_anta_s, booleanSave, {title:LANG.op_anta_l}), antiAlias: newBoolean(LANG.op_anta_s, booleanSave, {title:LANG.op_anta_l}),
reverseZoom: newBoolean(LANG.op_invr_s, booleanSave, {title:LANG.op_invr_l}), reverseZoom: newBoolean(LANG.op_invr_s, booleanSave, {title:LANG.op_invr_l}),
ortho: newBoolean(LANG.op_orth_s, booleanSave, {title:LANG.op_orth_l}), ortho: newBoolean(LANG.op_orth_s, booleanSave, {title:LANG.op_orth_l}),
dark: newBoolean(LANG.op_dark_s, booleanSave, {title:LANG.op_dark_l}), dark: newBoolean(LANG.op_dark_s, booleanSave, {title:LANG.op_dark_l}),
devel: newBoolean(LANG.op_devl_s, booleanSave, {title:LANG.op_devl_l}), devel: newBoolean(LANG.op_devl_s, booleanSave, {title:LANG.op_devl_l}),
lprefs: newGroup(LANG.op_disp, $('prefs-gen2'), {inline: true}), _____: newGroup(LANG.op_disp, $('prefs-gen2'), {inline: true}),
showOrigin: newBoolean(LANG.op_shor_s, booleanSave, {title:LANG.op_shor_l}), showOrigin: newBoolean(LANG.op_shor_s, booleanSave, {title:LANG.op_shor_l}),
showRulers: newBoolean(LANG.op_shru_s, booleanSave, {title:LANG.op_shru_l}), showRulers: newBoolean(LANG.op_shru_s, booleanSave, {title:LANG.op_shru_l}),
showSpeeds: newBoolean(LANG.op_sped_s, speedSave, {title:LANG.op_sped_l}), showSpeeds: newBoolean(LANG.op_sped_s, speedSave, {title:LANG.op_sped_l}),
@ -1799,20 +1782,20 @@ gapp.register("kiri.init", [], (root, exports) => {
shiny: newBoolean(LANG.op_shny_s, booleanSave, {title:LANG.op_shny_l, modes:FDM}), shiny: newBoolean(LANG.op_shny_s, booleanSave, {title:LANG.op_shny_l, modes:FDM}),
lineType: newSelect(LANG.op_line_s, {title: LANG.op_line_l, action: lineTypeSave, modes:FDM}, "linetype"), lineType: newSelect(LANG.op_line_s, {title: LANG.op_line_l, action: lineTypeSave, modes:FDM}, "linetype"),
animesh: newSelect(LANG.op_anim_s, {title: LANG.op_anim_l, action: aniMeshSave, modes:CAM}, "animesh"), animesh: newSelect(LANG.op_anim_s, {title: LANG.op_anim_l, action: aniMeshSave, modes:CAM}, "animesh"),
units: newSelect(LANG.op_unit_s, {title: LANG.op_unit_l, action: unitsSave, modes:CAM, trace:false}, "units"), units: newSelect(LANG.op_unit_s, {title: LANG.op_unit_l, action: unitsSave, modes:CAM}, "units"),
layout: newGroup(LANG.lo_menu, $('prefs-lay'), {inline: true}), _____: newGroup(LANG.lo_menu, $('prefs-lay'), {inline: true}),
autoSave: newBoolean(LANG.op_save_s, booleanSave, {title:LANG.op_save_l}), autoSave: newBoolean(LANG.op_save_s, booleanSave, {title:LANG.op_save_l}),
autoLayout: newBoolean(LANG.op_auto_s, booleanSave, {title:LANG.op_auto_l}), autoLayout: newBoolean(LANG.op_auto_s, booleanSave, {title:LANG.op_auto_l}),
freeLayout: newBoolean(LANG.op_free_s, booleanSave, {title:LANG.op_free_l}), freeLayout: newBoolean(LANG.op_free_s, booleanSave, {title:LANG.op_free_l}),
spaceRandoX: newBoolean(LANG.op_spcx_s, booleanSave, {title:LANG.op_spcx_l, show:isBelt}), spaceRandoX: newBoolean(LANG.op_spcx_s, booleanSave, {title:LANG.op_spcx_l, show:isBelt}),
spaceLayout: newInput(LANG.op_spcr_s, {title:LANG.op_spcr_l, convert:toFloat, size:3, units:true}), spaceLayout: newInput(LANG.op_spcr_s, {title:LANG.op_spcr_l, convert:toFloat, size:3, units:true}),
export: newGroup(LANG.xp_menu, $('prefs-xpo'), {inline: true}), _____: newGroup(LANG.xp_menu, $('prefs-xpo'), {inline: true}),
exportLocal: newBoolean(`Grid:Local`, booleanSave, {title:LANG.op_exgl_l}), exportLocal: newBoolean(`Grid:Local`, booleanSave, {title:LANG.op_exgl_l}),
exportGhost: newBoolean(`Grid:Host`, booleanSave, {title:LANG.op_exgh_l}), exportGhost: newBoolean(`Grid:Host`, booleanSave, {title:LANG.op_exgh_l}),
exportOcto: newBoolean(`OctoPrint`, booleanSave, {title:LANG.op_exop_l}), exportOcto: newBoolean(`OctoPrint`, booleanSave, {title:LANG.op_exop_l}),
exportThumb: newBoolean(`Thumbnail`, booleanSave, {modes:FDM}), exportThumb: newBoolean(`Thumbnail`, booleanSave, {modes:FDM}),
exportPreview: newBoolean(`Code Preview`, booleanSave), exportPreview: newBoolean(`Code Preview`, booleanSave),
parts: newGroup(LANG.pt_menu, $('prefs-prt'), {inline: true}), _____: newGroup(LANG.pt_menu, $('prefs-prt'), {inline: true}),
detail: newSelect(LANG.pt_qual_s, {title: LANG.pt_qual_l, action: detailSave}, "detail"), detail: newSelect(LANG.pt_qual_s, {title: LANG.pt_qual_l, action: detailSave}, "detail"),
healMesh: newBoolean(LANG.pt_heal_s, booleanSave, {title: LANG.pt_heal_l}), healMesh: newBoolean(LANG.pt_heal_s, booleanSave, {title: LANG.pt_heal_l}),
threaded: newBoolean(LANG.pt_thrd_s, booleanSave, {title: LANG.pt_thrd_l, modes:FDM_CAM_SLA}), threaded: newBoolean(LANG.pt_thrd_s, booleanSave, {title: LANG.pt_thrd_l, modes:FDM_CAM_SLA}),
@ -1960,7 +1943,7 @@ gapp.register("kiri.init", [], (root, exports) => {
camStockIndexed: newBoolean(LANG.cs_indx_s, onBooleanClick, {title:LANG.cs_indx_l}), camStockIndexed: newBoolean(LANG.cs_indx_s, onBooleanClick, {title:LANG.cs_indx_l}),
camStockIndexGrid: newBoolean(LANG.cs_ishg_s, onBooleanClick, {title:LANG.cs_ishg_l, show:() => ui.camStockIndexed.checked}), camStockIndexGrid: newBoolean(LANG.cs_ishg_s, onBooleanClick, {title:LANG.cs_ishg_l, show:() => ui.camStockIndexed.checked}),
camLimits: newGroup(LANG.cc_menu, $('cam-limits'), { modes:CAM, driven, separator }), camLimits: newGroup(LANG.cc_menu, $('cam-limits'), { modes:CAM, driven, separator }),
camZAnchor: newSelect(LANG.ou_zanc_s, {title: LANG.ou_zanc_l, action:zAnchorSave, trace:false, show:() => !ui.camStockIndexed.checked}, "zanchor"), camZAnchor: newSelect(LANG.ou_zanc_s, {title: LANG.ou_zanc_l, action:zAnchorSave, show:() => !ui.camStockIndexed.checked}, "zanchor"),
camZOffset: newInput(LANG.ou_ztof_s, {title:LANG.ou_ztof_l, convert:toFloat, units:true}), camZOffset: newInput(LANG.ou_ztof_s, {title:LANG.ou_ztof_l, convert:toFloat, units:true}),
camZBottom: newInput(LANG.ou_zbot_s, {title:LANG.ou_zbot_l, convert:toFloat, units:true, trigger: true}), camZBottom: newInput(LANG.ou_zbot_s, {title:LANG.ou_zbot_l, convert:toFloat, units:true, trigger: true}),
camZThru: newInput(LANG.ou_ztru_s, {title:LANG.ou_ztru_l, convert:toFloat, bound:bound(0.0,100), units:true, show:() => { return ui.camZBottom.value == 0 }}), camZThru: newInput(LANG.ou_ztru_s, {title:LANG.ou_ztru_l, convert:toFloat, bound:bound(0.0,100), units:true, show:() => { return ui.camZBottom.value == 0 }}),
@ -2190,30 +2173,6 @@ gapp.register("kiri.init", [], (root, exports) => {
if (!ev.buttons) api.event.emit('slider.unlabel'); if (!ev.buttons) api.event.emit('slider.unlabel');
}; };
ui.dev.header.onclick = (hide) => {
let style = ui.dev.filter.style;
if (style.display === 'flex' || hide === true) {
style.display = '';
deviceFilter = null;
updateDeviceList();
} else {
style.display = 'flex';
ui.dev.filter.focus();
deviceFilter = ui.dev.filter.value.toLowerCase();
updateDeviceList();
}
};
ui.dev.filter.onkeyup = (ev) => {
deviceFilter = ui.dev.filter.value.toLowerCase();
updateDeviceList();
};
ui.dev.filter.onclick = (ev) => {
ev.preventDefault();
ev.stopPropagation();
};
api.event.on('slider.unlabel', (values) => { api.event.on('slider.unlabel', (values) => {
}); });
@ -2432,14 +2391,6 @@ gapp.register("kiri.init", [], (root, exports) => {
return lbl; return lbl;
} }
// for (let mode of ["fdm","sla","cam","laser"]) {
// if (api.feature.modes.indexOf(mode) >= 0) {
// $(`mode-${mode}`).appendChild(mksvg(icons[mode]));
// } else {
// $(`mode-${mode}`).style.display = 'none';
// }
// }
api.platform.update_size(); api.platform.update_size();
function mouseOnHover(int, event, ints) { function mouseOnHover(int, event, ints) {
@ -2684,9 +2635,6 @@ gapp.register("kiri.init", [], (root, exports) => {
// fill device list // fill device list
updateDeviceList(); updateDeviceList();
// ensure settings has gcode
selectDevice(DEVNAME || api.device.get());
// update ui fields from settings // update ui fields from settings
api.conf.update_fields(); api.conf.update_fields();
@ -2751,6 +2699,8 @@ gapp.register("kiri.init", [], (root, exports) => {
// bind interface action elements // bind interface action elements
$('app-name').onclick = api.help.show; $('app-name').onclick = api.help.show;
$('mode-device').onclick = showDevices;
$('mode-profile').onclick = settingsLoad;
$('mode-fdm').onclick = () => api.mode.set('FDM'); $('mode-fdm').onclick = () => api.mode.set('FDM');
$('mode-cam').onclick = () => api.mode.set('CAM'); $('mode-cam').onclick = () => api.mode.set('CAM');
$('mode-sla').onclick = () => api.mode.set('SLA'); $('mode-sla').onclick = () => api.mode.set('SLA');

View file

@ -908,6 +908,8 @@ gapp.register("kiri.main", [], (root, exports) => {
options.selectedIndex = optlist.indexOf(mode); options.selectedIndex = optlist.indexOf(mode);
modename.onchange = (ev) => setMode(optlist[options.selectedIndex]); modename.onchange = (ev) => setMode(optlist[options.selectedIndex]);
} }
// gcode edit area for any non-SLA mode
api.uc.setVisible($('gcode-edit'), mode !== 'SLA');
// highlight selected mode menu item // highlight selected mode menu item
["FDM","CAM","SLA","LASER"].forEach(sm => { ["FDM","CAM","SLA","LASER"].forEach(sm => {
const cl = $(`mode-${sm.toLowerCase()}`).classList; const cl = $(`mode-${sm.toLowerCase()}`).classList;

View file

@ -566,7 +566,6 @@ function platformChanged() {
h.bind($('ws-widgets'), api.widgets.all().map(w => { h.bind($('ws-widgets'), api.widgets.all().map(w => {
let color; let color;
return [ return [
h.div([ h.div([
h.button({ h.button({
@ -585,12 +584,10 @@ function platformChanged() {
color = w.getColor(); color = w.getColor();
} }
}), }),
h.button( h.button(
{ onclick() { platformDelete(w) } }, { onclick() { platformDelete(w) } },
[ h.i({ class:"fas fa-trash" }), ] [ h.i({ class:"fas fa-trash" }), ]
) )
]) ])
] ]
})); }));

View file

@ -56,11 +56,11 @@ gapp.register("kiri.ui", [], (root, exports) => {
newBoolean, newBoolean,
newButton, newButton,
newBlank, newBlank,
newDiv,
newGCode, newGCode,
newGroup, newGroup,
newLabel, newLabel,
newInput, newInput,
newInput2,
newRange, newRange,
newRow, newRow,
newSelect, newSelect,
@ -333,23 +333,23 @@ gapp.register("kiri.ui", [], (root, exports) => {
try { try {
return fn(); return fn();
} catch (e) { } catch (e) {
return true; // console.log({ safecall_error: e });
return false;
} }
} }
function addModeControls(el, opt = {}) { function addModeControls(el, opt = {}) {
if (opt.trace2) {
console.log({ AMC: el, opt, groupName });
}
el.__opt = opt; el.__opt = opt;
el.showMe = function() { el.showMe = function() {
if (opt.trace) console.log({ showMe: el });
el.classList.remove('hide'); el.classList.remove('hide');
}; };
el.hideMe = function() { el.hideMe = function() {
if (opt.trace) console.log({ hideMe: el });
el.classList.add('hide'); el.classList.add('hide');
}; };
el.setVisible = function(show) { el.setVisible = function(show) {
if (opt.trace2) console.log({ setVisible: show, el }); if (opt.trace) console.log({ setVisible: show });
if (show) el.showMe(); if (show) el.showMe();
else el.hideMe(); else el.hideMe();
}; };
@ -357,8 +357,10 @@ gapp.register("kiri.ui", [], (root, exports) => {
let xprt = opt.expert === undefined || (opt.expert === lastExpert); let xprt = opt.expert === undefined || (opt.expert === lastExpert);
let show = opt.show ? safecall(opt.show) : true; let show = opt.show ? safecall(opt.show) : true;
let disp = opt.visible ? opt.visible() : true; let disp = opt.visible ? opt.visible() : true;
if (opt.trace2) console.log({ setMode: el, mode, modes: el.modes, xprt, show, disp, fn: el.__opt.show }); let hmod = el.hasMode(mode);
el.setVisible(el.hasMode(mode) && show && xprt && disp); if (opt.trace) console.log({ setMode: mode, xprt, show, disp, hmod, modes:el.modes });
if (opt.manual) return;
el.setVisible(hmod && show && xprt && disp);
} }
el.hasMode = function(mode) { el.hasMode = function(mode) {
return el.modes.length === 0 || el.modes.contains(mode); return el.modes.length === 0 || el.modes.contains(mode);
@ -370,8 +372,10 @@ gapp.register("kiri.ui", [], (root, exports) => {
function newDiv(opt = {}) { function newDiv(opt = {}) {
let div = DOC.createElement('div'); let div = DOC.createElement('div');
addModeControls(div, opt); addModeControls(div, opt);
addTo.appendChild(div); (opt.addto || addTo).appendChild(div);
lastGroup.push(div); if (opt.addto) lastDiv = addTo = div;
if (opt.addto && opt.class) div.setAttribute('class', opt.class);
lastGroup?.push(div);
div._group = groupName; div._group = groupName;
return div; return div;
} }
@ -431,6 +435,7 @@ gapp.register("kiri.ui", [], (root, exports) => {
cols = Math.max(cols, row.length); cols = Math.max(cols, row.length);
}); });
txt.setAttribute("cols", Math.max(30, cols + 1)); txt.setAttribute("cols", Math.max(30, cols + 1));
txt.setAttribute("rows", 6);
let showing = btn === lastBtn; let showing = btn === lastBtn;
hidePop(); hidePop();
@ -611,74 +616,6 @@ gapp.register("kiri.ui", [], (root, exports) => {
return ip; return ip;
} }
function newInput2(opt = {}) {
let hide = opt.hide,
size = opt.size || 5,
height = opt.height || 0,
ip = height > 1 ? DOC.createElement('textarea') : DOC.createElement('input'),
action = opt.action || bindTo || inputAction;
ip.setAttribute("class", "var-input");
if (Number.isInteger(size)) {
ip.setAttribute("size", size);
} else {
ip.setAttribute("style", `width:${size}`);
}
ip.setAttribute("type", "text");
ip.setAttribute("spellcheck", "false");
if (opt.disabled) ip.setAttribute("disabled", "true");
if (opt.title) ip.setAttribute("title", opt.title);
if (opt.convert) ip.convert = opt.convert.bind(ip);
if (opt.bound) ip.bound = opt.bound;
if (opt.action) action = opt.action;
ip.addEventListener('focus', function(event) {
hidePop();
setSticky(true);
});
if (action) {
ip.addEventListener('keydown', function(event) {
let key = event.key;
if (
opt.text ||
(key >= '0' && key <= '9') ||
key === '.' ||
key === '-' ||
key === 'Backspace' ||
key === 'Delete' ||
key === 'ArrowLeft' ||
key === 'ArrowRight' ||
key === 'Tab' ||
event.metaKey ||
event.ctrlKey ||
(key === ',' && opt.comma)
) {
return;
}
event.preventDefault();
event.stopPropagation();
});
ip.addEventListener('keyup', function(event) {
if (event.keyCode === 13) {
ip.blur();
}
});
ip.addEventListener('blur', function(event) {
setSticky(false);
lastChange = ip;
action(event);
if (opt.trigger) {
refresh();
}
});
if (opt.units) {
addUnits(ip, opt.round || 3);
}
}
if (!ip.convert) ip.convert = raw.bind(ip);
return ip;
}
function addUnits(input, round) { function addUnits(input, round) {
setters.push(input); setters.push(input);
input.setv = function(value) { input.setv = function(value) {

View file

@ -15,7 +15,7 @@ gapp.main("main.kiri", [], (root) => {
const modfns = root.kirimod = ( root.kirimod || [] ); const modfns = root.kirimod = ( root.kirimod || [] );
const kiri = root.kiri = { const kiri = root.kiri = {
beta: 4007, beta: 4008,
driver: {}, // driver modules driver: {}, // driver modules
load(fn) { load(fn) {
modfns.push(fn); modfns.push(fn);

View file

@ -5,7 +5,7 @@
let terms = { let terms = {
COPYRIGHT: "Copyright (C) Stewart Allen <sa@grid.space> - All Rights Reserved", COPYRIGHT: "Copyright (C) Stewart Allen <sa@grid.space> - All Rights Reserved",
LICENSE: "See the license.md file included with the source distribution", LICENSE: "See the license.md file included with the source distribution",
VERSION: (is_self ? self : this).debug_version || "4.0.D7" VERSION: (is_self ? self : this).debug_version || "4.0.D8"
}; };
if (typeof(module) === 'object') { if (typeof(module) === 'object') {

View file

@ -133,7 +133,10 @@ gapp.overlay(root, {
}); });
// add common element types // add common element types
["a", "i", "hr", "div", "span", "label", "input", "button", "svg", "textarea"].forEach(type => { [
"a", "i", "hr", "div", "span", "label", "input",
"button", "svg", "textarea", "select", "option"
].forEach(type => {
h[type] = (attr, innr) => { h[type] = (attr, innr) => {
return h.el(type, attr, innr); return h.el(type, attr, innr);
} }

View file

@ -123,7 +123,7 @@ input:focus {
input[disabled] { input[disabled] {
background-color: #ddd; background-color: #ddd;
color: #000; color: #000;
border-width: 1px; /* border-width: 1px; */
} }
input[type="range"] { input[type="range"] {
width: 85px; width: 85px;
@ -439,6 +439,9 @@ th, tr, td, label {
.grow { .grow {
flex-grow: 1; flex-grow: 1;
} }
.shrink0 {
flex-shrink: 0;
}
.a-start { .a-start {
align-items: flex-start; align-items: flex-start;
} }
@ -690,7 +693,7 @@ th, tr, td, label {
align-items: center; align-items: center;
} }
#ws-widgets button.selected { #ws-widgets button.selected {
background-color: var(--blue-4); background-color: var(--blue-3);
color: #000; color: #000;
} }
.slim-hide { .slim-hide {
@ -1229,7 +1232,6 @@ th, tr, td, label {
display: none; display: none;
padding: 10px; padding: 10px;
min-height: 20px; min-height: 20px;
font-size: smaller;
background-color: #fff; background-color: #fff;
} }
@ -1243,16 +1245,27 @@ th, tr, td, label {
max-height: 350px; max-height: 350px;
} }
#mod-x { #mod-x {
border-radius: 5px;
border: 2px solid rgba(255,255,255,0.5);
background-color: rgba(255,255,255,0.5);
position: absolute; position: absolute;
z-index: 30; z-index: 30;
bottom: -20px; bottom: -20px;
right: 5px; right: 0;
}
#mod-x svg {
aspect-ratio: 1 / 1 !important;
} }
#mod-setup { #mod-setup {
height: 550px; min-height: 550px;
width: 725px; max-height: 60%;
min-width: 725px;
max-width: 70%;
padding-bottom: 5px; padding-bottom: 5px;
} }
#mod-setup textarea {
border-radius: 3px;
}
#mod-setup .header { #mod-setup .header {
text-align: center; text-align: center;
border-bottom: 1px solid rgba(126,153,183,1); border-bottom: 1px solid rgba(126,153,183,1);
@ -1263,33 +1276,12 @@ th, tr, td, label {
#mod-setup .header.sub { #mod-setup .header.sub {
padding-top: 10px; padding-top: 10px;
} }
#dev-search {
position: absolute;
font-size: 10px;
right: 3px;
}
#dev-search:hover {
color: #00f;
}
#dev-filter {
transform: translateY(-7px);
text-align: center;
position: absolute;
display: none;
padding: 1px;
right: 150%;
}
#mod-setup .left { #mod-setup .left {
width: 180px; width: 180px;
padding-right: 10px; padding-right: 10px;
margin-right: 10px; margin-right: 10px;
border-right: 1px solid #ddd; border-right: 1px solid #ddd;
} }
#mod-setup .footer {
padding-top: 5px;
margin-top: 5px;
border-top: 1px solid rgba(150,130,200,0.5);
}
.devlist { .devlist {
background-color: #fdfdfd; background-color: #fdfdfd;
} }
@ -1661,9 +1653,9 @@ th, tr, td, label {
#devices { #devices {
width: 225px; width: 225px;
} }
#device1, #device2, #palette3 { /* #device1, #device2, #palette3 {
width: 225px; width: 225px;
} } */
#palette3 { #palette3 {
display: none; display: none;
} }
@ -1674,7 +1666,7 @@ th, tr, td, label {
width: 100%; width: 100%;
background-color: #f8f8f8; background-color: #f8f8f8;
} }
#device-action, #tool-action { #tool-action {
margin-top: 5px; margin-top: 5px;
} }
#device-action button, #tool-action button { #device-action button, #tool-action button {
@ -1936,6 +1928,16 @@ th, tr, td, label {
.settings .set-header a { .settings .set-header a {
font-size: smaller; font-size: smaller;
} }
#dev-sel {
margin-bottom: 0;
}
#dev-list {
align-self: stretch;
padding: 0 5px 0 5px;
}
#dev-list:hover {
background-color: var(--blue-4);
}
.set2-group { .set2-group {
border-radius: 3px; border-radius: 3px;
border: 1px solid #ddd !important; border: 1px solid #ddd !important;
@ -1944,18 +1946,18 @@ th, tr, td, label {
padding: 4px; padding: 4px;
margin: 3px; margin: 3px;
} }
.set2-group .var-row { .set2-group .var-row, .var-row {
background: #fff; background: #fff;
padding: 1px 4px 1px 4px; padding: 1px 4px 1px 4px;
margin: 0 !important; margin: 0 !important;
border-left: 3px solid transparent; border-left: 3px solid transparent;
border-right: 3px solid transparent; border-right: 3px solid transparent;
} }
.set2-group .var-row:hover { .set2-group .var-row:hover, .var-row:hover {
border-right: 3px solid var(--blue-1); border-right: 3px solid var(--blue-1);
background-color: var(--blue-4) !important; background-color: var(--blue-4) !important;
} }
.set2-group .var-row label { .set2-group .var-row label, #mod-setup .var-row label {
margin-right: 25px; margin-right: 25px;
} }
.set2-sep { .set2-sep {
@ -2048,14 +2050,13 @@ th, tr, td, label {
flex-grow: 1; flex-grow: 1;
font-size: smaller; font-size: smaller;
} }
.var-area { .var-row .dim {
gap: 3px; text-align: right;
}
.var-area label {
padding: 2px 0 2px 0;
font-size: smaller; font-size: smaller;
align-self: center;
justify-self: center;
} }
.var-row input, .var-area input { .var-row input {
margin-right: 0; margin-right: 0;
margin-bottom: 1px; margin-bottom: 1px;
padding-bottom: 1px; padding-bottom: 1px;

View file

@ -172,7 +172,7 @@
<div class="top-menu-drop top-menu-right"> <div class="top-menu-drop top-menu-right">
<div class="content"> <div class="content">
<div id="set-device"> <div id="set-device">
<label lk="machine">machine</label> <label lk="machines">machines</label>
<span><i class="fas fa-cube"></i></span> <span><i class="fas fa-cube"></i></span>
</div> </div>
<div id="set-profs"> <div id="set-profs">
@ -367,49 +367,32 @@
</div> </div>
<!-- device selector / editor --> <!-- device selector / editor -->
<div id="mod-setup" class="mdialog f-row"> <div id="mod-setup" class="mdialog f-col gap3">
<div class="f-col left a-stretch"> <div class="f-row gap4 a-center">
<div id="dev-header" class="header sub f-col j-center"> <label id="dev-sel" class="set-header">select device</label>
<label lk="dm_stdd">standard devices</label> <select id="dev-list"></select>
<div id="dev-search"> <div class="f-row grow j-end">
<i class="fas fa-search"></i> <button id="device-add" lk="copy">copy</button>
<input id="dev-filter"> <button id="device-ren" lk="rename">rename</button>
</div> <button id="device-del" lk="delete">delete</button>
<button id="device-exp" lk="export">export</button>
</div> </div>
<div class="f-col mh0 mh35 j-center a-stretch"> </div>
<div id="device-list" class="devlist f-col overy"></div> <div class="set-sep"></div>
</div> <div class="f-row grow gap4">
<label class="header sub" lk="dm_mydd">my devices</label> <div id="dev-config" class="f-col gap4 overy shrink0"></div>
<div class="f-col grow"> <div class="f-col grow">
<div id="device-my" class="devlist f-col grow overy"></div> <div id="gcode-edit" class="f-col grow gap4">
<div class="f-row footer"> <div id="dg" class="f-col t-body t-inset"></div>
<div class="grow"></div> <div id="dev-gcode" class="grow"></div>
<button id="device-add" lk="copy">copy</button>
<button id="device-del" lk="delete">delete</button>
<button id="device-exp" lk="export">export</button>
<div class="grow"></div>
</div> </div>
</div> </div>
</div> </div>
<div class="f-col grow a-stretch"> <div class="set-sep"></div>
<label class="header" lk="dm_seld">selected device</label> <div id="device-action" class="f-row">
<div class="f-row"> <div class="grow"></div>
<div id="device1" class="f-col t-body t-inset overy grow"></div> <button id="device-save" lk="save">save</button>
<div class="t-pad"></div> <div class="grow"></div>
<div id="device2" class="f-col t-body t-inset overy grow"></div>
<div id="palette3" class="f-col t-body t-inset overy grow"></div>
</div>
<div class="t-pad"></div>
<div id="gcode-edit" class="f-col grow">
<div id="dg" class="f-col t-body t-inset"></div>
<div class="t-pad"></div>
<div id="dev-gcode" class="grow"></div>
</div>
<div id="device-action" class="f-row footer">
<div class="grow"></div>
<button id="device-save" lk="save">save</button>
<div class="grow"></div>
</div>
</div> </div>
</div> </div>

View file

@ -27,7 +27,7 @@ self.kiri.lang['en-us'] = {
import: "import", import: "import",
language: "language", language: "language",
left: "left", left: "left",
machine: "machine", // device or machine machines: "machines", // device or machine
mesh: "mesh", // mesh editing mesh: "mesh", // mesh editing
metric: "metric", metric: "metric",
name: "name", name: "name",
@ -37,6 +37,7 @@ self.kiri.lang['en-us'] = {
prefs: "preferences", // right menu "preferences" prefs: "preferences", // right menu "preferences"
preview: "preview", preview: "preview",
recent: "recent", recent: "recent",
rename: "rename",
render: "render", // left render pop menu render: "render", // left render pop menu
reset: "reset", reset: "reset",
right: "right", right: "right",
@ -95,6 +96,7 @@ self.kiri.lang['en-us'] = {
// DEVICE dialog groups // DEVICE dialog groups
dv_gr_dev: "device", dv_gr_dev: "device",
dv_gr_ext: "extruder", dv_gr_ext: "extruder",
dv_gr_too: "tool macros",
dv_gr_pal: "palette", dv_gr_pal: "palette",
dv_gr_out: "output", dv_gr_out: "output",
dv_gr_gco: "gcode macros", dv_gr_gco: "gcode macros",

View file

@ -1,5 +1,5 @@
{ {
"name": "Kiri:Moto 4.0.D7", "name": "Kiri:Moto 4.0.D8",
"short_name": "Kiri:Moto", "short_name": "Kiri:Moto",
"description": "Slicer for 3D printers, CNC mills, laser cutters and more", "description": "Slicer for 3D printers, CNC mills, laser cutters and more",
"start_url": "/kiri/", "start_url": "/kiri/",