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

15
app.js
View file

@ -471,7 +471,6 @@ function initModule(mod, file, dir) {
const script = {
kiri : [
"@devices",
"@icons",
"kiri/ui",
"&main/kiri",
"&kiri/lang-en"
@ -651,16 +650,7 @@ function serveCode(req, res, code) {
res.end(code.code);
}
function generateIcons() {
let root = PATH.join(dir,"src","kiri-ico");
let icos = {};
fs.readdirSync(root).forEach(file => {
let name = file.split(".")[0] ;
icos[name] = fs.readFileSync(`${root}/${file}`).toString();
});
synth.icons = `self.icons = ${JSON.stringify(icos)};`;
}
// pack/concat device script strings to inject into /code/ scripts
function generateDevices() {
let root = PATH.join(dir,"src","kiri-dev");
let devs = {};
@ -670,12 +660,11 @@ function generateDevices() {
map[device] = JSON.parse(fs.readFileSync(PATH.join(root,type,device)));
});
});
// console.log({ devs });
synth.devices = `self.devices = ${JSON.stringify(devs)};`;
}
// pack/concat code modules served under "/code/"
function prepareScripts() {
generateIcons();
generateDevices();
for (let key of Object.keys(script)) {
code[key] = concatCode(script[key]);

View file

@ -1,3 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid meet" viewBox="0 0 170 170" width="75px" height="75px"><defs><path d="M15 38.33C15 38.33 15 38.33 15 38.33C15 25.45 25.45 15 38.33 15C44.56 15 75.67 15 131.67 15C131.67 15 131.67 15 131.67 15C137.85 15 143.79 17.46 148.17 21.83C152.54 26.21 155 32.15 155 38.33C155 47.67 155 122.33 155 131.67C155 144.55 144.55 155 131.67 155C122.33 155 47.67 155 38.33 155C25.45 155 15 144.55 15 131.67C15 119.22 15 88.11 15 38.33Z" id="e3irHaXr4"></path><path d="M65 15L105 15L105 125L65 125L65 15Z" id="c1YkLol10d"></path><path d="M105 25L65 55" id="b4hxjCK1zy"></path><path d="M105 55L65 85" id="apUaV8mZu"></path><path d="M105 85L65 115" id="bk21dIqOq"></path></defs><g><g><g><g><use xlink:href="#e3irHaXr4" opacity="1" fill="#000000" fill-opacity="0"></use><g><use xlink:href="#e3irHaXr4" opacity="1" fill-opacity="0" stroke="currentColor" stroke-width="8" stroke-opacity="1"></use></g></g><g><use xlink:href="#c1YkLol10d" opacity="1" fill="#000000" fill-opacity="0"></use><g><use xlink:href="#c1YkLol10d" opacity="1" fill-opacity="0" stroke="currentColor" stroke-width="8" stroke-opacity="1"></use></g></g><g><g><use xlink:href="#b4hxjCK1zy" opacity="1" fill-opacity="0" stroke="currentColor" stroke-width="8.01" stroke-opacity="1"></use></g></g><g><g><use xlink:href="#apUaV8mZu" opacity="1" fill-opacity="0" stroke="currentColor" stroke-width="8.01" stroke-opacity="1"></use></g></g><g><g><use xlink:href="#bk21dIqOq" opacity="1" fill-opacity="0" stroke="currentColor" stroke-width="8.01" stroke-opacity="1"></use></g></g></g></g></g></svg>

Before

Width:  |  Height:  |  Size: 1.8 KiB

View file

@ -1,3 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid meet" viewBox="0 0 170 170" width="75px" height="75px"><defs><path d="M15 38.33C15 38.33 15 38.33 15 38.33C15 25.45 25.45 15 38.33 15C44.56 15 75.67 15 131.67 15C131.67 15 131.67 15 131.67 15C137.85 15 143.79 17.46 148.17 21.83C152.54 26.21 155 32.15 155 38.33C155 47.67 155 122.33 155 131.67C155 144.55 144.55 155 131.67 155C122.33 155 47.67 155 38.33 155C25.45 155 15 144.55 15 131.67C15 119.22 15 88.11 15 38.33Z" id="a14Galv9UF"></path><path d="M45 15L125 15L125 75L45 75L45 15Z" id="c3q839LU3"></path><path d="M35 141.48C53.11 141.48 64.43 141.48 68.96 141.48C77.82 141.48 85 134.3 85 125.45C85 125.45 85 125.45 85 125.45" id="chE0t1xfL"></path><path d="M105 95L85 115L65 95L105 95Z" id="a6K998F3GT"></path><path d="M75 75L95 75L95 95L75 95L75 75Z" id="e1iiMERqAh"></path></defs><g><g><g><g><use xlink:href="#a14Galv9UF" opacity="1" fill="#000000" fill-opacity="0"></use><g><use xlink:href="#a14Galv9UF" opacity="1" fill-opacity="0" stroke="currentColor" stroke-width="8" stroke-opacity="1"></use></g></g><g><use xlink:href="#c3q839LU3" opacity="1" fill="#000000" fill-opacity="0"></use><g><use xlink:href="#c3q839LU3" opacity="1" fill-opacity="0" stroke="currentColor" stroke-width="8" stroke-opacity="1"></use></g></g><g><g><use xlink:href="#chE0t1xfL" opacity="1" fill-opacity="0" stroke="currentColor" stroke-width="8.01" stroke-opacity="1"></use></g></g><g><g><use xlink:href="#a6K998F3GT" opacity="1" fill-opacity="0" stroke="currentColor" stroke-width="8.01" stroke-opacity="1"></use></g></g><g><use xlink:href="#e1iiMERqAh" opacity="1" fill="#000000" fill-opacity="0"></use><g><use xlink:href="#e1iiMERqAh" opacity="1" fill-opacity="0" stroke="currentColor" stroke-width="8" stroke-opacity="1"></use></g></g></g></g></g></svg>

Before

Width:  |  Height:  |  Size: 2 KiB

View file

@ -1,3 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid meet" viewBox="0 0 170 170" width="75px" height="75px"><defs><path d="M15 38.33C15 38.33 15 38.33 15 38.33C15 25.45 25.45 15 38.33 15C44.56 15 75.67 15 131.67 15C131.67 15 131.67 15 131.67 15C137.85 15 143.79 17.46 148.17 21.83C152.54 26.21 155 32.15 155 38.33C155 47.67 155 122.33 155 131.67C155 144.55 144.55 155 131.67 155C122.33 155 47.67 155 38.33 155C25.45 155 15 144.55 15 131.67C15 119.22 15 88.11 15 38.33Z" id="a4l00mnEny"></path><path d="M65 15L105 15L105 55L65 55L65 15Z" id="bq8oBWrfG"></path><path d="M85 125L85 65" id="aXzHtGbsD"></path><path d="M55 105L75 135" id="akSzh0QKx"></path><path d="M115 105L95 135" id="bloAs9giZ"></path><path d="M35 125L75 145" id="gk6ohj0JL"></path><path d="M135 123.96L95 145" id="e404eoj7L"></path></defs><g><g><g><g><use xlink:href="#a4l00mnEny" opacity="1" fill="#000000" fill-opacity="0"></use><g><use xlink:href="#a4l00mnEny" opacity="1" fill-opacity="0" stroke="currentColor" stroke-width="8" stroke-opacity="1"></use></g></g><g><use xlink:href="#bq8oBWrfG" opacity="1" fill="#000000" fill-opacity="0"></use><g><use xlink:href="#bq8oBWrfG" opacity="1" fill-opacity="0" stroke="currentColor" stroke-width="8" stroke-opacity="1"></use></g></g><g><g><use xlink:href="#aXzHtGbsD" opacity="1" fill-opacity="0" stroke="currentColor" stroke-width="8.01" stroke-opacity="1"></use></g></g><g><g><use xlink:href="#akSzh0QKx" opacity="1" fill-opacity="0" stroke="currentColor" stroke-width="8.01" stroke-opacity="1"></use></g></g><g><g><use xlink:href="#bloAs9giZ" opacity="1" fill-opacity="0" stroke="currentColor" stroke-width="8.01" stroke-opacity="1"></use></g></g><g><g><use xlink:href="#gk6ohj0JL" opacity="1" fill-opacity="0" stroke="currentColor" stroke-width="8.01" stroke-opacity="1"></use></g></g><g><g><use xlink:href="#e404eoj7L" opacity="1" fill-opacity="0" stroke="currentColor" stroke-width="8.01" stroke-opacity="1"></use></g></g></g></g></g></svg>

Before

Width:  |  Height:  |  Size: 2.1 KiB

View file

@ -1,3 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid meet" viewBox="0 0 170 170" width="75px" height="75px"><defs><path d="M15 38.33C15 38.33 15 38.33 15 38.33C15 25.45 25.45 15 38.33 15C44.56 15 75.67 15 131.67 15C131.67 15 131.67 15 131.67 15C137.85 15 143.79 17.46 148.17 21.83C152.54 26.21 155 32.15 155 38.33C155 47.67 155 122.33 155 131.67C155 144.55 144.55 155 131.67 155C122.33 155 47.67 155 38.33 155C25.45 155 15 144.55 15 131.67C15 119.22 15 88.11 15 38.33Z" id="b3TRNHybxX"></path><path d="M31.88 42.5L138.12 42.5L138.12 47.81L31.88 47.81L31.88 42.5Z" id="aNMkzLwb"></path><path d="M75 21.87L95 21.87L95 41.88L75 41.88L75 21.87Z" id="d1fKKg2Jru"></path><path d="M115.93 107.19C115.93 124.27 102.07 138.13 85 138.13C67.93 138.13 54.07 124.27 54.07 107.19C54.07 90.12 67.93 76.26 85 76.26C102.07 76.26 115.93 90.12 115.93 107.19Z" id="cnyrcTQMg"></path><path d="M53.87 47.81L53.87 107.08" id="a4G9Rr6VQL"></path><path d="M115.76 51.27L115.76 110.53" id="d4hytySQxZ"></path><path d="M69.06 79.69L69.06 47.81" id="b1WQ83ELAA"></path><path d="M100.94 79.69L100.94 47.81" id="f2kNHslaLa"></path><path d="M69.06 58.44L53.13 74.38" id="g67vFJwAFy"></path><path d="M114.68 58.44L100.94 69.06" id="aAcp3z5Kv"></path></defs><g><g><g><use xlink:href="#b3TRNHybxX" opacity="1" fill="#000000" fill-opacity="0"></use><g><use xlink:href="#b3TRNHybxX" opacity="1" fill-opacity="0" stroke="currentColor" stroke-width="8" stroke-opacity="1"></use></g></g><g><use xlink:href="#aNMkzLwb" opacity="1" fill="#000000" fill-opacity="0"></use><g><use xlink:href="#aNMkzLwb" opacity="1" fill-opacity="0" stroke="currentColor" stroke-width="8" stroke-opacity="1"></use></g></g><g><use xlink:href="#d1fKKg2Jru" opacity="1" fill="#000000" fill-opacity="0"></use><g><use xlink:href="#d1fKKg2Jru" opacity="1" fill-opacity="0" stroke="currentColor" stroke-width="8" stroke-opacity="1"></use></g></g><g><use xlink:href="#cnyrcTQMg" opacity="1" fill="#1ea5e6" fill-opacity="0"></use><g><use xlink:href="#cnyrcTQMg" opacity="1" fill-opacity="0" stroke="currentColor" stroke-width="8" stroke-opacity="1"></use></g></g><g><g><use xlink:href="#a4G9Rr6VQL" opacity="1" fill-opacity="0" stroke="currentColor" stroke-width="8" stroke-opacity="1"></use></g></g><g><g><use xlink:href="#d4hytySQxZ" opacity="1" fill-opacity="0" stroke="currentColor" stroke-width="8" stroke-opacity="1"></use></g></g><g><g><use xlink:href="#b1WQ83ELAA" opacity="1" fill-opacity="0" stroke="currentColor" stroke-width="8" stroke-opacity="1"></use></g></g><g><g><use xlink:href="#f2kNHslaLa" opacity="1" fill-opacity="0" stroke="currentColor" stroke-width="8" stroke-opacity="1"></use></g></g><g><g><use xlink:href="#g67vFJwAFy" opacity="1" fill-opacity="0" stroke="currentColor" stroke-width="6" stroke-opacity="1"></use></g></g><g><g><use xlink:href="#aAcp3z5Kv" opacity="1" fill-opacity="0" stroke="currentColor" stroke-width="6" stroke-opacity="1"></use></g></g></g></g></svg>

Before

Width:  |  Height:  |  Size: 3.1 KiB

View file

@ -1,7 +0,0 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="110mm" height="110mm" viewBox="0 0 110 110" xmlns="http://www.w3.org/2000/svg" version="1.1">
<polyline z="7.5" points="34.926,32.706 32.706,34.926 30.73,37.366 29.019,40 27.594,42.798 26.468,45.729 25.656,48.763 25.164,51.864 25,55 25.164,58.136 25.656,61.237 26.468,64.271 27.594,67.202 29.019,70 13.948,66 7.369,82.5 4.755,77.371 2.692,71.996 1.202,66.435 0.301,60.749 0,55 0.301,49.251 1.202,43.565 2.692,38.004 4.755,32.629 7.369,27.5 10.504,22.672 14.127,18.198 18.198,14.127 22.672,10.504 27.5,7.369 32.629,4.755 38.004,2.692 43.565,1.202 49.251,0.301 55,0 66,13.948 55,25 51.864,25.164 48.763,25.656 45.729,26.468 42.798,27.594 40,29.019 37.366,30.73 34.926,32.706" fill="#cccccc" stroke="none" stroke-width="0.1mm" />
<polyline z="2.5" points="77.294,34.926 75.074,32.706 72.634,30.73 70,29.019 67.202,27.594 64.271,26.468 61.237,25.656 58.136,25.164 55,25 66,13.948 55,0 60.749,0.301 66.435,1.202 71.996,2.692 77.371,4.755 82.5,7.369 87.328,10.504 91.802,14.127 95.873,18.198 99.496,22.672 102.631,27.5 105.245,32.629 107.308,38.004 108.798,43.565 109.699,49.251 110,55 109.699,60.749 108.798,66.435 107.308,71.996 105.245,77.371 102.631,82.5 85.052,85.052 80.981,70 82.406,67.202 83.532,64.271 84.344,61.237 84.836,58.136 85,55 84.836,51.864 84.344,48.763 83.532,45.729 82.406,42.798 80.981,40 79.27,37.366 77.294,34.926" fill="#aaaaaa" stroke="none" stroke-width="0.1mm" />
<polyline z="5" points="32.706,75.074 34.926,77.294 37.366,79.27 40,80.981 42.798,82.406 45.729,83.532 48.763,84.344 51.864,84.836 55,85 58.136,84.836 61.237,84.344 64.271,83.532 67.202,82.406 70,80.981 72.634,79.27 75.074,77.294 77.294,75.074 79.27,72.634 80.981,70 85.052,85.052 102.631,82.5 99.496,87.328 95.873,91.802 91.802,95.873 87.328,99.496 82.5,102.631 77.371,105.245 71.996,107.308 66.435,108.798 60.749,109.699 55,110 49.251,109.699 43.565,108.798 38.004,107.308 32.629,105.245 27.5,102.631 22.672,99.496 18.198,95.873 14.127,91.802 10.504,87.328 7.369,82.5 13.948,66 29.019,70 30.73,72.634 32.706,75.074" fill="#bbbbbb" stroke="none" stroke-width="0.1mm" />
</svg>

Before

Width:  |  Height:  |  Size: 2.2 KiB

View file

@ -31,8 +31,9 @@ function init(kiri, api) {
const fileroot = names[0] || "print";
const filename = `${fileroot}-${new Date().getTime().toString(36)}`;
api.ajax("/kiri/output-sla.html", html => {
api.ui.print.innerHTML = html;
api.modal.show('xsla');
// api.ajax("/kiri/output-sla.html", html => {
// api.ui.print.innerHTML = html;
let settings = api.conf.get(),
process = settings.process,
@ -88,8 +89,8 @@ function init(kiri, api) {
break;
}
api.modal.show('print');
});
// api.modal.show('print');
// });
}
function saveFile(api, file, ext) {

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' : '';
});

View file

@ -276,8 +276,8 @@ th, tr, td, label {
.dark .mdialog,
.dark .t-body,
.dark .cam-pop-op,
.dark #mod-print,
.dark #mod-print .header label
.dark .mod-print,
.dark .mod-print .header label
{
background-color: #282828;
color: white;
@ -856,7 +856,7 @@ th, tr, td, label {
pointer-events: none;
}
#mod-print button, #catalogList button, #settingsList button {
.mod-print button, #catalogList button, #settingsList button {
text-transform: none !important;
}
@ -1555,13 +1555,13 @@ th, tr, td, label {
font-family: monospace;
padding-top: 5px;
}
#mod-print {
.mod-print {
background-color: rgba(255,255,255,0.85);
}
#mod-print .grow button {
.mod-print .grow button {
margin-left: 5px;
}
#mod-print .hint {
.mod-print .hint {
color: #345;
font-size: 12px;
font-style: italic;
@ -1569,50 +1569,50 @@ th, tr, td, label {
font-weight: normal;
padding-top: 5px;
}
.dark #mod-print .box {
.dark .mod-print .box {
background-color: rgba(0,0,0,0.15);
border-color: #555;
}
#mod-print .box {
.mod-print .box {
background-color: rgba(255,255,255,0.5);
border: 1px solid #bbb;
border-radius: 3px;
padding: 20px 10px 10px 10px;
}
#mod-print .box select {
.mod-print .box select {
min-width: 10em;
}
#mod-print .header {
.mod-print .header {
flex-direction: column;
justify-content: center;
align-items: center;
transform: translateY(50%);
z-index: 10;
}
#mod-print .header label {
.mod-print .header label {
background-color: white;
padding: 0 10px 0 10px;
border-radius: 5px;
border-right: 1px solid #bbb;
border-left: 1px solid #bbb;
}
#mod-print a {
.mod-print a {
text-decoration: underline;
}
#mod-print a:hover {
.mod-print a:hover {
color: #567;
background-color: #ddd;
}
#mod-print label {
.mod-print label {
flex-grow: 1;
font-weight: bold;
padding-right: 10px;
}
.dark #mod-print button {
.dark .mod-print button {
background-color: #555;
border-color: #777;
}
#mod-print button {
.mod-print button {
flex-direction: column;
justify-content: center;
align-items: center;

View file

@ -579,7 +579,94 @@
<!-- grid local list -->
<div id="mod-local" class="mdialog f-col"></div>
<div id="mod-print" class="mdialog f-col"></div>
<!-- export dialogs -->
<div id="mod-x-any" class="mod-print mdialog f-col">
<div class="header"><label>export</label></div>
<div id="print-info" class="f-col box">
<div><label>file name</label><input id="print-filename" size="20" spellcheck="false" /></div>
<div><label>file size (bytes)</label><input id="print-filesize" size="12" disabled="true" /></div>
<div><label>time estimate (h:m:s)</label><input id="output-time" size="12" disabled="true" /></div>
</div>
<div id="print-filament-head" class="header"><label>filament</label></div>
<div id="print-filament-info" class="f-col box">
<div><label>filament density (g/cm^3)</label><input id="print-density" size="12" value="1.25" /></div>
<div><label>filament used (mm)</label><input id="print-filament" size="12" disabled="true" /></div>
<div><label>printed weight (g)</label><input id="print-weight" size="12" disabled="true" /></div>
</div>
<div id="code-preview-head" class="header"><label>code preview</label></div>
<div id="code-preview" class="f-col box">
<div><textarea id="code-preview-textarea"></textarea></div>
</div>
<div class="header"><label>gcode</label></div>
<div class="f-row box">
<button id="print-download" class="grow">download</button>
<button id="print-palette" class="grow">palette</button>
<button id="print-zip" class="grow">zip file</button>
</div>
<div id="send-to-octohead" class="header"><label>octoprint</label></div>
<div id="send-to-octoprint" class="f-col box">
<div class="grow f-row">
<div class="f-col grow">
<div id="ophost"><label>host</label><input id="octo-host" size="20" placeholder="http(s)://host:port" /></div>
<div id="opapik"><label>key</label><input id="octo-apik" size="20" /></div>
</div>
<button id="print-octoprint">send</button>
</div>
<div id="oph1nt"><label class="hint"><a href="http://docs.octoprint.org/en/master/api/general.html?highlight=cors#cross-origin-requests" target="_help">CORS support</a> must be enabled in API settings</label></div>
</div>
<div id="send-to-hosthead" class="header"><label>grid:host</label></div>
<div id="send-to-gridhost" class="f-col box">
<div class="grow f-row">
<div class="f-col grow">
<div><label>host</label><input id="grid-host" size="20" placeholder="http(s)://host:port" /></div>
<div id="gpapik"><label>api key</label><input id="grid-apik" size="20" /></div>
<div><label>target</label><select id="grid-target"></select></div>
</div>
<button id="print-gridhost">send</button>
</div>
<div><label class="hint">setup <a href="https://github.com/GridSpace/grid-host" target="_help">grid:host</a> for your network</label></div>
</div>
<div id="send-to-gridhead" class="header noshow"><label>grid:local</label></div>
<div id="send-to-gridspool" class="f-row box noshow">
<div class="grow f-row">
<div class="grow a-center j-center">
<label>target</label>
<select id="grid-local"></select>
</div>
<div class="f-col">
<button id="print-gridlocal">send</button>
<button id="admin-gridlocal">admin</button>
</div>
</div>
</div>
</div>
<div id="mod-x-sla" class="mod-print mdialog f-col">
<div class="header"><label>export</label></div>
<div id="print-info" class="f-col box">
<div><label>file name</label><input id="print-filename" size="20" spellcheck="false" /></div>
<div><label>resin used ML</label><input id="print-volume" size="10" spellcheck="false" /></div>
<div><label>layers</label><input id="print-layers" size="10" spellcheck="false" /></div>
<div><label>print time</label><input id="print-time" size="10" spellcheck="false" /></div>
</div>
<div class="header"><label>download</label></div>
<div class="f-row box">
<button id="print-sla" class="grow">download</button>
</div>
</div>
<div id="mod-x-laser" class="mod-print mdialog f-col">
<div class="header"><label>export</label></div>
<div id="print-info" class="f-col box">
<div><label>file name</label><input id="print-filename" size="20" spellcheck="false" /></div>
<div><label>segments</label><input id="print-lines" size="12" disabled="true" /></div>
</div>
<div class="header"><label>download</label></div>
<div class="f-row box">
<button id="print-svg" class="grow">svg</button>
<button id="print-dxf" class="grow">dxf</button>
<button id="print-lg" class="grow">gcode</button>
</div>
</div>
<!-- dynamic dialogs -->
<div id="mod-any" class="mdialog f-col"></div>
<div class="mod-end"></div></div>
</div>

View file

@ -1,64 +0,0 @@
<div class="header"><label>export</label></div>
<div id="print-info" class="f-col box">
<div><label>file name</label><input id="print-filename" size="20" spellcheck="false" /></div>
<div><label>file size (bytes)</label><input id="print-filesize" size="12" disabled="true" /></div>
<div><label>time estimate (h:m:s)</label><input id="output-time" size="12" disabled="true" /></div>
</div>
<div id="print-filament-head" class="header"><label>filament</label></div>
<div id="print-filament-info" class="f-col box">
<div><label>filament density (g/cm^3)</label><input id="print-density" size="12" value="1.25" /></div>
<div><label>filament used (mm)</label><input id="print-filament" size="12" disabled="true" /></div>
<div><label>printed weight (g)</label><input id="print-weight" size="12" disabled="true" /></div>
</div>
<div id="code-preview-head" class="header"><label>code preview</label></div>
<div id="code-preview" class="f-col box">
<div><textarea id="code-preview-textarea"></textarea></div>
</div>
<div class="header"><label>gcode</label></div>
<div class="f-row box">
<button id="print-download" class="grow">download</button>
<button id="print-palette" class="grow">palette</button>
<button id="print-zip" class="grow">zip file</button>
</div>
<div id="send-to-octohead" class="header"><label>octoprint</label></div>
<div id="send-to-octoprint" class="f-col box">
<div class="grow f-row">
<div class="f-col grow">
<div id="ophost"><label>host</label><input id="octo-host" size="20" placeholder="http(s)://host:port" /></div>
<div id="opapik"><label>key</label><input id="octo-apik" size="20" /></div>
</div>
<button id="print-octoprint">send</button>
</div>
<div id="oph1nt"><label class="hint"><a href="http://docs.octoprint.org/en/master/api/general.html?highlight=cors#cross-origin-requests" target="_help">CORS support</a> must be enabled in API settings</label></div>
</div>
<div id="send-to-hosthead" class="header"><label>grid:host</label></div>
<div id="send-to-gridhost" class="f-col box">
<div class="grow f-row">
<div class="f-col grow">
<div><label>host</label><input id="grid-host" size="20" placeholder="http(s)://host:port" /></div>
<div id="gpapik"><label>api key</label><input id="grid-apik" size="20" /></div>
<div><label>target</label><select id="grid-target"></select></div>
</div>
<button id="print-gridhost">send</button>
</div>
<div><label class="hint">setup <a href="https://github.com/GridSpace/grid-host" target="_help">grid:host</a> for your network</label></div>
</div>
<div id="send-to-gridhead" class="header noshow"><label>grid:local</label></div>
<div id="send-to-gridspool" class="f-row box noshow">
<div class="grow f-row">
<div class="grow a-center j-center">
<label>target</label>
<select id="grid-local"></select>
</div>
<div class="f-col">
<button id="print-gridlocal">send</button>
<button id="admin-gridlocal">admin</button>
</div>
</div>
</div>

View file

@ -1,12 +0,0 @@
<div class="header"><label>export</label></div>
<div id="print-info" class="f-col box">
<div><label>file name</label><input id="print-filename" size="20" spellcheck="false" /></div>
<div><label>segments</label><input id="print-lines" size="12" disabled="true" /></div>
</div>
<div class="header"><label>download</label></div>
<div class="f-row box">
<button id="print-svg" class="grow">svg</button>
<button id="print-dxf" class="grow">dxf</button>
<button id="print-lg" class="grow">gcode</button>
</div>

View file

@ -1,12 +0,0 @@
<div class="header"><label>export</label></div>
<div id="print-info" class="f-col box">
<div><label>file name</label><input id="print-filename" size="20" spellcheck="false" /></div>
<div><label>resin used ML</label><input id="print-volume" size="10" spellcheck="false" /></div>
<div><label>layers</label><input id="print-layers" size="10" spellcheck="false" /></div>
<div><label>print time</label><input id="print-time" size="10" spellcheck="false" /></div>
</div>
<div class="header"><label>download</label></div>
<div class="f-row box">
<button id="print-sla" class="grow">download</button>
</div>