diff --git a/src/kiri/conf.js b/src/kiri/conf.js index 2b43ee00..8941d895 100644 --- a/src/kiri/conf.js +++ b/src/kiri/conf.js @@ -374,6 +374,7 @@ const conf = exports({ outputAlternating: false, outputLayerRetract: false, outputOriginCenter: true, + outputNozzle: 0, outputLoops: 0, outputInvertX: false, outputInvertY: false, diff --git a/src/kiri/init.js b/src/kiri/init.js index 9930a497..48eabd3d 100644 --- a/src/kiri/init.js +++ b/src/kiri/init.js @@ -795,33 +795,6 @@ gapp.register("kiri.init", [], (root, exports) => { ui.fwRetract.checked = dev.fwRetract; if (!dev.filamentSource) ui.filamentSource.selectedIndex = 0; - // add extruder selection buttons - if (dev.extruders) { - for (let ext of dev.extruders) { - // add missing deselect field from legacy configs - if (!ext.extDeselect) { - ext.extDeselect = []; - } - } - let ext = api.lists.extruders = []; - dev.internal = 0; - let selext = $('pop-nozzle'); - selext.innerHTML = ''; - for (let i=0; iextruder ${i}`; - d.setAttribute('id', `sel-ext-${i}`); - d.onclick = function() { - api.selection.for_widgets(w => { - api.widgets.annotate(w.id).extruder = i; - }); - api.platform.update_selected(); - }; - selext.appendChild(d); - ext.push({id:i, name:i}); - } - } - // disable editing for non-local devices [ ui.deviceName, @@ -1646,12 +1619,12 @@ gapp.register("kiri.init", [], (root, exports) => { speedbar: $('speedbar'), context: $('context-menu'), - options: { - // area: $('lt-options'), - trash: $('lt-trash'), - enable: $('lt-w-enable'), - disable: $('lt-w-disable'), - }, + // options: { + // // area: $('lt-options'), + // // trash: $('lt-trash'), + // // enable: $('lt-w-enable'), + // // disable: $('lt-w-disable'), + // }, back: $('lt-back'), ltsetup: $('lt-setup'), @@ -1854,41 +1827,19 @@ gapp.register("kiri.init", [], (root, exports) => { _____: newGroup(LANG.sw_menu, $('fdm-walls'), { modes:FDM, driven, separator }), sliceShells: newInput(LANG.sl_shel_s, { title:LANG.sl_shel_l, convert:toFloat }), sliceLineWidth: newInput(LANG.sl_line_s, { title:LANG.sl_line_l, convert:toFloat, bound:bound(0,5) }), - sliceShellOrder: newSelect(LANG.sl_ordr_s, {title:LANG.sl_ordr_l}, "shell"), + separator: newBlank({ class:"set-sep", driven }), + sliceShellOrder: newSelect(LANG.sl_ordr_s, { title:LANG.sl_ordr_l}, "shell"), sliceDetectThin: newSelect(LANG.ad_thin_s, { title: LANG.ad_thin_l, action: thinWallSave }, "thin"), outputAlternating: newBoolean(LANG.ad_altr_s, onBooleanClick, {title:LANG.ad_altr_l}), - _____: newGroup(LANG.fl_menu, $('fdm-base'), { modes:FDM, driven, separator }), - firstSliceHeight: newInput(LANG.fl_lahi_s, {title:LANG.fl_lahi_l, convert:toFloat, show:isNotBelt}), - firstLayerNozzleTemp:newInput(LANG.fl_nozl_s, {title:LANG.fl_nozl_l, convert:toInt, show:isNotBelt}), - firstLayerBedTemp: newInput(LANG.fl_bedd_s, {title:LANG.fl_bedd_l, convert:toInt, show:isNotBelt}), - firstLayerFanSpeed: newInput(LANG.ou_fans_s, {title:LANG.ou_fans_l, convert:toInt, bound:bound(0,255), show:isBelt}), - firstLayerYOffset: newInput(LANG.fl_zoff_s, {title:LANG.fl_zoff_l, convert:toFloat, show:isBelt}), - firstLayerFlatten: newInput(LANG.fl_flat_s, {title:LANG.fl_flat_l, convert:toFloat, show:isBelt}), - firstLayerRate: newInput(LANG.fl_rate_s, {title:LANG.fl_rate_l, convert:toFloat}), - firstLayerFillRate: newInput(LANG.fl_frat_s, {title:LANG.fl_frat_l, convert:toFloat, show:isNotBelt}), - separator: newBlank({ class:"set-sep", driven }), - firstLayerLineMult: newInput(LANG.fl_sfac_s, {title:LANG.fl_sfac_l, convert:toFloat, bound:bound(0.5,2), show:isNotBelt}), - firstLayerPrintMult: newInput(LANG.fl_mult_s, {title:LANG.fl_mult_l, convert:toFloat}), - firstLayerBrim: newInput(LANG.fl_brim_s, {title:LANG.fl_brim_l, convert:toInt, show:isBelt}), - firstLayerBrimIn: newInput(LANG.fl_brin_s, {title:LANG.fl_brin_l, convert:toInt, show:isBelt}), - firstLayerBrimTrig: newInput(LANG.fl_brmn_s, {title:LANG.fl_brmn_l, convert:toInt, show:isBelt}), - firstLayerBrimGap: newInput(LANG.fl_brgp_s, {title:LANG.fl_brgp_l, convert:toFloat, show:isBelt}), - firstLayerBeltLead: newInput(LANG.fl_bled_s, {title:LANG.fl_bled_l, convert:toFloat, show:isBelt}), - firstLayerBeltBump: newInput(LANG.fl_blmp_s, {title:LANG.fl_blmp_l, convert:toFloat, bound:bound(0, 10), show:isBelt}), - separator: newBlank({ class:"set-sep", driven }), - outputBrimCount: newInput(LANG.fl_skrt_s, {title:LANG.fl_skrt_l, convert:toInt, show:isNotBelt}), - outputBrimOffset: newInput(LANG.fl_skro_s, {title:LANG.fl_skro_l, convert:toFloat, show:isNotBelt}), - outputRaftSpacing: newInput(LANG.fr_spac_s, {title:LANG.fr_spac_l, convert:toFloat, bound:bound(0.0,3.0), show: () => ui.outputRaft.checked && isNotBelt() }), - separator: newBlank({ class:"set-sep", driven }), - outputRaft: newBoolean(LANG.fr_nabl_s, onBooleanClick, {title:LANG.fr_nabl_l, trigger: true, show:() => isNotBelt()}), - outputDraftShield: newBoolean(LANG.fr_draf_s, onBooleanClick, {title:LANG.fr_draf_l, trigger: true, show:() => isNotBelt()}), _____: newGroup(LANG.fi_menu, $('fdm-fill'), { modes:FDM, driven, separator }), sliceFillType: newSelect(LANG.fi_type, {trigger:true}, "infill"), sliceFillSparse: newInput(LANG.fi_pcnt_s, {title:LANG.fi_pcnt_l, convert:toFloat, bound:bound(0.0,1.0)}), - sliceFillRepeat: newInput(LANG.fi_rept_s, {title:LANG.fi_rept_l, convert:toInt, bound:bound(1,10), show:fillShow}), + sliceFillRepeat: newInput(LANG.fi_rept_s, {title:LANG.fi_rept_l, convert:toInt, bound:bound(1,10), show: fillShow}), sliceFillOverlap: newInput(LANG.fi_over_s, {title:LANG.fi_over_l, convert:toFloat, bound:bound(0.0,2.0)}), + separator: newBlank({ class:"set-sep", driven }), sliceFillRate: newInput(LANG.ou_feed_s, {title:LANG.ou_feed_l, convert:toInt, bound:bound(0,500)}), sliceSolidRate: newInput(LANG.ou_fini_s, {title:LANG.ou_fini_l, convert:toInt, bound:bound(0,500)}), + separator: newBlank({ class:"set-sep", driven }), sliceFillGrow: newInput(LANG.fi_grow_s, {title:LANG.fi_grow_l, convert:toFloat}), sliceFillAngle: newInput(LANG.fi_angl_s, {title:LANG.fi_angl_l, convert:toFloat}), _____: newGroup(LANG.fh_menu, $('fdm-heat'), { modes:FDM, driven, separator }), @@ -1915,27 +1866,58 @@ gapp.register("kiri.init", [], (root, exports) => { sliceSupportGen: newRow([ ui.ssaGen = newButton(LANG.sp_detect, onButtonClick, {class: "f-col grow a-center"}) ], { modes: FDM, class: "ext-buttons f-row grow" }), + separator: newBlank({ class:"set-sep", driven }), sliceSupportManual: newRow([ (ui.ssmAdd = newButton(undefined, onButtonClick, {icon:''})), (ui.ssmDun = newButton(undefined, onButtonClick, {icon:''})), (ui.ssmClr = newButton(undefined, onButtonClick, {icon:''})) ], {class:"ext-buttons f-row"}), + _____: newGroup(LANG.fl_menu, $('fdm-base'), { modes:FDM, driven, separator }), + firstSliceHeight: newInput(LANG.fl_lahi_s, {title:LANG.fl_lahi_l, convert:toFloat, show:isNotBelt}), + firstLayerNozzleTemp:newInput(LANG.fl_nozl_s, {title:LANG.fl_nozl_l, convert:toInt, show:isNotBelt}), + firstLayerBedTemp: newInput(LANG.fl_bedd_s, {title:LANG.fl_bedd_l, convert:toInt, show:isNotBelt}), + separator: newBlank({ class:"set-sep", driven }), + firstLayerFanSpeed: newInput(LANG.ou_fans_s, {title:LANG.ou_fans_l, convert:toInt, bound:bound(0,255), show:isBelt}), + firstLayerYOffset: newInput(LANG.fl_zoff_s, {title:LANG.fl_zoff_l, convert:toFloat, show:isBelt}), + firstLayerFlatten: newInput(LANG.fl_flat_s, {title:LANG.fl_flat_l, convert:toFloat, show:isBelt}), + firstLayerRate: newInput(LANG.fl_rate_s, {title:LANG.fl_rate_l, convert:toFloat}), + firstLayerFillRate: newInput(LANG.fl_frat_s, {title:LANG.fl_frat_l, convert:toFloat, show:isNotBelt}), + separator: newBlank({ class:"set-sep", driven }), + firstLayerLineMult: newInput(LANG.fl_sfac_s, {title:LANG.fl_sfac_l, convert:toFloat, bound:bound(0.5,2), show:isNotBelt}), + firstLayerPrintMult: newInput(LANG.fl_mult_s, {title:LANG.fl_mult_l, convert:toFloat}), + firstLayerBrim: newInput(LANG.fl_brim_s, {title:LANG.fl_brim_l, convert:toInt, show:isBelt}), + firstLayerBrimIn: newInput(LANG.fl_brin_s, {title:LANG.fl_brin_l, convert:toInt, show:isBelt}), + firstLayerBrimTrig: newInput(LANG.fl_brmn_s, {title:LANG.fl_brmn_l, convert:toInt, show:isBelt}), + firstLayerBrimGap: newInput(LANG.fl_brgp_s, {title:LANG.fl_brgp_l, convert:toFloat, show:isBelt}), + firstLayerBeltLead: newInput(LANG.fl_bled_s, {title:LANG.fl_bled_l, convert:toFloat, show:isBelt}), + firstLayerBeltBump: newInput(LANG.fl_blmp_s, {title:LANG.fl_blmp_l, convert:toFloat, bound:bound(0, 10), show:isBelt}), + separator: newBlank({ class:"set-sep", driven }), + outputBrimCount: newInput(LANG.fl_skrt_s, {title:LANG.fl_skrt_l, convert:toInt, show:isNotBelt}), + outputBrimOffset: newInput(LANG.fl_skro_s, {title:LANG.fl_skro_l, convert:toFloat, show:isNotBelt}), + outputRaftSpacing: newInput(LANG.fr_spac_s, {title:LANG.fr_spac_l, convert:toFloat, bound:bound(0.0,3.0), show: () => ui.outputRaft.checked && isNotBelt() }), + separator: newBlank({ class:"set-sep", driven }), + outputRaft: newBoolean(LANG.fr_nabl_s, onBooleanClick, {title:LANG.fr_nabl_l, trigger: true, show:() => isNotBelt()}), + outputDraftShield: newBoolean(LANG.fr_draf_s, onBooleanClick, {title:LANG.fr_draf_l, trigger: true, show:() => isNotBelt()}), _____: newGroup(LANG.ou_menu, $('fdm-output'), { modes:FDM, driven, separator }), outputFeedrate: newInput(LANG.ou_feed_s, {title:LANG.ou_feed_l, convert:toInt}), outputFinishrate: newInput(LANG.ou_fini_s, {title:LANG.ou_fini_l, convert:toInt}), outputSeekrate: newInput(LANG.ou_move_s, {title:LANG.ou_move_l, convert:toInt}), + separator: newBlank({ class:"set-sep", driven }), outputShellMult: newInput(LANG.ou_shml_s, {title:LANG.ou_exml_l, convert:toFloat, bound:bound(0.0,2.0)}), outputFillMult: newInput(LANG.ou_flml_s, {title:LANG.ou_exml_l, convert:toFloat, bound:bound(0.0,2.0)}), outputSparseMult: newInput(LANG.ou_spml_s, {title:LANG.ou_exml_l, convert:toFloat, bound:bound(0.0,2.0)}), - sliceLayerStart: newSelect(LANG.sl_strt_s, {title:LANG.sl_strt_l}, "start"), separator: newBlank({ class:"set-sep", driven }), - outputLayerRetract: newBoolean(LANG.ad_lret_s, onBooleanClick, {title:LANG.ad_lret_l}), - outputAvoidGaps: newBoolean(LANG.ad_agap_s, onBooleanClick, {title:LANG.ad_agap_l}), - outputBeltFirst: newBoolean(LANG.ad_lbir_s, onBooleanClick, {title:LANG.ad_lbir_l, show: isBelt}), - _____: newGroup(LANG.ad_menu, $('fdm-expert'), { modes:FDM, driven, separator }), outputRetractDist: newInput(LANG.ad_rdst_s, {title:LANG.ad_rdst_l, convert:toFloat}), outputRetractSpeed: newInput(LANG.ad_rrat_s, {title:LANG.ad_rrat_l, convert:toInt}), outputRetractWipe: newInput(LANG.ad_wpln_s, {title:LANG.ad_wpln_l, convert:toFloat, bound:bound(0.0,10)}), + separator: newBlank({ class:"set-sep", driven }), + sliceLayerStart: newSelect(LANG.sl_strt_s, {title:LANG.sl_strt_l}, "start"), + outputLayerRetract: newBoolean(LANG.ad_lret_s, onBooleanClick, {title:LANG.ad_lret_l}), + outputAvoidGaps: newBoolean(LANG.ad_agap_s, onBooleanClick, {title:LANG.ad_agap_l}), + separator: newBlank({ class:"set-sep", driven }), + outputBeltFirst: newBoolean(LANG.ad_lbir_s, onBooleanClick, {title:LANG.ad_lbir_l, show: isBelt}), + outputNozzle: newSelect(LANG.sp_nozl_s, {title:LANG.sp_nozl_l}, "extruders"), + _____: newGroup(LANG.ad_menu, $('fdm-expert'), { modes:FDM, driven, separator }), outputRetractDwell: newInput(LANG.ad_rdwl_s, {title:LANG.ad_rdwl_l, convert:toInt}), sliceSolidMinArea: newInput(LANG.ad_msol_s, {title:LANG.ad_msol_l, convert:toFloat}), outputMinSpeed: newInput(LANG.ad_mins_s, {title:LANG.ad_mins_l, convert:toFloat, bound:bound(1,200)}), @@ -2773,10 +2755,9 @@ gapp.register("kiri.init", [], (root, exports) => { ui.acct.export.title = LANG.acct_xpo; $('file-recent').onclick = () => { api.modal.show('files') }; $('file-import').onclick = (ev) => { api.event.import(ev); }; - ui.back.onclick = api.platform.layout; - ui.options.trash.onclick = api.selection.delete; - ui.options.enable.onclick = api.selection.enable; - ui.options.disable.onclick = api.selection.disable; + // ui.options.trash.onclick = api.selection.delete; + // ui.options.enable.onclick = api.selection.enable; + // ui.options.disable.onclick = api.selection.disable; ui.func.slice.onclick = (ev) => { ev.stopPropagation(); api.function.slice() }; ui.func.preview.onclick = (ev) => { ev.stopPropagation(); api.function.print() }; ui.func.animate.onclick = (ev) => { ev.stopPropagation(); api.function.animate() }; @@ -2789,10 +2770,6 @@ gapp.register("kiri.init", [], (root, exports) => { $('view-left').onclick = space.view.left; $('view-right').onclick = space.view.right; $('view-clear').onclick = api.platform.clear; - // $('mode-fdm').onclick = () => { api.mode.set('FDM'); api.space.set_focus() }; - // $('mode-sla').onclick = () => { api.mode.set('SLA'); api.space.set_focus() }; - // $('mode-cam').onclick = () => { api.mode.set('CAM'); api.space.set_focus() }; - // $('mode-laser').onclick = () => { api.mode.set('LASER'); api.space.set_focus() }; $('unrotate').onclick = () => { api.widgets.for(w => w.unrotate()); api.selection.update_info(); diff --git a/src/kiri/main.js b/src/kiri/main.js index d021c3ae..666e6879 100644 --- a/src/kiri/main.js +++ b/src/kiri/main.js @@ -921,7 +921,6 @@ gapp.register("kiri.main", [], (root, exports) => { api.event.emit('device.set', currentDeviceName()); } // hide/show - api.uc.setVisible($('menu-nozzle'), mode === 'FDM'); api.uc.setVisible($('set-tools'), mode === 'CAM'); // updates right-hand menu by enabling/disabling fields setViewMode(VIEWS.ARRANGE); diff --git a/src/kiri/platform.js b/src/kiri/platform.js index 92e87885..30d96115 100644 --- a/src/kiri/platform.js +++ b/src/kiri/platform.js @@ -234,7 +234,7 @@ function platformUpdateSelected() { const { device } = settings; const { extruders } = device; const { selection, ui } = api; - const { enable, disable } = ui.options; + // const { enable, disable } = ui.options; const selreal = selection.widgets(); const selwid = selection.widgets(true); @@ -243,8 +243,8 @@ function platformUpdateSelected() { if (selcount) { let enaC = selwid.filter(w => w.meta.disabled !== true).length; let disC = selwid.filter(w => w.meta.disabled === true).length; - enable.style.display = disC ? 'flex' : 'none'; - disable.style.display = enaC ? 'flex' : 'none'; + // enable.style.display = disC ? 'flex' : 'none'; + // disable.style.display = enaC ? 'flex' : 'none'; if (api.feature.meta && selcount === 1) { let sel = selwid[0]; let name = sel.meta.file || sel.meta.url; diff --git a/web/kiri/index.css b/web/kiri/index.css index afaff40c..c2ec0e1f 100644 --- a/web/kiri/index.css +++ b/web/kiri/index.css @@ -10,8 +10,10 @@ --holdbar-sf: linear-gradient(to top, rgba(200,200,200,0.1), rgba(255,255,255,1), rgba(200,200,200,0.1)) !important; --highlight: rgba(126,153,183,0.4); --main-color: rgba(126,153,183,1); - --main-color-hover: rgb(96, 127, 164); - --work-area: rgba(255,255,255,0.75); + --main-color-hover: rgb(96,127,164); + --row-hover: rgb(126,153,183,0.25); + --work-area: rgba(255,255,255,1); + --header: rgba(126,153,183,0.5); --menu: #f0f0f0; --menu-text: #222; --menu-border: #555; @@ -99,10 +101,10 @@ button[del] { margin-left: 5px; } input { - background-color: #eeeeeed6; + background-color: #f8f8ff; margin-bottom: 1px; text-align: right; - border: 1px solid #bbb; + border: 0.5px solid #bbb; padding-top: 0; padding-bottom: 0; margin-top: 1px; @@ -110,10 +112,8 @@ input { } input:focus { color: #495057; - background-color: #fff; - border-color: #6C7F94; outline: 0; - box-shadow: 0 0 0 0.2rem rgb(0 123 255 / 10%); + box-shadow: 0 0 0 0.2rem rgb(0 100 255 / 10%); } input[disabled] { background-color: #ddd; @@ -223,7 +223,7 @@ th, tr, td, label { color: var(--dark-menu-text) } .top-menu svg { - color: var(--main-color); + color: #555; } .top-menu > span { position: relative; @@ -232,16 +232,16 @@ th, tr, td, label { align-items: center; } .top-menu > span:hover label { - color: var(--menu-text); + color: var(--menu-hover); } .dark .top-menu > span:hover label { color: var(--dark-menu-text) !important; } .top-menu > span:hover > svg { - color: var(--main-color-hover); + color: black; } .top-menu > span:hover { - background-color: var(--menu); + background-color: var(--row-hover); border-left: 1px solid var(--menu-border); border-right: 1px solid var(--menu-border); } @@ -858,6 +858,7 @@ th, tr, td, label { min-width: 200px; } #menu-render { + margin: 4px 0 0 0; gap: 3px; flex-direction: row;; } @@ -1926,9 +1927,10 @@ th, tr, td, label { border-right: 3px solid transparent; } .set2-group .var-row:hover { - border-left: 3px solid #ddd; - border-right: 3px solid #ddd; - background-color: #f8f8f8 !important; + /* border-left: 3px solid var(--main-color-hover); */ + border-right: 3px solid var(--main-color-hover); + /* background-color: #f8f8f8 !important; */ + background-color: var(--row-hover) !important; } .set2-group .var-row label { margin-right: 25px; @@ -1950,15 +1952,16 @@ th, tr, td, label { .set-header { white-space: nowrap; border-radius: 2px; - justify-content: center; - background-color: var(--menu); - border-left: 3px solid #ddd; - border-right: 3px solid #ddd; + justify-content: left; + background-color: var(--header); + /* /* border-top: 0.5px solid #888; */ + border-left: 3px solid transparent; + border-right: 3px solid var(--main-color-hover); + border-bottom: 0.5px solid var(--main-color-hover); padding: 4px; margin: 0 0 4px 0; } .settings .set-header { - border-radius: 2px; margin: 0 !important; } .set-header-line { diff --git a/web/kiri/index.html b/web/kiri/index.html index aff66214..14962329 100644 --- a/web/kiri/index.html +++ b/web/kiri/index.html @@ -124,13 +124,6 @@ - - - -
-
-
-
@@ -224,15 +217,6 @@
- -
- -
-
-
-
-
-