create-basicjs 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bin/create-basicjs.js +2 -2
- package/bin/verify-package.js +16 -0
- package/package.json +4 -1
- package/payload/starter/AGENTS.md +84 -0
- package/payload/starter/CLAUDE.md +1 -0
- package/payload/starter/README.md +45 -0
- package/payload/starter/_basic/VERSION +1 -0
- package/payload/starter/_basic/assets/categories/cappuccino.png +0 -0
- package/payload/starter/_basic/assets/categories/chocolate-milk.png +0 -0
- package/payload/starter/_basic/assets/categories/coffee-cup.png +0 -0
- package/payload/starter/_basic/assets/categories/coffee.png +0 -0
- package/payload/starter/_basic/assets/categories/frappe.png +0 -0
- package/payload/starter/_basic/assets/categories/iced-caffee.png +0 -0
- package/payload/starter/_basic/assets/categories/milkshake.png +0 -0
- package/payload/starter/_basic/assets/categories/orange-juice.png +0 -0
- package/payload/starter/_basic/assets/categories/tea.png +0 -0
- package/payload/starter/_basic/assets/data-table/palette.svg +2 -0
- package/payload/starter/_basic/assets/data-table/people.js +104 -0
- package/payload/starter/_basic/assets/data-table/trash.svg +2 -0
- package/payload/starter/_basic/assets/fruids/brokoli.png +0 -0
- package/payload/starter/_basic/assets/fruids/cilek.png +0 -0
- package/payload/starter/_basic/assets/fruids/domates.png +0 -0
- package/payload/starter/_basic/assets/fruids/elma.png +0 -0
- package/payload/starter/_basic/assets/fruids/havuc.png +0 -0
- package/payload/starter/_basic/assets/fruids/karpuz.png +0 -0
- package/payload/starter/_basic/assets/fruids/limon.png +0 -0
- package/payload/starter/_basic/assets/fruids/muz.png +0 -0
- package/payload/starter/_basic/assets/fruids/nar.png +0 -0
- package/payload/starter/_basic/assets/fruids/patlican.png +0 -0
- package/payload/starter/_basic/assets/fruids/yabanmersini.png +0 -0
- package/payload/starter/_basic/assets/fruids/yesilbiber.png +0 -0
- package/payload/starter/_basic/assets/icons/alert-black.png +0 -0
- package/payload/starter/_basic/assets/icons/alert.png +0 -0
- package/payload/starter/_basic/assets/icons/arrow-drop.svg +3 -0
- package/payload/starter/_basic/assets/icons/arrow-rise.svg +3 -0
- package/payload/starter/_basic/assets/icons/close.svg +1 -0
- package/payload/starter/_basic/assets/icons/lamp-on.png +0 -0
- package/payload/starter/_basic/assets/icons/lamp.png +0 -0
- package/payload/starter/_basic/assets/icons/lock.png +0 -0
- package/payload/starter/_basic/assets/icons/panel.png +0 -0
- package/payload/starter/_basic/assets/icons/plant.png +0 -0
- package/payload/starter/_basic/assets/icons/trash.png +0 -0
- package/payload/starter/_basic/assets/icons/trash.svg +2 -0
- package/payload/starter/_basic/assets/tab-bar/settings.png +0 -0
- package/payload/starter/_basic/assets/tab-bar/status.png +0 -0
- package/payload/starter/_basic/assets/tab-bar/transactions.png +0 -0
- package/payload/starter/_basic/assets/tutorial/blueberries.png +0 -0
- package/payload/starter/_basic/assets/tutorial/carrot.png +0 -0
- package/payload/starter/_basic/assets/tutorial/olives.png +0 -0
- package/payload/starter/_basic/assets/tutorial/strawberry.png +0 -0
- package/payload/starter/_basic/assets/ui-bottom-bar/setting.svg +11 -0
- package/payload/starter/_basic/basic/LICENSE +14 -0
- package/payload/starter/_basic/basic/basic.css +277 -0
- package/payload/starter/_basic/basic/basic.js +3767 -0
- package/payload/starter/_basic/basic/basic.min.css +1 -0
- package/payload/starter/_basic/basic/basic.min.js +65 -0
- package/payload/starter/_basic/basic/font/open-sans/LICENSE.txt +206 -0
- package/payload/starter/_basic/basic/font/open-sans/OpenSans-Bold.ttf +0 -0
- package/payload/starter/_basic/basic/font/open-sans/OpenSans-Regular.ttf +0 -0
- package/payload/starter/_basic/basic/scroll-bar.js +536 -0
- package/payload/starter/_basic/basic/scroll-bar.min.js +2 -0
- package/payload/starter/_basic/comp/action-button/add.png +0 -0
- package/payload/starter/_basic/comp/action-button.js +522 -0
- package/payload/starter/_basic/comp/action-tab-bar.js +383 -0
- package/payload/starter/_basic/comp/app-bar.js +236 -0
- package/payload/starter/_basic/comp/badge-v2.js +246 -0
- package/payload/starter/_basic/comp/bottom-bar.js +547 -0
- package/payload/starter/_basic/comp/breadcrumbs.js +522 -0
- package/payload/starter/_basic/comp/chart-box/chart-4.5.1.umd.min.js +13 -0
- package/payload/starter/_basic/comp/chart-box/chart-js-LICENSE.md +9 -0
- package/payload/starter/_basic/comp/chart-box.js +868 -0
- package/payload/starter/_basic/comp/check-box.js +374 -0
- package/payload/starter/_basic/comp/context-menu.js +634 -0
- package/payload/starter/_basic/comp/currency-input-b.js +190 -0
- package/payload/starter/_basic/comp/data-table/arrow.svg +2 -0
- package/payload/starter/_basic/comp/data-table.js +865 -0
- package/payload/starter/_basic/comp/dialog.js +854 -0
- package/payload/starter/_basic/comp/email-input-b.js +57 -0
- package/payload/starter/_basic/comp/filters.js +493 -0
- package/payload/starter/_basic/comp/form.js +590 -0
- package/payload/starter/_basic/comp/full-screen-select/arrow.svg +2 -0
- package/payload/starter/_basic/comp/full-screen-select/cancel.svg +2 -0
- package/payload/starter/_basic/comp/full-screen-select.js +611 -0
- package/payload/starter/_basic/comp/gauge.js +435 -0
- package/payload/starter/_basic/comp/hold-to-confirm-button/trash-red.png +0 -0
- package/payload/starter/_basic/comp/hold-to-confirm-button/trash.png +0 -0
- package/payload/starter/_basic/comp/hold-to-confirm-button.js +280 -0
- package/payload/starter/_basic/comp/input-b.js +759 -0
- package/payload/starter/_basic/comp/item-list.js +1396 -0
- package/payload/starter/_basic/comp/label-editor.js +1137 -0
- package/payload/starter/_basic/comp/left-menu/_Material Symbols & Icons - Google Fonts.webloc +8 -0
- package/payload/starter/_basic/comp/left-menu/data-table.png +0 -0
- package/payload/starter/_basic/comp/left-menu/home.png +0 -0
- package/payload/starter/_basic/comp/left-menu/reports.png +0 -0
- package/payload/starter/_basic/comp/left-menu/setting.png +0 -0
- package/payload/starter/_basic/comp/left-menu.js +476 -0
- package/payload/starter/_basic/comp/line-progress-bar.js +192 -0
- package/payload/starter/_basic/comp/loading-screen.js +382 -0
- package/payload/starter/_basic/comp/login-page-v2.js +586 -0
- package/payload/starter/_basic/comp/mini-graph-box.js +483 -0
- package/payload/starter/_basic/comp/notice.js +227 -0
- package/payload/starter/_basic/comp/number-input-b.js +121 -0
- package/payload/starter/_basic/comp/numeric-keyboard.js +296 -0
- package/payload/starter/_basic/comp/page-control.js +745 -0
- package/payload/starter/_basic/comp/page-header.js +190 -0
- package/payload/starter/_basic/comp/password-input-b/hide-btn.png +0 -0
- package/payload/starter/_basic/comp/password-input-b/hide-btn2.png +0 -0
- package/payload/starter/_basic/comp/password-input-b/show-btn.png +0 -0
- package/payload/starter/_basic/comp/password-input-b/show-btn2.png +0 -0
- package/payload/starter/_basic/comp/password-input-b.js +164 -0
- package/payload/starter/_basic/comp/period-bar.js +435 -0
- package/payload/starter/_basic/comp/phone-input-b.js +287 -0
- package/payload/starter/_basic/comp/progress-bar.js +676 -0
- package/payload/starter/_basic/comp/property-panel.js +2740 -0
- package/payload/starter/_basic/comp/radio-button.js +467 -0
- package/payload/starter/_basic/comp/rich-text-editor.js +1061 -0
- package/payload/starter/_basic/comp/scrolling-text.js +296 -0
- package/payload/starter/_basic/comp/search-input-v2/clear-round.svg +1 -0
- package/payload/starter/_basic/comp/search-input-v2/clear.svg +1 -0
- package/payload/starter/_basic/comp/search-input-v2/filter.png +0 -0
- package/payload/starter/_basic/comp/search-input-v2/filter.svg +1 -0
- package/payload/starter/_basic/comp/search-input-v2/search.svg +1 -0
- package/payload/starter/_basic/comp/search-input-v2.js +427 -0
- package/payload/starter/_basic/comp/search-results.js +560 -0
- package/payload/starter/_basic/comp/select-box.js +1740 -0
- package/payload/starter/_basic/comp/select-color.js +603 -0
- package/payload/starter/_basic/comp/select-date.js +1003 -0
- package/payload/starter/_basic/comp/select-file.js +732 -0
- package/payload/starter/_basic/comp/select-time.js +979 -0
- package/payload/starter/_basic/comp/settings-row.js +298 -0
- package/payload/starter/_basic/comp/side-panel.js +573 -0
- package/payload/starter/_basic/comp/slider-field.js +776 -0
- package/payload/starter/_basic/comp/slider.js +368 -0
- package/payload/starter/_basic/comp/smart-button/alert-black.png +0 -0
- package/payload/starter/_basic/comp/smart-button/clock.png +0 -0
- package/payload/starter/_basic/comp/smart-button.js +896 -0
- package/payload/starter/_basic/comp/smart-table/clock.png +0 -0
- package/payload/starter/_basic/comp/smart-table/down.png +0 -0
- package/payload/starter/_basic/comp/smart-table/scroll.png +0 -0
- package/payload/starter/_basic/comp/smart-table/sort.png +0 -0
- package/payload/starter/_basic/comp/smart-table/up.png +0 -0
- package/payload/starter/_basic/comp/smart-table.js +1321 -0
- package/payload/starter/_basic/comp/sortable-list.js +1172 -0
- package/payload/starter/_basic/comp/spark-line-box.js +729 -0
- package/payload/starter/_basic/comp/stepper.js +699 -0
- package/payload/starter/_basic/comp/tabs.js +1317 -0
- package/payload/starter/_basic/comp/tag-input.js +1067 -0
- package/payload/starter/_basic/comp/tap-effect.js +168 -0
- package/payload/starter/_basic/comp/textarea-b.js +184 -0
- package/payload/starter/_basic/comp/time-line.js +324 -0
- package/payload/starter/_basic/comp/tiny-select/arrow.svg +1 -0
- package/payload/starter/_basic/comp/tiny-select.js +282 -0
- package/payload/starter/_basic/comp/tiny-table.js +279 -0
- package/payload/starter/_basic/comp/toast.js +838 -0
- package/payload/starter/_basic/comp/toggle.js +636 -0
- package/payload/starter/_basic/comp/tooltip.js +471 -0
- package/payload/starter/_basic/comp/tree-view.js +1096 -0
- package/payload/starter/_basic/comp/ui-effects.js +1091 -0
- package/payload/starter/_basic/comp/ui-standards.js +402 -0
- package/payload/starter/_basic/comp/url-input-b.js +145 -0
- package/payload/starter/_basic/comp/web-view.js +534 -0
- package/payload/starter/_basic/docs/basic-js-animated-rules.md +90 -0
- package/payload/starter/_basic/docs/basic-js-code-rules.md +91 -0
- package/payload/starter/_basic/docs/basic-js-components.md +134 -0
- package/payload/starter/_basic/docs/basic-js-core.md +131 -0
- package/payload/starter/_basic/docs/component-index.md +522 -0
- package/payload/starter/_basic/docs/component-template.js +416 -0
- package/payload/starter/_basic/docs/handbook/00-introduction.md +125 -0
- package/payload/starter/_basic/docs/handbook/00-what-is-new.md +96 -0
- package/payload/starter/_basic/docs/handbook/01-label.md +104 -0
- package/payload/starter/_basic/docs/handbook/02-box.md +166 -0
- package/payload/starter/_basic/docs/handbook/03-image.md +81 -0
- package/payload/starter/_basic/docs/handbook/04-common-properties.md +159 -0
- package/payload/starter/_basic/docs/handbook/05-autolayout.md +332 -0
- package/payload/starter/_basic/docs/handbook/06-button.md +103 -0
- package/payload/starter/_basic/docs/handbook/07-input.md +78 -0
- package/payload/starter/_basic/docs/handbook/08-page.md +120 -0
- package/payload/starter/_basic/docs/handbook/09-useful-examples.md +309 -0
- package/payload/starter/_basic/docs/handbook/10-motion.md +132 -0
- package/payload/starter/_basic/docs/handbook/11-other-functions.md +92 -0
- package/payload/starter/_basic/docs/handbook/12-utilities.md +123 -0
- package/payload/starter/_basic/docs/handbook/13-sound.md +88 -0
- package/payload/starter/_basic/docs/what-is-new.md +402 -0
- package/payload/starter/_basic/examples/action-button.htm +81 -0
- package/payload/starter/_basic/examples/action-tab-bar.htm +97 -0
- package/payload/starter/_basic/examples/app-bar.htm +140 -0
- package/payload/starter/_basic/examples/badgeV2.htm +68 -0
- package/payload/starter/_basic/examples/bottom-bar/grid.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/grids.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/home.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/homes.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/icon1.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/icon1s.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/icon2.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/icon2s.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/icon3.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/icon3s.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/icon4.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/icon4s.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/search.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/searchs.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/settings.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/settingss.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/tasks.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar/taskss.png +0 -0
- package/payload/starter/_basic/examples/bottom-bar-2.htm +187 -0
- package/payload/starter/_basic/examples/bottom-bar.htm +46 -0
- package/payload/starter/_basic/examples/breadcrumbs.htm +284 -0
- package/payload/starter/_basic/examples/chart-box.htm +287 -0
- package/payload/starter/_basic/examples/check-box-1.htm +220 -0
- package/payload/starter/_basic/examples/check-box-2.htm +212 -0
- package/payload/starter/_basic/examples/check-box-3.htm +179 -0
- package/payload/starter/_basic/examples/context-menu.htm +269 -0
- package/payload/starter/_basic/examples/currency-input-b.htm +71 -0
- package/payload/starter/_basic/examples/data-table-2.htm +67 -0
- package/payload/starter/_basic/examples/data-table-3.htm +72 -0
- package/payload/starter/_basic/examples/data-table-4.htm +144 -0
- package/payload/starter/_basic/examples/data-table-5.htm +152 -0
- package/payload/starter/_basic/examples/data-table.htm +178 -0
- package/payload/starter/_basic/examples/dialog-centered.htm +130 -0
- package/payload/starter/_basic/examples/dialog.htm +209 -0
- package/payload/starter/_basic/examples/email-input-b.htm +67 -0
- package/payload/starter/_basic/examples/filters.htm +115 -0
- package/payload/starter/_basic/examples/form-1.htm +123 -0
- package/payload/starter/_basic/examples/full-screen-select.htm +114 -0
- package/payload/starter/_basic/examples/gauge.htm +133 -0
- package/payload/starter/_basic/examples/hold-to-confirm-button.htm +144 -0
- package/payload/starter/_basic/examples/input-b-ex1.htm +132 -0
- package/payload/starter/_basic/examples/input-b-ex2.htm +136 -0
- package/payload/starter/_basic/examples/input-b-ex3-style.htm +113 -0
- package/payload/starter/_basic/examples/input-b-ex4-custom-unit.htm +112 -0
- package/payload/starter/_basic/examples/input-b-ex5-warning-icon.htm +80 -0
- package/payload/starter/_basic/examples/input-b-ex6-dark.htm +108 -0
- package/payload/starter/_basic/examples/input-b-ex7-ozden.htm +153 -0
- package/payload/starter/_basic/examples/item-list-2.htm +253 -0
- package/payload/starter/_basic/examples/item-list.htm +176 -0
- package/payload/starter/_basic/examples/label-editor.htm +196 -0
- package/payload/starter/_basic/examples/left-menu.htm +81 -0
- package/payload/starter/_basic/examples/line-progress-bar.htm +145 -0
- package/payload/starter/_basic/examples/loading-screen.htm +217 -0
- package/payload/starter/_basic/examples/login-page-dark-v2.htm +269 -0
- package/payload/starter/_basic/examples/login-page-v2.htm +269 -0
- package/payload/starter/_basic/examples/mini-graph-box.htm +229 -0
- package/payload/starter/_basic/examples/notice.htm +79 -0
- package/payload/starter/_basic/examples/number-input-b.htm +68 -0
- package/payload/starter/_basic/examples/numeric-keyboard.htm +100 -0
- package/payload/starter/_basic/examples/page-control.htm +262 -0
- package/payload/starter/_basic/examples/page-header.htm +117 -0
- package/payload/starter/_basic/examples/password-input-b.htm +70 -0
- package/payload/starter/_basic/examples/period-bar.htm +94 -0
- package/payload/starter/_basic/examples/phone-input-b-select-country.htm +298 -0
- package/payload/starter/_basic/examples/phone-input-b.htm +72 -0
- package/payload/starter/_basic/examples/progress-bar-ozden.htm +168 -0
- package/payload/starter/_basic/examples/progress-bar.htm +296 -0
- package/payload/starter/_basic/examples/property-panel.htm +216 -0
- package/payload/starter/_basic/examples/radio-button-1.htm +264 -0
- package/payload/starter/_basic/examples/radio-button-2.htm +256 -0
- package/payload/starter/_basic/examples/radio-button-3.htm +168 -0
- package/payload/starter/_basic/examples/rich-text-editor.htm +228 -0
- package/payload/starter/_basic/examples/scrolling-text.htm +75 -0
- package/payload/starter/_basic/examples/search-input-v2-ozden.htm +128 -0
- package/payload/starter/_basic/examples/search-input-v2-place.htm +80 -0
- package/payload/starter/_basic/examples/search-input-v2.htm +65 -0
- package/payload/starter/_basic/examples/search-results.htm +193 -0
- package/payload/starter/_basic/examples/select-box-ozden-item.htm +114 -0
- package/payload/starter/_basic/examples/select-box-ozden-text.htm +64 -0
- package/payload/starter/_basic/examples/select-box.htm +254 -0
- package/payload/starter/_basic/examples/select-color.htm +215 -0
- package/payload/starter/_basic/examples/select-date.htm +244 -0
- package/payload/starter/_basic/examples/select-file.htm +268 -0
- package/payload/starter/_basic/examples/select-time.htm +249 -0
- package/payload/starter/_basic/examples/settings-row.htm +193 -0
- package/payload/starter/_basic/examples/side-panel-2.htm +270 -0
- package/payload/starter/_basic/examples/side-panel.htm +219 -0
- package/payload/starter/_basic/examples/slider-field.htm +223 -0
- package/payload/starter/_basic/examples/slider.htm +180 -0
- package/payload/starter/_basic/examples/smart-button-2.htm +220 -0
- package/payload/starter/_basic/examples/smart-button-3-ozden.htm +320 -0
- package/payload/starter/_basic/examples/smart-button-4-dark.htm +102 -0
- package/payload/starter/_basic/examples/smart-button-5-features.htm +205 -0
- package/payload/starter/_basic/examples/smart-button.htm +252 -0
- package/payload/starter/_basic/examples/smart-table-1.htm +142 -0
- package/payload/starter/_basic/examples/smart-table-2.htm +191 -0
- package/payload/starter/_basic/examples/smart-table-3.htm +359 -0
- package/payload/starter/_basic/examples/smart-table-4.htm +158 -0
- package/payload/starter/_basic/examples/sortable-list.htm +250 -0
- package/payload/starter/_basic/examples/spark-line-box.htm +285 -0
- package/payload/starter/_basic/examples/stepper-2.htm +172 -0
- package/payload/starter/_basic/examples/stepper.htm +255 -0
- package/payload/starter/_basic/examples/tabs-2/coffee.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/i1-white.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/i1.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/i2-white.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/i2.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/i3-white.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/i3.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/i4-white.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/i4.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/i5-white.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/i5.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/lamp-on.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/lamp.png +0 -0
- package/payload/starter/_basic/examples/tabs-2/search.svg +2 -0
- package/payload/starter/_basic/examples/tabs-2.htm +188 -0
- package/payload/starter/_basic/examples/tabs.htm +300 -0
- package/payload/starter/_basic/examples/tag-input.htm +242 -0
- package/payload/starter/_basic/examples/tap-effect.htm +100 -0
- package/payload/starter/_basic/examples/textarea-b.htm +76 -0
- package/payload/starter/_basic/examples/time-line.htm +226 -0
- package/payload/starter/_basic/examples/tiny-select.htm +86 -0
- package/payload/starter/_basic/examples/tiny-table.htm +109 -0
- package/payload/starter/_basic/examples/toast.htm +262 -0
- package/payload/starter/_basic/examples/toggle-2.htm +163 -0
- package/payload/starter/_basic/examples/toggle-3.htm +218 -0
- package/payload/starter/_basic/examples/toggle.htm +93 -0
- package/payload/starter/_basic/examples/tooltip-2.htm +177 -0
- package/payload/starter/_basic/examples/tooltip-3.htm +212 -0
- package/payload/starter/_basic/examples/tooltip.htm +124 -0
- package/payload/starter/_basic/examples/tree-view.htm +285 -0
- package/payload/starter/_basic/examples/ui-effects.htm +463 -0
- package/payload/starter/_basic/examples/ui-standards.htm +261 -0
- package/payload/starter/_basic/examples/unfinished-login-page-dark-supabase.htm +221 -0
- package/payload/starter/_basic/examples/unfinished-login-page-supabase.htm +221 -0
- package/payload/starter/_basic/examples/url-input-b.htm +85 -0
- package/payload/starter/_basic/examples/web-view.htm +241 -0
- package/payload/starter/_basic/min/action-button.min.js +2 -0
- package/payload/starter/_basic/min/action-tab-bar.min.js +2 -0
- package/payload/starter/_basic/min/app-bar.min.js +2 -0
- package/payload/starter/_basic/min/badge-v2.min.js +2 -0
- package/payload/starter/_basic/min/bottom-bar.min.js +2 -0
- package/payload/starter/_basic/min/breadcrumbs.min.js +2 -0
- package/payload/starter/_basic/min/chart-box.min.js +2 -0
- package/payload/starter/_basic/min/check-box.min.js +2 -0
- package/payload/starter/_basic/min/context-menu.min.js +2 -0
- package/payload/starter/_basic/min/currency-input-b.min.js +2 -0
- package/payload/starter/_basic/min/data-table.min.js +2 -0
- package/payload/starter/_basic/min/dialog.min.js +2 -0
- package/payload/starter/_basic/min/email-input-b.min.js +2 -0
- package/payload/starter/_basic/min/filters.min.js +2 -0
- package/payload/starter/_basic/min/form.min.js +2 -0
- package/payload/starter/_basic/min/full-screen-select.min.js +2 -0
- package/payload/starter/_basic/min/gauge.min.js +2 -0
- package/payload/starter/_basic/min/hold-to-confirm-button.min.js +2 -0
- package/payload/starter/_basic/min/input-b.min.js +2 -0
- package/payload/starter/_basic/min/item-list.min.js +2 -0
- package/payload/starter/_basic/min/label-editor.min.js +2 -0
- package/payload/starter/_basic/min/left-menu.min.js +2 -0
- package/payload/starter/_basic/min/line-progress-bar.min.js +2 -0
- package/payload/starter/_basic/min/loading-screen.min.js +2 -0
- package/payload/starter/_basic/min/login-page-v2.min.js +2 -0
- package/payload/starter/_basic/min/mini-graph-box.min.js +2 -0
- package/payload/starter/_basic/min/notice.min.js +2 -0
- package/payload/starter/_basic/min/number-input-b.min.js +2 -0
- package/payload/starter/_basic/min/numeric-keyboard.min.js +2 -0
- package/payload/starter/_basic/min/page-control.min.js +2 -0
- package/payload/starter/_basic/min/page-header.min.js +2 -0
- package/payload/starter/_basic/min/password-input-b.min.js +2 -0
- package/payload/starter/_basic/min/period-bar.min.js +2 -0
- package/payload/starter/_basic/min/phone-input-b.min.js +2 -0
- package/payload/starter/_basic/min/progress-bar.min.js +2 -0
- package/payload/starter/_basic/min/property-panel.min.js +2 -0
- package/payload/starter/_basic/min/radio-button.min.js +2 -0
- package/payload/starter/_basic/min/rich-text-editor.min.js +2 -0
- package/payload/starter/_basic/min/scrolling-text.min.js +2 -0
- package/payload/starter/_basic/min/search-input-v2.min.js +2 -0
- package/payload/starter/_basic/min/search-results.min.js +2 -0
- package/payload/starter/_basic/min/select-box.min.js +2 -0
- package/payload/starter/_basic/min/select-color.min.js +2 -0
- package/payload/starter/_basic/min/select-date.min.js +2 -0
- package/payload/starter/_basic/min/select-file.min.js +2 -0
- package/payload/starter/_basic/min/select-time.min.js +2 -0
- package/payload/starter/_basic/min/settings-row.min.js +2 -0
- package/payload/starter/_basic/min/side-panel.min.js +2 -0
- package/payload/starter/_basic/min/slider-field.min.js +2 -0
- package/payload/starter/_basic/min/slider.min.js +2 -0
- package/payload/starter/_basic/min/smart-button.min.js +2 -0
- package/payload/starter/_basic/min/smart-table.min.js +2 -0
- package/payload/starter/_basic/min/sortable-list.min.js +2 -0
- package/payload/starter/_basic/min/spark-line-box.min.js +2 -0
- package/payload/starter/_basic/min/stepper.min.js +2 -0
- package/payload/starter/_basic/min/tabs.min.js +2 -0
- package/payload/starter/_basic/min/tag-input.min.js +2 -0
- package/payload/starter/_basic/min/tap-effect.min.js +2 -0
- package/payload/starter/_basic/min/textarea-b.min.js +2 -0
- package/payload/starter/_basic/min/time-line.min.js +2 -0
- package/payload/starter/_basic/min/tiny-select.min.js +2 -0
- package/payload/starter/_basic/min/tiny-table.min.js +2 -0
- package/payload/starter/_basic/min/toast.min.js +2 -0
- package/payload/starter/_basic/min/toggle.min.js +2 -0
- package/payload/starter/_basic/min/tooltip.min.js +2 -0
- package/payload/starter/_basic/min/tree-view.min.js +2 -0
- package/payload/starter/_basic/min/ui-effects.min.js +2 -0
- package/payload/starter/_basic/min/ui-standards.min.js +2 -0
- package/payload/starter/_basic/min/url-input-b.min.js +2 -0
- package/payload/starter/_basic/min/web-view.min.js +2 -0
- package/payload/starter/_basic/tools/build.js +175 -0
- package/payload/starter/_basic/tools/check.js +336 -0
- package/payload/starter/app/app.js +27 -0
- package/payload/starter/assets/.gitkeep +0 -0
- package/payload/starter/gitignore +3 -0
- package/payload/starter/index.htm +23 -0
- package/payload/templates/booking/TEMPLATE.md +77 -0
- package/payload/templates/booking/app/app.js +722 -0
- package/payload/templates/booking/app/settings.js +52 -0
- package/payload/templates/booking/app/store.js +265 -0
- package/payload/templates/booking/app/texts.js +148 -0
- package/payload/templates/booking/assets/app-icon.svg +1 -0
- package/payload/templates/booking/assets/tabs/account.svg +1 -0
- package/payload/templates/booking/assets/tabs/appointments.svg +1 -0
- package/payload/templates/booking/assets/tabs/home.svg +1 -0
- package/payload/templates/booking/assets/tabs/services.svg +1 -0
- package/payload/templates/booking/components/booking-ui.js +252 -0
- package/payload/templates/booking/index.htm +53 -0
- package/payload/templates/booking/pages/account.js +124 -0
- package/payload/templates/booking/pages/appointments.js +141 -0
- package/payload/templates/booking/pages/book.js +231 -0
- package/payload/templates/booking/pages/home.js +99 -0
- package/payload/templates/booking/pages/services.js +79 -0
- package/payload/templates/classic/TEMPLATE.md +104 -0
- package/payload/templates/classic/app/app.js +779 -0
- package/payload/templates/classic/app/settings.js +77 -0
- package/payload/templates/classic/assets/_attribute.txt +37 -0
- package/payload/templates/classic/assets/cards/dill.png +0 -0
- package/payload/templates/classic/assets/cards/fennel.png +0 -0
- package/payload/templates/classic/assets/cards/juniper.png +0 -0
- package/payload/templates/classic/assets/cards/olives.png +0 -0
- package/payload/templates/classic/assets/cards/oregano.png +0 -0
- package/payload/templates/classic/assets/cards/pepper.png +0 -0
- package/payload/templates/classic/assets/cards/rosehip.png +0 -0
- package/payload/templates/classic/assets/categories/cappuccino.png +0 -0
- package/payload/templates/classic/assets/categories/chocolate-milk.png +0 -0
- package/payload/templates/classic/assets/categories/coffee-cup.png +0 -0
- package/payload/templates/classic/assets/categories/coffee.png +0 -0
- package/payload/templates/classic/assets/categories/frappe.png +0 -0
- package/payload/templates/classic/assets/categories/iced-caffee.png +0 -0
- package/payload/templates/classic/assets/categories/milkshake.png +0 -0
- package/payload/templates/classic/assets/categories/orange-juice.png +0 -0
- package/payload/templates/classic/assets/categories/tea.png +0 -0
- package/payload/templates/classic/assets/example-tabs/coffee.png +0 -0
- package/payload/templates/classic/assets/example-tabs/i1-white.png +0 -0
- package/payload/templates/classic/assets/example-tabs/i1.png +0 -0
- package/payload/templates/classic/assets/example-tabs/i2-white.png +0 -0
- package/payload/templates/classic/assets/example-tabs/i2.png +0 -0
- package/payload/templates/classic/assets/example-tabs/i3-white.png +0 -0
- package/payload/templates/classic/assets/example-tabs/i3.png +0 -0
- package/payload/templates/classic/assets/example-tabs/i4-white.png +0 -0
- package/payload/templates/classic/assets/example-tabs/i4.png +0 -0
- package/payload/templates/classic/assets/example-tabs/i5-white.png +0 -0
- package/payload/templates/classic/assets/example-tabs/i5.png +0 -0
- package/payload/templates/classic/assets/example-tabs/lamp-on.png +0 -0
- package/payload/templates/classic/assets/example-tabs/lamp.png +0 -0
- package/payload/templates/classic/assets/example-tabs/search.svg +2 -0
- package/payload/templates/classic/assets/files/ai.png +0 -0
- package/payload/templates/classic/assets/files/doc.png +0 -0
- package/payload/templates/classic/assets/files/folder.png +0 -0
- package/payload/templates/classic/assets/files/js.png +0 -0
- package/payload/templates/classic/assets/files/pdf.png +0 -0
- package/payload/templates/classic/assets/files/txt.png +0 -0
- package/payload/templates/classic/assets/files/xls.png +0 -0
- package/payload/templates/classic/assets/icons/arrow-drop.svg +3 -0
- package/payload/templates/classic/assets/icons/arrow-rise.svg +3 -0
- package/payload/templates/classic/assets/icons/download.svg +18 -0
- package/payload/templates/classic/assets/icons/lamp-on.png +0 -0
- package/payload/templates/classic/assets/icons/lamp.png +0 -0
- package/payload/templates/classic/assets/icons/lock-small.png +0 -0
- package/payload/templates/classic/assets/icons/lock.png +0 -0
- package/payload/templates/classic/assets/icons/logo.png +0 -0
- package/payload/templates/classic/assets/icons/trash-red.svg +2 -0
- package/payload/templates/classic/assets/icons/trash.svg +2 -0
- package/payload/templates/classic/assets/menu/t1.png +0 -0
- package/payload/templates/classic/assets/menu/t10.png +0 -0
- package/payload/templates/classic/assets/menu/t11.png +0 -0
- package/payload/templates/classic/assets/menu/t2.png +0 -0
- package/payload/templates/classic/assets/menu/t3.png +0 -0
- package/payload/templates/classic/assets/menu/t4.png +0 -0
- package/payload/templates/classic/assets/menu/t5.png +0 -0
- package/payload/templates/classic/assets/menu/t6.png +0 -0
- package/payload/templates/classic/assets/menu/t7.png +0 -0
- package/payload/templates/classic/assets/menu/t8.png +0 -0
- package/payload/templates/classic/assets/menu/t9.png +0 -0
- package/payload/templates/classic/assets/products/brokoli.png +0 -0
- package/payload/templates/classic/assets/products/cilek.png +0 -0
- package/payload/templates/classic/assets/products/domates.png +0 -0
- package/payload/templates/classic/assets/products/elma.png +0 -0
- package/payload/templates/classic/assets/products/havuc.png +0 -0
- package/payload/templates/classic/assets/products/karpuz.png +0 -0
- package/payload/templates/classic/assets/products/limon.png +0 -0
- package/payload/templates/classic/assets/products/muz.png +0 -0
- package/payload/templates/classic/assets/products/nar.png +0 -0
- package/payload/templates/classic/assets/products/patlican.png +0 -0
- package/payload/templates/classic/assets/products/yabanmersini.png +0 -0
- package/payload/templates/classic/assets/products/yesilbiber.png +0 -0
- package/payload/templates/classic/assets/tab-bar/settings.png +0 -0
- package/payload/templates/classic/assets/tab-bar/status.png +0 -0
- package/payload/templates/classic/assets/tab-bar/transactions.png +0 -0
- package/payload/templates/classic/assets/tabs/grid.png +0 -0
- package/payload/templates/classic/assets/tabs/grids.png +0 -0
- package/payload/templates/classic/assets/tabs/home.png +0 -0
- package/payload/templates/classic/assets/tabs/homes.png +0 -0
- package/payload/templates/classic/assets/tabs/search.png +0 -0
- package/payload/templates/classic/assets/tabs/searchs.png +0 -0
- package/payload/templates/classic/assets/tabs/settings.png +0 -0
- package/payload/templates/classic/assets/tabs/settingss.png +0 -0
- package/payload/templates/classic/assets/tabs/tasks.png +0 -0
- package/payload/templates/classic/assets/tabs/taskss.png +0 -0
- package/payload/templates/classic/html/privacy.htm +58 -0
- package/payload/templates/classic/index.htm +70 -0
- package/payload/templates/classic/pages/dialogs.js +205 -0
- package/payload/templates/classic/pages/example.js +296 -0
- package/payload/templates/classic/pages/examples.js +148 -0
- package/payload/templates/classic/pages/home.js +268 -0
- package/payload/templates/classic/pages/info-pages.js +95 -0
- package/payload/templates/classic/pages/lock.js +70 -0
- package/payload/templates/classic/pages/search.js +153 -0
- package/payload/templates/classic/pages/settings.js +184 -0
- package/payload/templates/classic/pages/tasks.js +221 -0
- package/payload/templates/classic/pages/template-pages.js +240 -0
- package/payload/templates/coffee-shop/TEMPLATE.md +63 -0
- package/payload/templates/coffee-shop/app/app.js +713 -0
- package/payload/templates/coffee-shop/app/settings.js +20 -0
- package/payload/templates/coffee-shop/app/store.js +52 -0
- package/payload/templates/coffee-shop/assets/cappuccino.png +0 -0
- package/payload/templates/coffee-shop/assets/chocolate-milk.png +0 -0
- package/payload/templates/coffee-shop/assets/coffee-art/cocoa.svg +1 -0
- package/payload/templates/coffee-shop/assets/coffee-art/filter.svg +1 -0
- package/payload/templates/coffee-shop/assets/coffee-art/frappe.svg +1 -0
- package/payload/templates/coffee-shop/assets/coffee-art/iced.svg +1 -0
- package/payload/templates/coffee-shop/assets/coffee-art/latte.svg +1 -0
- package/payload/templates/coffee-shop/assets/coffee-art/tea.svg +1 -0
- package/payload/templates/coffee-shop/assets/coffee.png +0 -0
- package/payload/templates/coffee-shop/assets/credits.txt +41 -0
- package/payload/templates/coffee-shop/assets/fonts/OFL.txt +93 -0
- package/payload/templates/coffee-shop/assets/fonts/gelasio-OFL.txt +93 -0
- package/payload/templates/coffee-shop/assets/fonts/gelasio.ttf +0 -0
- package/payload/templates/coffee-shop/assets/frappe.png +0 -0
- package/payload/templates/coffee-shop/assets/iced-caffee.png +0 -0
- package/payload/templates/coffee-shop/assets/tabs/cart.svg +1 -0
- package/payload/templates/coffee-shop/assets/tabs/home.svg +1 -0
- package/payload/templates/coffee-shop/assets/tabs/menu.svg +1 -0
- package/payload/templates/coffee-shop/assets/tabs/rewards.svg +1 -0
- package/payload/templates/coffee-shop/assets/tea.png +0 -0
- package/payload/templates/coffee-shop/components/coffee-ui.js +246 -0
- package/payload/templates/coffee-shop/index.htm +55 -0
- package/payload/templates/coffee-shop/pages/cart.js +82 -0
- package/payload/templates/coffee-shop/pages/drink.js +74 -0
- package/payload/templates/coffee-shop/pages/home.js +54 -0
- package/payload/templates/coffee-shop/pages/menu.js +53 -0
- package/payload/templates/coffee-shop/pages/rewards.js +38 -0
- package/payload/templates/forms/TEMPLATE.md +12 -0
- package/payload/templates/forms/app/app.js +30 -0
- package/payload/templates/forms/appointment-form.htm +969 -0
- package/payload/templates/forms/assets/error.png +0 -0
- package/payload/templates/forms/assets/logo.png +0 -0
- package/payload/templates/forms/assets/logo2.png +0 -0
- package/payload/templates/forms/assets/mail.png +0 -0
- package/payload/templates/forms/assets/success.png +0 -0
- package/payload/templates/forms/contact-form-iframe.htm +24 -0
- package/payload/templates/forms/contact-form-table.sql +11 -0
- package/payload/templates/forms/contact-form-to-mail.htm +358 -0
- package/payload/templates/forms/contact-form-to-supabase.htm +396 -0
- package/payload/templates/forms/dark-contact-form.htm +623 -0
- package/payload/templates/forms/event-registration-form.htm +1056 -0
- package/payload/templates/forms/feedback-form.htm +813 -0
- package/payload/templates/forms/order-form.htm +1187 -0
- package/payload/templates/forms/recruitment-form.htm +698 -0
- package/payload/templates/forms/service/PHPMailer/Exception.php +40 -0
- package/payload/templates/forms/service/PHPMailer/LICENSE +502 -0
- package/payload/templates/forms/service/PHPMailer/PHPMailer.php +5586 -0
- package/payload/templates/forms/service/PHPMailer/SMTP.php +1617 -0
- package/payload/templates/forms/service/readme.md +162 -0
- package/payload/templates/forms/service/send-form-mail.php +941 -0
- package/payload/templates/forms/support-ticket-form.htm +908 -0
- package/payload/templates/panel/TEMPLATE.md +16 -0
- package/payload/templates/panel/assets/_Material Symbols & Icons - Google Fonts.webloc +8 -0
- package/payload/templates/panel/assets/arrow_down.png +0 -0
- package/payload/templates/panel/assets/close.png +0 -0
- package/payload/templates/panel/assets/left-menu/bolt.png +0 -0
- package/payload/templates/panel/assets/left-menu/brick.png +0 -0
- package/payload/templates/panel/assets/left-menu/code.png +0 -0
- package/payload/templates/panel/assets/left-menu/dashboard.png +0 -0
- package/payload/templates/panel/assets/left-menu/data-table.png +0 -0
- package/payload/templates/panel/assets/left-menu/extension.png +0 -0
- package/payload/templates/panel/assets/left-menu/home.png +0 -0
- package/payload/templates/panel/assets/left-menu/reports.png +0 -0
- package/payload/templates/panel/assets/left-menu/setting.png +0 -0
- package/payload/templates/panel/assets/left-menu/url.png +0 -0
- package/payload/templates/panel/assets/light.png +0 -0
- package/payload/templates/panel/assets/maybe.png +0 -0
- package/payload/templates/panel/assets/panel-icon.png +0 -0
- package/payload/templates/panel/assets/top-bar/add.png +0 -0
- package/payload/templates/panel/assets/top-bar/add.svg +1 -0
- package/payload/templates/panel/assets/top-bar/apps.png +0 -0
- package/payload/templates/panel/assets/top-bar/apps.svg +1 -0
- package/payload/templates/panel/assets/top-bar/arrow-down.svg +1 -0
- package/payload/templates/panel/assets/top-bar/bell.svg +1 -0
- package/payload/templates/panel/assets/top-bar/bookmark.png +0 -0
- package/payload/templates/panel/assets/top-bar/bookmark.svg +1 -0
- package/payload/templates/panel/assets/top-bar/cancel.png +0 -0
- package/payload/templates/panel/assets/top-bar/close.svg +1 -0
- package/payload/templates/panel/assets/top-bar/comment.png +0 -0
- package/payload/templates/panel/assets/top-bar/filter.png +0 -0
- package/payload/templates/panel/assets/top-bar/keyboard.svg +1 -0
- package/payload/templates/panel/assets/top-bar/notification.png +0 -0
- package/payload/templates/panel/assets/top-bar/search.png +0 -0
- package/payload/templates/panel/assets/top-bar/search.svg +1 -0
- package/payload/templates/panel/assets/top-bar/user.png +0 -0
- package/payload/templates/panel/assets/top-bar/user.svg +1 -0
- package/payload/templates/panel/assets/warning.png +0 -0
- package/payload/templates/panel/common/bridge.js +1 -0
- package/payload/templates/panel/common/bridge.min.js +0 -0
- package/payload/templates/panel/common/components.js +12 -0
- package/payload/templates/panel/common/full-view.js +107 -0
- package/payload/templates/panel/common/full-view.min.js +1 -0
- package/payload/templates/panel/common/main-view.js +53 -0
- package/payload/templates/panel/common/main-view.min.js +1 -0
- package/payload/templates/panel/common/module-page.js +46 -0
- package/payload/templates/panel/common/module-page.min.js +1 -0
- package/payload/templates/panel/common/right-view.js +77 -0
- package/payload/templates/panel/common/right-view.min.js +1 -0
- package/payload/templates/panel/common/start-page.js +31 -0
- package/payload/templates/panel/common/start-page.min.js +1 -0
- package/payload/templates/panel/common/theme.js +491 -0
- package/payload/templates/panel/common/top-bar-v25-07-29-1.js +330 -0
- package/payload/templates/panel/common/top-bar-v25-07-29-2.js +265 -0
- package/payload/templates/panel/common/top-bar.js +855 -0
- package/payload/templates/panel/common/top-bar.min.js +1 -0
- package/payload/templates/panel/common/ui-standards.css +77 -0
- package/payload/templates/panel/common/ui-standards.js +133 -0
- package/payload/templates/panel/common/ui-standards.min.css +1 -0
- package/payload/templates/panel/common/ui-standards.min.js +1 -0
- package/payload/templates/panel/index.htm +642 -0
- package/payload/templates/panel/managers/database.js +1 -0
- package/payload/templates/panel/managers/database.min.js +1 -0
- package/payload/templates/panel/managers/login.js +2 -0
- package/payload/templates/panel/managers/login.min.js +1 -0
- package/payload/templates/panel/module1/empty-main.htm +27 -0
- package/payload/templates/panel/module10/greenhouse.htm +1362 -0
- package/payload/templates/panel/module11/arduino-projects.htm +1125 -0
- package/payload/templates/panel/module2/empty-full.htm +27 -0
- package/payload/templates/panel/module3/empty-right.htm +27 -0
- package/payload/templates/panel/module4/empty-main-topbar.htm +27 -0
- package/payload/templates/panel/module5/empty-right-topbar.htm +27 -0
- package/payload/templates/panel/module6/energy-hub.htm +1508 -0
- package/payload/templates/panel/module7/3d-printers.htm +1259 -0
- package/payload/templates/panel/module8/cold-rooms.htm +1251 -0
- package/payload/templates/panel/module9/elevator-fleet.htm +1489 -0
- package/payload/templates/panel/pages/_page-template.js +36 -0
- package/payload/templates/panel/pages/_page-template.min.js +1 -0
- package/payload/templates/panel/pages/activity.js +1072 -0
- package/payload/templates/panel/pages/contents.js +1555 -0
- package/payload/templates/panel/pages/contents.min.js +1 -0
- package/payload/templates/panel/pages/customers.js +1171 -0
- package/payload/templates/panel/pages/edit-user.js +381 -0
- package/payload/templates/panel/pages/edit-user.min.js +1 -0
- package/payload/templates/panel/pages/edit-users-table.min.js +1 -0
- package/payload/templates/panel/pages/home.js +637 -0
- package/payload/templates/panel/pages/home.min.js +1 -0
- package/payload/templates/panel/pages/media.js +1538 -0
- package/payload/templates/panel/pages/notifications.js +542 -0
- package/payload/templates/panel/pages/notifications.min.js +1 -0
- package/payload/templates/panel/pages/orders.js +1147 -0
- package/payload/templates/panel/pages/products.js +1281 -0
- package/payload/templates/panel/pages/reports.js +1138 -0
- package/payload/templates/panel/pages/reports.min.js +1 -0
- package/payload/templates/panel/pages/roles.js +1096 -0
- package/payload/templates/panel/pages/settings.js +1462 -0
- package/payload/templates/panel/pages/settings.min.js +1 -0
- package/payload/templates/panel/pages/user-actions.js +456 -0
- package/payload/templates/panel/pages/user-actions.min.js +2 -0
- package/payload/templates/panel/pages/user-list.js +1113 -0
- package/payload/templates/panel/pages/users.js +334 -0
- package/payload/templates/panel/pages/users.min.js +1 -0
- package/payload/templates/shop/TEMPLATE.md +69 -0
- package/payload/templates/shop/app/app.js +727 -0
- package/payload/templates/shop/app/art.js +89 -0
- package/payload/templates/shop/app/settings.js +45 -0
- package/payload/templates/shop/app/store.js +239 -0
- package/payload/templates/shop/app/texts.js +232 -0
- package/payload/templates/shop/assets/app-icon.svg +1 -0
- package/payload/templates/shop/assets/tabs/account.svg +1 -0
- package/payload/templates/shop/assets/tabs/cart.svg +1 -0
- package/payload/templates/shop/assets/tabs/home.svg +1 -0
- package/payload/templates/shop/assets/tabs/shop.svg +1 -0
- package/payload/templates/shop/components/shop-ui.js +343 -0
- package/payload/templates/shop/index.htm +57 -0
- package/payload/templates/shop/pages/account.js +190 -0
- package/payload/templates/shop/pages/cart.js +116 -0
- package/payload/templates/shop/pages/checkout.js +134 -0
- package/payload/templates/shop/pages/favorites.js +37 -0
- package/payload/templates/shop/pages/home.js +86 -0
- package/payload/templates/shop/pages/orders.js +132 -0
- package/payload/templates/shop/pages/product.js +168 -0
- package/payload/templates/shop/pages/shop.js +113 -0
- package/payload/templates/starter/TEMPLATE.md +107 -0
- package/payload/templates/starter/app/app.js +660 -0
- package/payload/templates/starter/app/settings.js +57 -0
- package/payload/templates/starter/assets/app-icon.svg +5 -0
- package/payload/templates/starter/assets/products/brokoli.png +0 -0
- package/payload/templates/starter/assets/products/cilek.png +0 -0
- package/payload/templates/starter/assets/products/domates.png +0 -0
- package/payload/templates/starter/assets/products/elma.png +0 -0
- package/payload/templates/starter/assets/products/havuc.png +0 -0
- package/payload/templates/starter/assets/products/karpuz.png +0 -0
- package/payload/templates/starter/assets/products/limon.png +0 -0
- package/payload/templates/starter/assets/products/muz.png +0 -0
- package/payload/templates/starter/assets/products/nar.png +0 -0
- package/payload/templates/starter/assets/products/patlican.png +0 -0
- package/payload/templates/starter/assets/products/yabanmersini.png +0 -0
- package/payload/templates/starter/assets/products/yesilbiber.png +0 -0
- package/payload/templates/starter/assets/tabs/grid.png +0 -0
- package/payload/templates/starter/assets/tabs/grids.png +0 -0
- package/payload/templates/starter/assets/tabs/home.png +0 -0
- package/payload/templates/starter/assets/tabs/homes.png +0 -0
- package/payload/templates/starter/assets/tabs/settings.png +0 -0
- package/payload/templates/starter/assets/tabs/settingss.png +0 -0
- package/payload/templates/starter/assets/tabs/tasks.png +0 -0
- package/payload/templates/starter/assets/tabs/taskss.png +0 -0
- package/payload/templates/starter/html/about.htm +54 -0
- package/payload/templates/starter/index.htm +57 -0
- package/payload/templates/starter/pages/about.js +23 -0
- package/payload/templates/starter/pages/home.js +81 -0
- package/payload/templates/starter/pages/product.js +45 -0
- package/payload/templates/starter/pages/products.js +61 -0
- package/payload/templates/starter/pages/settings.js +103 -0
- package/payload/templates/starter/pages/tasks.js +187 -0
- package/payload/templates/starter/pages/website.js +29 -0
|
@@ -0,0 +1,1259 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta name="basic-check" content="skip">
|
|
5
|
+
|
|
6
|
+
<title>3D Printers</title>
|
|
7
|
+
|
|
8
|
+
<meta charset="UTF-8">
|
|
9
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0"><!-- , user-scalable=no -->
|
|
10
|
+
|
|
11
|
+
<!-- LIBRARY FILES -->
|
|
12
|
+
<link rel="preload" href="../_basic/basic/font/open-sans/OpenSans-Regular.ttf" as="font" crossorigin="anonymous">
|
|
13
|
+
<link rel="stylesheet" type="text/css" href="../_basic/basic/basic.min.css">
|
|
14
|
+
<script src="../_basic/basic/basic.js" type="text/javascript" charset="utf-8"></script>
|
|
15
|
+
<script src="../common/theme.js" type="text/javascript" charset="utf-8"></script>
|
|
16
|
+
|
|
17
|
+
<!-- COMPONENTS -->
|
|
18
|
+
<script src="../_basic/comp/tiny-select.js" type="text/javascript" charset="utf-8"></script>
|
|
19
|
+
<script src="../_basic/comp/toggle.js" type="text/javascript" charset="utf-8"></script>
|
|
20
|
+
<script src="../_basic/comp/slider.js" type="text/javascript" charset="utf-8"></script>
|
|
21
|
+
<script src="../_basic/comp/smart-button.js" type="text/javascript" charset="utf-8"></script>
|
|
22
|
+
<script src="../_basic/comp/dialog.js" type="text/javascript" charset="utf-8"></script>
|
|
23
|
+
<script src="../_basic/comp/hold-to-confirm-button.js" type="text/javascript" charset="utf-8"></script>
|
|
24
|
+
<script src="../_basic/comp/progress-bar.js" type="text/javascript" charset="utf-8"></script>
|
|
25
|
+
<script src="../_basic/comp/gauge.js" type="text/javascript" charset="utf-8"></script>
|
|
26
|
+
<script src="../_basic/comp/chart-box.js" type="text/javascript" charset="utf-8"></script>
|
|
27
|
+
|
|
28
|
+
<!--
|
|
29
|
+
|
|
30
|
+
/* Bismillah */
|
|
31
|
+
|
|
32
|
+
Module #7: 3D Printers (Right View Template) - v26.09
|
|
33
|
+
|
|
34
|
+
- Control and monitoring of 3D printers in a narrow panel (right view): one column of cards.
|
|
35
|
+
- Print job: live preview (the object is printed layer by layer), progress, time, layer, pause / resume, cancel.
|
|
36
|
+
- Temperatures: nozzle and bed gauges (current and target), material presets, live chart.
|
|
37
|
+
- Motion: print speed, part fan, lights, jog pad (X, Y, Z, home) when the printer is not printing.
|
|
38
|
+
- Filament: spool, material, remaining amount, "enough for the job" check, load / unload.
|
|
39
|
+
- Queue: next jobs (start, remove) and an event log.
|
|
40
|
+
- Runs inside the admin panel (iframe), but it can work alone too.
|
|
41
|
+
- Simulation: 1 second = 1 minute of printing. Replace the "PRINTER SERVICE" functions with your API calls
|
|
42
|
+
(OctoPrint, Moonraker, PrusaLink...).
|
|
43
|
+
|
|
44
|
+
-->
|
|
45
|
+
|
|
46
|
+
<script>
|
|
47
|
+
|
|
48
|
+
// *** CONSTANTS:
|
|
49
|
+
const LIB_PATH = "../_basic/";
|
|
50
|
+
const ASSETS = "../assets/";
|
|
51
|
+
|
|
52
|
+
const PAGE_COLOR = T.page;
|
|
53
|
+
const CARD_COLOR = T.surface;
|
|
54
|
+
const CARD_BORDER_COLOR = Ink(0.1);
|
|
55
|
+
const FIELD_COLOR = T.surface2;
|
|
56
|
+
const PRIMARY_COLOR = T.primary;
|
|
57
|
+
const ACCENT_COLOR = T.accent;
|
|
58
|
+
const WARNING_COLOR = T.warning;
|
|
59
|
+
const ERROR_COLOR = T.danger;
|
|
60
|
+
const NOZZLE_COLOR = Theme.readable("#E8894A");
|
|
61
|
+
const BED_COLOR = T.info;
|
|
62
|
+
|
|
63
|
+
const TEMP_MAX = 300; // °C (gauge)
|
|
64
|
+
const CHART_COUNT = 60; // Seconds on the chart
|
|
65
|
+
const ROOM_TEMP = 24;
|
|
66
|
+
const GRAMS_PER_METER = 2.98; // 1.75 mm filament
|
|
67
|
+
|
|
68
|
+
const STATUS_LIST = {
|
|
69
|
+
printing: { text: "Printing", color: ACCENT_COLOR },
|
|
70
|
+
heating: { text: "Heating", color: NOZZLE_COLOR },
|
|
71
|
+
paused: { text: "Paused", color: WARNING_COLOR },
|
|
72
|
+
done: { text: "Finished", color: "#9085E9" },
|
|
73
|
+
idle: { text: "Idle", color: Theme.readable("#A9A79F") },
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
const PRESETS = [
|
|
77
|
+
{ id: "pla", label: "PLA · 215 / 60 °C", nozzle: 215, bed: 60 },
|
|
78
|
+
{ id: "petg", label: "PETG · 240 / 80 °C", nozzle: 240, bed: 80 },
|
|
79
|
+
{ id: "abs", label: "ABS · 255 / 100 °C", nozzle: 255, bed: 100 },
|
|
80
|
+
{ id: "off", label: "Cool down · 0 / 0", nozzle: 0, bed: 0 },
|
|
81
|
+
];
|
|
82
|
+
|
|
83
|
+
// Object shapes for the preview: [top width, bottom width] at height 0-1 (a list from the bottom to the top)
|
|
84
|
+
const SHAPES = {
|
|
85
|
+
vase: [0.42, 0.55, 0.66, 0.7, 0.66, 0.54, 0.4, 0.33, 0.34, 0.42],
|
|
86
|
+
planter: [0.5, 0.56, 0.62, 0.68, 0.74, 0.8, 0.86, 0.9],
|
|
87
|
+
stand: [0.9, 0.9, 0.22, 0.22, 0.22, 0.22, 0.6, 0.62],
|
|
88
|
+
gear: [0.8, 0.8, 0.8, 0.5, 0.5, 0.5],
|
|
89
|
+
frame: [0.95, 0.95, 0.3, 0.3, 0.95, 0.95],
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
// *** TEST DATA: (PRINTER SERVICE)
|
|
93
|
+
const PRINTERS = [
|
|
94
|
+
{
|
|
95
|
+
id: "p1", name: "Printer 1 · MK4S", model: "MK4S", ip: "192.168.1.60", firmware: "6.2.1",
|
|
96
|
+
status: "printing", pauseReason: "",
|
|
97
|
+
job: { file: "vase-spiral.gcode", shape: "vase", minutes: 212, done: 88, layers: 640, grams: 118, material: "PLA" },
|
|
98
|
+
nozzle: { temp: 215, target: 215 }, bed: { temp: 60, target: 60 },
|
|
99
|
+
speed: 100, fan: 80, lights: 1, position: { x: 118, y: 104, z: 0 },
|
|
100
|
+
filament: { material: "PLA", colorName: "Sunset Orange", color: "#E8894A", spoolG: 1000, leftG: 640 },
|
|
101
|
+
queue: [
|
|
102
|
+
{ file: "phone-stand.gcode", shape: "stand", minutes: 74, layers: 310, grams: 36, material: "PLA" },
|
|
103
|
+
{ file: "gear-set.gcode", shape: "gear", minutes: 128, layers: 240, grams: 52, material: "PLA" },
|
|
104
|
+
],
|
|
105
|
+
printHours: 1284,
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
id: "p2", name: "Printer 2 · MK4S", model: "MK4S", ip: "192.168.1.61", firmware: "6.1.3",
|
|
109
|
+
status: "idle", pauseReason: "",
|
|
110
|
+
job: null,
|
|
111
|
+
nozzle: { temp: ROOM_TEMP, target: 0 }, bed: { temp: ROOM_TEMP, target: 0 },
|
|
112
|
+
speed: 100, fan: 100, lights: 0, position: { x: 0, y: 0, z: 0 },
|
|
113
|
+
filament: { material: "PETG", colorName: "Ocean Blue", color: T.info, spoolG: 1000, leftG: 180 },
|
|
114
|
+
queue: [
|
|
115
|
+
{ file: "drone-frame.gcode", shape: "frame", minutes: 185, layers: 420, grams: 210, material: "PETG" },
|
|
116
|
+
{ file: "cable-clips.gcode", shape: "gear", minutes: 35, layers: 90, grams: 14, material: "PETG" },
|
|
117
|
+
],
|
|
118
|
+
printHours: 862,
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
id: "p3", name: "Printer 3 · XL", model: "XL", ip: "192.168.1.62", firmware: "6.2.1",
|
|
122
|
+
status: "paused", pauseReason: "Filament runout",
|
|
123
|
+
job: { file: "planter-large.gcode", shape: "planter", minutes: 340, done: 228, layers: 980, grams: 390, material: "PETG" },
|
|
124
|
+
nozzle: { temp: 170, target: 170 }, bed: { temp: 80, target: 80 },
|
|
125
|
+
speed: 100, fan: 60, lights: 1, position: { x: 12, y: 280, z: 0 },
|
|
126
|
+
filament: { material: "PETG", colorName: "Forest Green", color: T.accent, spoolG: 1000, leftG: 0 },
|
|
127
|
+
queue: [],
|
|
128
|
+
printHours: 2310,
|
|
129
|
+
},
|
|
130
|
+
];
|
|
131
|
+
|
|
132
|
+
// *** VARIABLES:
|
|
133
|
+
let printer = null; // Selected printer
|
|
134
|
+
let isReady = 0;
|
|
135
|
+
let isRendering = 0; // WHY: Component setters call onChange. Changes made by code must not be logged.
|
|
136
|
+
|
|
137
|
+
let printerSelect, lblStatus, lblSubtitle;
|
|
138
|
+
let previewBox, lblJobFile, lblJobInfo, jobProgress, grpJobButtons, btnPause, btnCancel, btnStartNext, lblJobEmpty, grpJob;
|
|
139
|
+
let gaugeNozzle, gaugeBed, presetSelect, chartTemp, lblTempInfo;
|
|
140
|
+
let lblSpeed, sliderSpeed, lblFan, sliderFan, toggleLights, grpJog, lblPosition;
|
|
141
|
+
let spoolBox, filamentLabels = {}, lblFilamentCheck, btnLoad, btnUnload;
|
|
142
|
+
let grpQueueHost, grpEventHost;
|
|
143
|
+
|
|
144
|
+
// First running function.
|
|
145
|
+
const start = function () {
|
|
146
|
+
|
|
147
|
+
page.color = PAGE_COLOR;
|
|
148
|
+
|
|
149
|
+
PRINTERS.forEach(initPrinter);
|
|
150
|
+
|
|
151
|
+
// BOX: Full screen scrollable container
|
|
152
|
+
// WHY: page does not scroll. Scrollable content must be inside a Box with scrollY: 1.
|
|
153
|
+
startBox(0, 0, "100%", "100%", {
|
|
154
|
+
color: "transparent",
|
|
155
|
+
scrollY: 1,
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
VGroup({
|
|
159
|
+
width: "100%",
|
|
160
|
+
height: "auto", // Grows with content, so the Box can scroll.
|
|
161
|
+
align: "left top",
|
|
162
|
+
gap: 14,
|
|
163
|
+
padding: [16, 18],
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
initHeader();
|
|
167
|
+
initJobCard();
|
|
168
|
+
initTemperatureCard();
|
|
169
|
+
initMotionCard();
|
|
170
|
+
initFilamentCard();
|
|
171
|
+
initQueueCard();
|
|
172
|
+
initEventCard();
|
|
173
|
+
|
|
174
|
+
endGroup();
|
|
175
|
+
|
|
176
|
+
endBox();
|
|
177
|
+
|
|
178
|
+
isReady = 1;
|
|
179
|
+
selectPrinter(0);
|
|
180
|
+
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
// Runs every second: one minute of printing.
|
|
184
|
+
const loop = function () {
|
|
185
|
+
|
|
186
|
+
if (!isReady) return;
|
|
187
|
+
|
|
188
|
+
PRINTERS.forEach(simulatePrinter);
|
|
189
|
+
|
|
190
|
+
const h = printer.history;
|
|
191
|
+
const last = h.labels.length - 1;
|
|
192
|
+
chartTemp.whenReady(function () {
|
|
193
|
+
chartTemp.addValue(h.labels[last], [h.nozzle[last], h.bed[last]]);
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
renderLive();
|
|
197
|
+
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
// *** PRINTER SERVICE (SIMULATION):
|
|
201
|
+
|
|
202
|
+
const initPrinter = function (p) {
|
|
203
|
+
p.events = [];
|
|
204
|
+
p.history = { labels: [], nozzle: [], bed: [] };
|
|
205
|
+
const now = Date.now();
|
|
206
|
+
for (let i = CHART_COUNT; i > 0; i--) {
|
|
207
|
+
pushHistory(p, new Date(now - i * 1000));
|
|
208
|
+
}
|
|
209
|
+
if (p.job) p.position.z = zForJob(p);
|
|
210
|
+
addEvent(p, "Info", "Connected (" + p.ip + ")");
|
|
211
|
+
if (p.status == "paused") addEvent(p, "Warning", "Print paused: " + p.pauseReason);
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
const pushHistory = function (p, date) {
|
|
215
|
+
const h = p.history;
|
|
216
|
+
h.labels.push(date.toLocaleTimeString("en-GB"));
|
|
217
|
+
h.nozzle.push(Math.round(p.nozzle.temp));
|
|
218
|
+
h.bed.push(Math.round(p.bed.temp));
|
|
219
|
+
for (const key in h) {
|
|
220
|
+
if (h[key].length > CHART_COUNT) h[key].shift();
|
|
221
|
+
}
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
// Temperatures move to the target. Target 0: cools to the room temperature.
|
|
225
|
+
const moveTemp = function (heater, heatStep, coolRate) {
|
|
226
|
+
const goal = (heater.target > 0) ? heater.target : ROOM_TEMP;
|
|
227
|
+
const diff = goal - heater.temp;
|
|
228
|
+
if (diff > 0) heater.temp += Math.min(diff, heatStep);
|
|
229
|
+
else heater.temp += diff * coolRate;
|
|
230
|
+
heater.temp += (Math.random() - 0.5) * ((heater.target > 0 && Math.abs(diff) < 3) ? 0.8 : 0.2);
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
const simulatePrinter = function (p) {
|
|
234
|
+
|
|
235
|
+
moveTemp(p.nozzle, 9, 0.08);
|
|
236
|
+
moveTemp(p.bed, 2.5, 0.04);
|
|
237
|
+
|
|
238
|
+
if (p.status == "heating") {
|
|
239
|
+
if (Math.abs(p.nozzle.temp - p.nozzle.target) < 3 && Math.abs(p.bed.temp - p.bed.target) < 2) {
|
|
240
|
+
p.status = "printing";
|
|
241
|
+
addEvent(p, "Success", "Target temperatures reached. Printing " + p.job.file);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
if (p.status == "printing") {
|
|
246
|
+
|
|
247
|
+
const minutes = p.speed / 100; // 1 second = 1 minute (at 100% speed)
|
|
248
|
+
const grams = p.job.grams / p.job.minutes * minutes;
|
|
249
|
+
|
|
250
|
+
if (p.filament.leftG <= 0) {
|
|
251
|
+
pausePrint(p, "Filament runout");
|
|
252
|
+
} else {
|
|
253
|
+
p.job.done = Math.min(p.job.minutes, p.job.done + minutes);
|
|
254
|
+
p.filament.leftG = Math.max(0, p.filament.leftG - grams);
|
|
255
|
+
p.position.x = Math.round(40 + Math.random() * 170);
|
|
256
|
+
p.position.y = Math.round(40 + Math.random() * 170);
|
|
257
|
+
p.position.z = zForJob(p);
|
|
258
|
+
p.printHours += minutes / 60;
|
|
259
|
+
if (p.job.done >= p.job.minutes) finishPrint(p);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
pushHistory(p, new Date());
|
|
265
|
+
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
const zForJob = function (p) {
|
|
269
|
+
return Math.round(p.job.done / p.job.minutes * p.job.layers * 0.2 * 10) / 10; // 0.2 mm layers
|
|
270
|
+
};
|
|
271
|
+
|
|
272
|
+
const startJob = function (p, job) {
|
|
273
|
+
p.job = Object.assign({ done: 0 }, job);
|
|
274
|
+
const preset = PRESETS.find(function (preset) { return preset.id == job.material.toLowerCase(); }) || PRESETS[0];
|
|
275
|
+
p.nozzle.target = preset.nozzle;
|
|
276
|
+
p.bed.target = preset.bed;
|
|
277
|
+
p.status = "heating";
|
|
278
|
+
p.pauseReason = "";
|
|
279
|
+
addEvent(p, "Info", "Job started: " + job.file + ". Heating to " + preset.nozzle + " / " + preset.bed + " °C");
|
|
280
|
+
};
|
|
281
|
+
|
|
282
|
+
const pausePrint = function (p, reason) {
|
|
283
|
+
p.status = "paused";
|
|
284
|
+
p.pauseReason = reason;
|
|
285
|
+
p.pausedNozzleTarget = p.nozzle.target;
|
|
286
|
+
p.nozzle.target = 170; // WHY: The nozzle is kept warm, but not hot, so the filament does not leak.
|
|
287
|
+
addEvent(p, (reason == "Paused by user") ? "Info" : "Warning", "Print paused: " + reason);
|
|
288
|
+
if (p == printer) renderAll();
|
|
289
|
+
};
|
|
290
|
+
|
|
291
|
+
const resumePrint = function (p) {
|
|
292
|
+
if (p.filament.leftG <= 0) {
|
|
293
|
+
addEvent(p, "Error", "Can not resume: load filament first");
|
|
294
|
+
return;
|
|
295
|
+
}
|
|
296
|
+
p.nozzle.target = p.pausedNozzleTarget || 215;
|
|
297
|
+
if (p.pausedBedTarget) p.bed.target = p.pausedBedTarget; // (the bed was cooled with "Cool down")
|
|
298
|
+
p.pausedBedTarget = 0;
|
|
299
|
+
p.status = "heating";
|
|
300
|
+
p.pauseReason = "";
|
|
301
|
+
addEvent(p, "Info", "Resuming the print");
|
|
302
|
+
renderAll();
|
|
303
|
+
};
|
|
304
|
+
|
|
305
|
+
const cancelPrint = function (p) {
|
|
306
|
+
addEvent(p, "Warning", "Job cancelled: " + p.job.file + " (" + Math.round(p.job.done / p.job.minutes * 100) + "%)");
|
|
307
|
+
p.job = null;
|
|
308
|
+
p.status = "idle";
|
|
309
|
+
p.nozzle.target = 0;
|
|
310
|
+
p.bed.target = 0;
|
|
311
|
+
renderAll();
|
|
312
|
+
};
|
|
313
|
+
|
|
314
|
+
const finishPrint = function (p) {
|
|
315
|
+
p.status = "done";
|
|
316
|
+
p.nozzle.target = 0;
|
|
317
|
+
p.bed.target = 0;
|
|
318
|
+
addEvent(p, "Success", "Print finished: " + p.job.file + " (" + formatMinutes(p.job.minutes) + ")");
|
|
319
|
+
if (p == printer) renderAll();
|
|
320
|
+
};
|
|
321
|
+
|
|
322
|
+
const clearBed = function (p) {
|
|
323
|
+
p.job = null;
|
|
324
|
+
p.status = "idle";
|
|
325
|
+
addEvent(p, "Info", "Print removed from the bed");
|
|
326
|
+
renderAll();
|
|
327
|
+
};
|
|
328
|
+
|
|
329
|
+
const addEvent = function (p, level, message) {
|
|
330
|
+
p.events.unshift({ time: new Date().toLocaleTimeString("en-GB"), level: level, message: message });
|
|
331
|
+
if (p.events.length > 50) p.events.pop();
|
|
332
|
+
if (p == printer && isReady) renderEvents();
|
|
333
|
+
};
|
|
334
|
+
|
|
335
|
+
// *** HELPERS:
|
|
336
|
+
|
|
337
|
+
const formatMinutes = function (minutes) {
|
|
338
|
+
minutes = Math.round(minutes);
|
|
339
|
+
return (minutes >= 60) ? Math.floor(minutes / 60) + " h " + (minutes % 60) + " min" : minutes + " min";
|
|
340
|
+
};
|
|
341
|
+
|
|
342
|
+
const escapeHtml = function (text) {
|
|
343
|
+
return String(text).replace(/[&<>"']/g, function (c) { return { "&": "&", "<": "<", ">": ">", "\"": """, "'": "'" }[c]; });
|
|
344
|
+
};
|
|
345
|
+
|
|
346
|
+
const isBusy = function (p) {
|
|
347
|
+
return p.status == "printing" || p.status == "heating";
|
|
348
|
+
};
|
|
349
|
+
|
|
350
|
+
const getNeededGrams = function (p) {
|
|
351
|
+
if (p.job) return p.job.grams * (1 - p.job.done / p.job.minutes);
|
|
352
|
+
if (p.queue.length) return p.queue[0].grams;
|
|
353
|
+
return 0;
|
|
354
|
+
};
|
|
355
|
+
|
|
356
|
+
// WHY: Some components have no enabled setting. "inert" blocks the mouse and keyboard for all the children.
|
|
357
|
+
const setInteractive = function (obj, enabled) {
|
|
358
|
+
obj.elem.inert = !enabled;
|
|
359
|
+
obj.opacity = (enabled) ? 1 : 0.4;
|
|
360
|
+
};
|
|
361
|
+
|
|
362
|
+
// Creates the content of a container again. (One group is started and ended in it.)
|
|
363
|
+
// WHY: setDefaultContainerBox() is not in the start/end list of basic.js. One wrapper group is safe.
|
|
364
|
+
const renderInto = function (container, buildContent) {
|
|
365
|
+
if (container.wrapper) container.wrapper.remove();
|
|
366
|
+
const previous = getDefaultContainerBox();
|
|
367
|
+
setDefaultContainerBox(container);
|
|
368
|
+
container.wrapper = VGroup({ width: "100%", height: "auto", align: "left top", gap: 0 });
|
|
369
|
+
buildContent();
|
|
370
|
+
endGroup();
|
|
371
|
+
setDefaultContainerBox(previous);
|
|
372
|
+
};
|
|
373
|
+
|
|
374
|
+
// *** VIEW HELPERS:
|
|
375
|
+
|
|
376
|
+
const startCard = function (title, subtitle) {
|
|
377
|
+
|
|
378
|
+
const card = VGroup({ width: "100%", height: "auto", align: "left top", gap: 14, padding: 16, color: CARD_COLOR, border: 1, borderColor: CARD_BORDER_COLOR, round: 12 });
|
|
379
|
+
|
|
380
|
+
startSpaceBetween();
|
|
381
|
+
VGroup({ width: "auto", height: "auto", align: "left top", gap: 0 });
|
|
382
|
+
Label({ text: title, fontSize: 15, textColor: Ink(0.95) });
|
|
383
|
+
that.elem.style.fontFamily = "opensans-bold";
|
|
384
|
+
if (subtitle) Label({ text: subtitle, fontSize: 12, textColor: Ink(0.45) });
|
|
385
|
+
endGroup();
|
|
386
|
+
card.lblRight = Label({ text: "", fontSize: 12, textColor: Ink(0.5) });
|
|
387
|
+
that.elem.style.whiteSpace = "nowrap";
|
|
388
|
+
endGroup();
|
|
389
|
+
|
|
390
|
+
return card;
|
|
391
|
+
|
|
392
|
+
};
|
|
393
|
+
|
|
394
|
+
const endCard = function () {
|
|
395
|
+
endGroup();
|
|
396
|
+
};
|
|
397
|
+
|
|
398
|
+
// GROUP: Left and right items (space between)
|
|
399
|
+
const startSpaceBetween = function (gap = 12) {
|
|
400
|
+
HGroup({ width: "100%", height: "auto", align: "left center", gap: gap });
|
|
401
|
+
that.elem.style.justifyContent = "space-between";
|
|
402
|
+
};
|
|
403
|
+
|
|
404
|
+
const createSmallTitle = function (text) {
|
|
405
|
+
Label({ text: text.toUpperCase(), fontSize: 11, textColor: Ink(0.45) });
|
|
406
|
+
that.elem.style.letterSpacing = "1px";
|
|
407
|
+
return that;
|
|
408
|
+
};
|
|
409
|
+
|
|
410
|
+
const setPill = function (label, text, color) {
|
|
411
|
+
label.text = text;
|
|
412
|
+
label.textColor = color;
|
|
413
|
+
label.color = ChartBox.alpha(color, 0.12);
|
|
414
|
+
label.borderColor = ChartBox.alpha(color, 0.4);
|
|
415
|
+
};
|
|
416
|
+
|
|
417
|
+
const createButton = function (text, onClick, params = {}) {
|
|
418
|
+
return SmartButton({
|
|
419
|
+
styleName: "classic",
|
|
420
|
+
width: params.width || "auto",
|
|
421
|
+
labelText: text,
|
|
422
|
+
iconFile: "",
|
|
423
|
+
onClick: onClick,
|
|
424
|
+
style: {
|
|
425
|
+
layout: { gap: 0, padding: [14, 8], align: "center center" },
|
|
426
|
+
icon: { width: 0, height: 0 },
|
|
427
|
+
label: { fontSize: 14, textColor: Ink(0.92) },
|
|
428
|
+
box: { color: (params.primary) ? PRIMARY_COLOR : FIELD_COLOR, border: 1, borderColor: CARD_BORDER_COLOR, round: 8 },
|
|
429
|
+
hover: { color: (params.primary) ? T.primaryHover : T.surface3 },
|
|
430
|
+
active: { color: (params.primary) ? T.primaryActive : T.surface4 },
|
|
431
|
+
},
|
|
432
|
+
});
|
|
433
|
+
};
|
|
434
|
+
|
|
435
|
+
const createSlider = function (color, onDragMove, onDragEnd) {
|
|
436
|
+
return Slider({
|
|
437
|
+
width: 250,
|
|
438
|
+
trackHeight: 8,
|
|
439
|
+
minThumbHeight: 26,
|
|
440
|
+
trackColor: color,
|
|
441
|
+
trackBackgroundColor: Ink(0.1),
|
|
442
|
+
thumbColor: Ink(0.9),
|
|
443
|
+
showValueOnSet: 0,
|
|
444
|
+
showValueOnDrag: 0, // WHY: Slider shows 0-100. The real value is shown in a label.
|
|
445
|
+
onDragMove: onDragMove,
|
|
446
|
+
onDragEnd: onDragEnd,
|
|
447
|
+
});
|
|
448
|
+
};
|
|
449
|
+
|
|
450
|
+
const createSelect = function (list, onSelect, height = 38) {
|
|
451
|
+
return TinySelect({
|
|
452
|
+
list: list,
|
|
453
|
+
height: height,
|
|
454
|
+
fontSize: 14,
|
|
455
|
+
color: FIELD_COLOR,
|
|
456
|
+
border: 1,
|
|
457
|
+
borderColor: CARD_BORDER_COLOR,
|
|
458
|
+
round: 8,
|
|
459
|
+
labelBoldFont: 0,
|
|
460
|
+
labelTextColor: Ink(0.9),
|
|
461
|
+
arrowIcon: LIB_PATH + "comp/tiny-select/arrow.svg",
|
|
462
|
+
arrowSize: 18,
|
|
463
|
+
invertIconColor: T.invertIcon,
|
|
464
|
+
listFontSize: 14,
|
|
465
|
+
listTextColor: Ink(0.85),
|
|
466
|
+
listOverTextColor: ACCENT_COLOR,
|
|
467
|
+
listBackgroundColor: FIELD_COLOR,
|
|
468
|
+
listBorderColor: Ink(0.15),
|
|
469
|
+
onSelect: function (index, id) {
|
|
470
|
+
if (isReady && !isRendering) onSelect(index, id);
|
|
471
|
+
},
|
|
472
|
+
});
|
|
473
|
+
};
|
|
474
|
+
|
|
475
|
+
// *** VIEW:
|
|
476
|
+
|
|
477
|
+
const initHeader = function () {
|
|
478
|
+
|
|
479
|
+
VGroup({ width: "100%", height: "auto", align: "left top", gap: 10 });
|
|
480
|
+
|
|
481
|
+
startSpaceBetween();
|
|
482
|
+
|
|
483
|
+
VGroup({ width: "auto", height: "auto", align: "left top", gap: 0 });
|
|
484
|
+
Label({ text: "3D Printers", fontSize: 22, textColor: Ink(0.95) });
|
|
485
|
+
that.elem.style.fontFamily = "opensans-bold";
|
|
486
|
+
lblSubtitle = Label({ text: "", fontSize: 12, textColor: Ink(0.45) });
|
|
487
|
+
endGroup();
|
|
488
|
+
|
|
489
|
+
lblStatus = Label({ text: "", fontSize: 13, round: 100, border: 1, padding: [12, 4] });
|
|
490
|
+
that.elem.style.whiteSpace = "nowrap";
|
|
491
|
+
|
|
492
|
+
endGroup();
|
|
493
|
+
|
|
494
|
+
printerSelect = createSelect(PRINTERS.map(function (p) { return { id: p.id, label: p.name }; }), function (index) {
|
|
495
|
+
selectPrinter(index);
|
|
496
|
+
}, 40);
|
|
497
|
+
printerSelect.elem.style.alignSelf = "stretch";
|
|
498
|
+
|
|
499
|
+
endGroup();
|
|
500
|
+
|
|
501
|
+
};
|
|
502
|
+
|
|
503
|
+
const initJobCard = function () {
|
|
504
|
+
|
|
505
|
+
const card = startCard("Print Job", "");
|
|
506
|
+
grpJob = card;
|
|
507
|
+
|
|
508
|
+
// Preview
|
|
509
|
+
HGroup({ width: "100%", height: "auto", align: "center center", color: T.surfaceDeep, round: 10, padding: [0, 6] });
|
|
510
|
+
that.elem.style.border = "1px solid " + Ink(0.06);
|
|
511
|
+
previewBox = Box({ width: "100%", height: "auto", color: "transparent" });
|
|
512
|
+
previewBox.position = "relative";
|
|
513
|
+
endGroup();
|
|
514
|
+
|
|
515
|
+
VGroup({ width: "100%", height: "auto", align: "left top", gap: 4 });
|
|
516
|
+
lblJobFile = Label({ text: "", fontSize: 15, textColor: Ink(0.95), width: "100%" });
|
|
517
|
+
that.elem.style.wordBreak = "break-all";
|
|
518
|
+
lblJobInfo = Label({ text: "", fontSize: 12, textColor: Ink(0.5), width: "100%" });
|
|
519
|
+
endGroup();
|
|
520
|
+
|
|
521
|
+
jobProgress = ProgressBar({
|
|
522
|
+
width: "100%",
|
|
523
|
+
valuePosition: "right",
|
|
524
|
+
styleName: "modern",
|
|
525
|
+
style: {
|
|
526
|
+
track: { height: 10, color: Ink(0.08) },
|
|
527
|
+
bar: { color: ACCENT_COLOR },
|
|
528
|
+
successBar: { color: "#9085E9" },
|
|
529
|
+
errorBar: { color: WARNING_COLOR },
|
|
530
|
+
valueText: { fontSize: 14, textColor: Ink(0.9) },
|
|
531
|
+
},
|
|
532
|
+
});
|
|
533
|
+
|
|
534
|
+
lblJobEmpty = Label({ text: "", fontSize: 13, textColor: Ink(0.5), width: "100%" });
|
|
535
|
+
|
|
536
|
+
grpJobButtons = HGroup({ width: "100%", height: "auto", align: "left center", gap: 8 });
|
|
537
|
+
that.elem.style.flexWrap = "wrap";
|
|
538
|
+
|
|
539
|
+
btnPause = createButton("Pause", function () {
|
|
540
|
+
if (printer.status == "paused") resumePrint(printer);
|
|
541
|
+
else if (isBusy(printer)) pausePrint(printer, "Paused by user");
|
|
542
|
+
else if (printer.status == "done") clearBed(printer);
|
|
543
|
+
}, { primary: 1 });
|
|
544
|
+
|
|
545
|
+
btnStartNext = createButton("Start Next Job", function () {
|
|
546
|
+
startNextJob(printer);
|
|
547
|
+
}, { primary: 1 });
|
|
548
|
+
|
|
549
|
+
// WHY: Hold to confirm, so a long print is not cancelled by mistake.
|
|
550
|
+
btnCancel = HoldToConfirmButton({
|
|
551
|
+
height: 38,
|
|
552
|
+
labelText: "Hold to Cancel",
|
|
553
|
+
completedText: "CANCELLED",
|
|
554
|
+
iconFile: LIB_PATH + "comp/hold-to-confirm-button/trash.png",
|
|
555
|
+
holdingIconFile: LIB_PATH + "comp/hold-to-confirm-button/trash-red.png",
|
|
556
|
+
holdDuration: 1500,
|
|
557
|
+
resetDelay: 800,
|
|
558
|
+
style: {
|
|
559
|
+
layout: { gap: 6, padding: [14, 0] },
|
|
560
|
+
icon: { width: 18, height: 18 },
|
|
561
|
+
label: { fontSize: 14, textColor: Ink(0.9) },
|
|
562
|
+
holdingLabel: { fontSize: 14, textColor: "#B03A2E" },
|
|
563
|
+
completedLabel: { fontSize: 14, textColor: T.primaryActive },
|
|
564
|
+
box: { color: FIELD_COLOR, border: 1, borderColor: CARD_BORDER_COLOR, round: 8 },
|
|
565
|
+
holdingBox: { color: "#FFD1CB", borderColor: ERROR_COLOR, round: 8 },
|
|
566
|
+
completedBox: { color: "#DFEFE6", borderColor: ACCENT_COLOR, round: 8 },
|
|
567
|
+
},
|
|
568
|
+
onConfirm: function () {
|
|
569
|
+
if (printer.job) cancelPrint(printer);
|
|
570
|
+
},
|
|
571
|
+
});
|
|
572
|
+
btnCancel.icon.elem.style.filter = T.iconFilter; // WHY: Only the normal icon is on a dark background.
|
|
573
|
+
|
|
574
|
+
endGroup();
|
|
575
|
+
|
|
576
|
+
endCard();
|
|
577
|
+
|
|
578
|
+
};
|
|
579
|
+
|
|
580
|
+
const initTemperatureCard = function () {
|
|
581
|
+
|
|
582
|
+
startCard("Temperatures", "Nozzle and heated bed");
|
|
583
|
+
|
|
584
|
+
// GAUGES: comp/gauge.js (half arc). One for the nozzle, one for the bed.
|
|
585
|
+
HGroup({ width: "100%", height: "auto", align: "center center", gap: 40, wrap: 1 });
|
|
586
|
+
gaugeNozzle = createHeaterGauge("Nozzle", NOZZLE_COLOR);
|
|
587
|
+
gaugeBed = createHeaterGauge("Bed", BED_COLOR);
|
|
588
|
+
endGroup();
|
|
589
|
+
|
|
590
|
+
startSpaceBetween();
|
|
591
|
+
createSmallTitle("Preset");
|
|
592
|
+
presetSelect = createSelect(PRESETS.map(function (preset) { return { id: preset.id, label: preset.label }; }), function (index) {
|
|
593
|
+
const preset = PRESETS[index];
|
|
594
|
+
// WHY: "Cool down" during a print went on printing with a cold nozzle: the print is paused first
|
|
595
|
+
const isPrinting = (printer.status == "printing" || printer.status == "heating");
|
|
596
|
+
if (!preset.nozzle && isPrinting) {
|
|
597
|
+
printer.pausedBedTarget = printer.bed.target;
|
|
598
|
+
pausePrint(printer, "Heaters turned off");
|
|
599
|
+
}
|
|
600
|
+
printer.nozzle.target = preset.nozzle;
|
|
601
|
+
printer.bed.target = preset.bed;
|
|
602
|
+
addEvent(printer, "Info", (preset.nozzle) ? "Targets set: " + preset.nozzle + " / " + preset.bed + " °C (" + preset.id.toUpperCase() + ")" : "Heaters turned off (cool down)");
|
|
603
|
+
renderLive();
|
|
604
|
+
});
|
|
605
|
+
endGroup();
|
|
606
|
+
|
|
607
|
+
lblTempInfo = Label({ text: "", fontSize: 12, textColor: Ink(0.45), width: "100%" });
|
|
608
|
+
|
|
609
|
+
chartTemp = ChartBox({
|
|
610
|
+
width: "100%",
|
|
611
|
+
height: 200,
|
|
612
|
+
type: "line",
|
|
613
|
+
theme: T.chartTheme,
|
|
614
|
+
legend: "top",
|
|
615
|
+
beginAtZero: 1,
|
|
616
|
+
maxCount: CHART_COUNT,
|
|
617
|
+
animated: 0,
|
|
618
|
+
labels: [],
|
|
619
|
+
datasets: [
|
|
620
|
+
{ label: "Nozzle", data: [], borderColor: NOZZLE_COLOR, tension: 0.3 },
|
|
621
|
+
{ label: "Bed", data: [], borderColor: BED_COLOR, tension: 0.3, fill: "origin", backgroundColor: ChartBox.gradient("rgba(57, 135, 229, 0.25)", "rgba(57, 135, 229, 0)") },
|
|
622
|
+
],
|
|
623
|
+
formatValue: function (value) { return value + " °C"; },
|
|
624
|
+
options: {
|
|
625
|
+
elements: { point: { radius: 0 } },
|
|
626
|
+
scales: { x: { ticks: { maxTicksLimit: 4 } }, y: { suggestedMax: 260 } },
|
|
627
|
+
},
|
|
628
|
+
style: {
|
|
629
|
+
box: { color: T.surfaceDeep, border: 1, borderColor: Ink(0.06), round: 10, padding: 10 },
|
|
630
|
+
chart: { colors: [NOZZLE_COLOR, BED_COLOR] },
|
|
631
|
+
},
|
|
632
|
+
});
|
|
633
|
+
|
|
634
|
+
endCard();
|
|
635
|
+
|
|
636
|
+
};
|
|
637
|
+
|
|
638
|
+
const initMotionCard = function () {
|
|
639
|
+
|
|
640
|
+
startCard("Motion & Speed", "");
|
|
641
|
+
|
|
642
|
+
// Speed
|
|
643
|
+
VGroup({ width: "100%", height: "auto", align: "left top", gap: 6 });
|
|
644
|
+
startSpaceBetween();
|
|
645
|
+
createSmallTitle("Print speed");
|
|
646
|
+
lblSpeed = Label({ text: "", fontSize: 15, textColor: Ink(0.95) });
|
|
647
|
+
that.elem.style.fontFamily = "opensans-bold";
|
|
648
|
+
endGroup();
|
|
649
|
+
sliderSpeed = createSlider(ACCENT_COLOR,
|
|
650
|
+
function (value) { lblSpeed.text = sliderToSpeed(value) + "%"; },
|
|
651
|
+
function () {
|
|
652
|
+
const speed = sliderToSpeed(sliderSpeed.getValue());
|
|
653
|
+
if (speed == printer.speed) return;
|
|
654
|
+
printer.speed = speed;
|
|
655
|
+
addEvent(printer, "Info", "Print speed set to " + speed + "%");
|
|
656
|
+
renderLive();
|
|
657
|
+
}
|
|
658
|
+
);
|
|
659
|
+
endGroup();
|
|
660
|
+
|
|
661
|
+
// Fan
|
|
662
|
+
VGroup({ width: "100%", height: "auto", align: "left top", gap: 6 });
|
|
663
|
+
startSpaceBetween();
|
|
664
|
+
createSmallTitle("Part cooling fan");
|
|
665
|
+
lblFan = Label({ text: "", fontSize: 15, textColor: Ink(0.95) });
|
|
666
|
+
that.elem.style.fontFamily = "opensans-bold";
|
|
667
|
+
endGroup();
|
|
668
|
+
sliderFan = createSlider(BED_COLOR,
|
|
669
|
+
function (value) { lblFan.text = Math.round(value) + "%"; },
|
|
670
|
+
function () {
|
|
671
|
+
const fan = Math.round(sliderFan.getValue());
|
|
672
|
+
if (fan == printer.fan) return;
|
|
673
|
+
printer.fan = fan;
|
|
674
|
+
addEvent(printer, "Info", "Fan speed set to " + fan + "%");
|
|
675
|
+
}
|
|
676
|
+
);
|
|
677
|
+
endGroup();
|
|
678
|
+
|
|
679
|
+
// Lights
|
|
680
|
+
startSpaceBetween();
|
|
681
|
+
VGroup({ width: "auto", height: "auto", align: "left top", gap: 0 });
|
|
682
|
+
Label({ text: "Chamber lights", fontSize: 14, textColor: Ink(0.9) });
|
|
683
|
+
Label({ text: "For the camera and a quick look", fontSize: 12, textColor: Ink(0.45) });
|
|
684
|
+
endGroup();
|
|
685
|
+
toggleLights = Toggle({
|
|
686
|
+
width: 52,
|
|
687
|
+
height: 30,
|
|
688
|
+
spacing: 3,
|
|
689
|
+
backgroundStyle: { color: T.surface3, selectedColor: PRIMARY_COLOR, border: 1, borderColor: CARD_BORDER_COLOR },
|
|
690
|
+
buttonStyle: { color: Ink(0.35), selectedColor: Ink(0.95) },
|
|
691
|
+
onChange: function (self) {
|
|
692
|
+
if (isRendering) return;
|
|
693
|
+
printer.lights = self.value;
|
|
694
|
+
addEvent(printer, "Info", "Lights turned " + ((self.value) ? "on" : "off"));
|
|
695
|
+
renderPreview();
|
|
696
|
+
},
|
|
697
|
+
});
|
|
698
|
+
endGroup();
|
|
699
|
+
|
|
700
|
+
// Jog pad
|
|
701
|
+
VGroup({ width: "100%", height: "auto", align: "left top", gap: 8 });
|
|
702
|
+
that.elem.style.borderTop = "1px solid " + Ink(0.06);
|
|
703
|
+
that.elem.style.paddingTop = "14px";
|
|
704
|
+
|
|
705
|
+
startSpaceBetween();
|
|
706
|
+
createSmallTitle("Move axes");
|
|
707
|
+
lblPosition = Label({ text: "", fontSize: 12, textColor: Ink(0.6) });
|
|
708
|
+
that.elem.style.fontVariantNumeric = "tabular-nums";
|
|
709
|
+
endGroup();
|
|
710
|
+
|
|
711
|
+
grpJog = HGroup({ width: "100%", height: "auto", align: "left center", gap: 16 });
|
|
712
|
+
|
|
713
|
+
// X / Y pad
|
|
714
|
+
const pad = VGroup({ width: "auto", height: "auto", align: "center center", gap: 4 });
|
|
715
|
+
createJogButton("Y+", function () { jog("y", 10); });
|
|
716
|
+
HGroup({ width: "auto", height: "auto", align: "center center", gap: 4 });
|
|
717
|
+
createJogButton("X−", function () { jog("x", -10); });
|
|
718
|
+
createJogButton("⌂", function () { homeAxes(); }, ACCENT_COLOR);
|
|
719
|
+
createJogButton("X+", function () { jog("x", 10); });
|
|
720
|
+
endGroup();
|
|
721
|
+
createJogButton("Y−", function () { jog("y", -10); });
|
|
722
|
+
endGroup();
|
|
723
|
+
|
|
724
|
+
// Z
|
|
725
|
+
VGroup({ width: "auto", height: "auto", align: "center center", gap: 4 });
|
|
726
|
+
createJogButton("Z+", function () { jog("z", 1); });
|
|
727
|
+
Label({ text: "1 mm", fontSize: 11, textColor: Ink(0.4) });
|
|
728
|
+
createJogButton("Z−", function () { jog("z", -1); });
|
|
729
|
+
endGroup();
|
|
730
|
+
|
|
731
|
+
Label({ text: "X / Y: 10 mm steps<br>⌂: Home all axes<br><span style='color:" + Ink(0.35) + "'>Not available while printing</span>", fontSize: 12, textColor: Ink(0.5) });
|
|
732
|
+
that.elem.style.lineHeight = "1.6";
|
|
733
|
+
|
|
734
|
+
endGroup();
|
|
735
|
+
|
|
736
|
+
endGroup();
|
|
737
|
+
|
|
738
|
+
endCard();
|
|
739
|
+
|
|
740
|
+
};
|
|
741
|
+
|
|
742
|
+
const createJogButton = function (text, onClick, color) {
|
|
743
|
+
const btn = HGroup({ width: 44, height: 44, align: "center center", round: 10, color: FIELD_COLOR, border: 1, borderColor: CARD_BORDER_COLOR });
|
|
744
|
+
btn.elem.style.cursor = "pointer";
|
|
745
|
+
btn.setMotion("background-color 0.15s");
|
|
746
|
+
btn.on("mouseover", function () { btn.color = T.surface3; });
|
|
747
|
+
btn.on("mouseout", function () { btn.color = FIELD_COLOR; });
|
|
748
|
+
btn.on("click", onClick);
|
|
749
|
+
Label({ text: text, fontSize: 14, textColor: color || Ink(0.85) });
|
|
750
|
+
endGroup();
|
|
751
|
+
return btn;
|
|
752
|
+
};
|
|
753
|
+
|
|
754
|
+
const initFilamentCard = function () {
|
|
755
|
+
|
|
756
|
+
const card = startCard("Filament", "");
|
|
757
|
+
filamentLabels.card = card;
|
|
758
|
+
|
|
759
|
+
HGroup({ width: "100%", height: "auto", align: "left center", gap: 16 });
|
|
760
|
+
|
|
761
|
+
spoolBox = Box({ width: 110, height: 110, color: "transparent" });
|
|
762
|
+
spoolBox.position = "relative";
|
|
763
|
+
spoolBox.elem.style.flexShrink = "0";
|
|
764
|
+
|
|
765
|
+
VGroup({ width: "auto", height: "auto", align: "left top", gap: 2 });
|
|
766
|
+
that.elem.style.flex = "1 1 auto";
|
|
767
|
+
that.elem.style.minWidth = "0";
|
|
768
|
+
filamentLabels.material = Label({ text: "", fontSize: 16, textColor: Ink(0.95) });
|
|
769
|
+
filamentLabels.color = Label({ text: "", fontSize: 13, textColor: Ink(0.6) });
|
|
770
|
+
filamentLabels.left = Label({ text: "", fontSize: 13, textColor: Ink(0.6) });
|
|
771
|
+
lblFilamentCheck = Label({ text: "", fontSize: 12, round: 6, padding: [8, 4], width: "auto" });
|
|
772
|
+
that.elem.style.marginTop = "6px";
|
|
773
|
+
endGroup();
|
|
774
|
+
|
|
775
|
+
endGroup();
|
|
776
|
+
|
|
777
|
+
HGroup({ width: "100%", height: "auto", align: "left center", gap: 8 });
|
|
778
|
+
|
|
779
|
+
btnLoad = createButton("Load New Spool", function () {
|
|
780
|
+
const p = printer;
|
|
781
|
+
Theme.confirm({
|
|
782
|
+
titleText: "Load New Spool",
|
|
783
|
+
messageText: "Put a new 1 kg spool of <b>" + p.filament.material + "</b> on the holder. The printer heats the nozzle and pulls the filament in.",
|
|
784
|
+
confirmText: "Filament Is Loaded",
|
|
785
|
+
onAnswer: function (isConfirmed) {
|
|
786
|
+
if (!isConfirmed) return;
|
|
787
|
+
p.filament.leftG = p.filament.spoolG;
|
|
788
|
+
addEvent(p, "Success", "New " + p.filament.material + " spool loaded (" + p.filament.spoolG + " g)");
|
|
789
|
+
if (p.status == "paused" && p.pauseReason == "Filament runout") resumePrint(p);
|
|
790
|
+
renderAll();
|
|
791
|
+
},
|
|
792
|
+
});
|
|
793
|
+
});
|
|
794
|
+
|
|
795
|
+
btnUnload = createButton("Unload", function () {
|
|
796
|
+
if (isBusy(printer)) return;
|
|
797
|
+
printer.filament.leftG = 0;
|
|
798
|
+
addEvent(printer, "Info", "Filament unloaded");
|
|
799
|
+
renderAll();
|
|
800
|
+
});
|
|
801
|
+
|
|
802
|
+
endGroup();
|
|
803
|
+
|
|
804
|
+
endCard();
|
|
805
|
+
|
|
806
|
+
};
|
|
807
|
+
|
|
808
|
+
const initQueueCard = function () {
|
|
809
|
+
|
|
810
|
+
const card = startCard("Queue", "Next jobs of this printer");
|
|
811
|
+
grpQueueHost = VGroup({ width: "100%", height: "auto", align: "left top", gap: 0 });
|
|
812
|
+
endGroup();
|
|
813
|
+
grpQueueHost.card = card;
|
|
814
|
+
endCard();
|
|
815
|
+
|
|
816
|
+
};
|
|
817
|
+
|
|
818
|
+
const initEventCard = function () {
|
|
819
|
+
|
|
820
|
+
startCard("Events", "");
|
|
821
|
+
grpEventHost = VGroup({ width: "100%", height: "auto", align: "left top", gap: 0 });
|
|
822
|
+
endGroup();
|
|
823
|
+
endCard();
|
|
824
|
+
|
|
825
|
+
};
|
|
826
|
+
|
|
827
|
+
// *** SVG:
|
|
828
|
+
|
|
829
|
+
// Print preview: the bed, the shape of the object, the printed part and the nozzle.
|
|
830
|
+
const createPreviewSvg = function (p) {
|
|
831
|
+
|
|
832
|
+
const W = 440, H = 230, bedY = 196, maxH = 150, maxW = 180, cx = W / 2;
|
|
833
|
+
const job = p.job;
|
|
834
|
+
const color = p.filament.color;
|
|
835
|
+
const light = (p.lights) ? 1 : 0.55;
|
|
836
|
+
|
|
837
|
+
let shape = "", printed = "", nozzle = "", layers = "";
|
|
838
|
+
|
|
839
|
+
if (job) {
|
|
840
|
+
|
|
841
|
+
const widths = SHAPES[job.shape] || SHAPES.vase;
|
|
842
|
+
const progress = job.done / job.minutes;
|
|
843
|
+
const top = bedY - maxH;
|
|
844
|
+
|
|
845
|
+
// Outline polygon (left side up, right side down)
|
|
846
|
+
const points = [];
|
|
847
|
+
widths.forEach(function (w, i) { points.push([cx - w * maxW / 2, bedY - i / (widths.length - 1) * maxH]); });
|
|
848
|
+
for (let i = widths.length - 1; i >= 0; i--) points.push([cx + widths[i] * maxW / 2, bedY - i / (widths.length - 1) * maxH]);
|
|
849
|
+
const d = "M" + points.map(function (pt) { return pt[0].toFixed(1) + " " + pt[1].toFixed(1); }).join(" L") + " Z";
|
|
850
|
+
|
|
851
|
+
const printedY = bedY - progress * maxH;
|
|
852
|
+
shape = "<path d='" + d + "' fill='" + Ink(0.03) + "' stroke='" + Ink(0.2) + "' stroke-width='1' stroke-dasharray='3 4'/>";
|
|
853
|
+
printed = "<clipPath id='cut'><rect id='cut-rect' x='0' y='" + printedY.toFixed(1) + "' width='" + W + "' height='" + (bedY - printedY + 1).toFixed(1) + "'/></clipPath>" +
|
|
854
|
+
"<path d='" + d + "' fill='url(#fill)' clip-path='url(#cut)'/>" +
|
|
855
|
+
"<g clip-path='url(#cut)' opacity='0.35'>" + (function () {
|
|
856
|
+
let lines = "";
|
|
857
|
+
for (let y = bedY - 4; y > top; y -= 4) lines += "<line x1='0' x2='" + W + "' y1='" + y + "' y2='" + y + "' stroke='black' stroke-width='1'/>";
|
|
858
|
+
return lines;
|
|
859
|
+
})() + "</g>";
|
|
860
|
+
|
|
861
|
+
// Nozzle on the top layer
|
|
862
|
+
const moving = (p.status == "printing") ? "nozzle-move" : "";
|
|
863
|
+
nozzle = "<g class='" + moving + "' style='transform-origin:" + cx + "px 0'>" +
|
|
864
|
+
"<g id='nozzle-pos' transform='translate(" + cx + " " + (printedY - 2).toFixed(1) + ")'>" +
|
|
865
|
+
"<rect x='-26' y='-40' width='52' height='20' rx='4' fill='#3A3A38' stroke='" + Ink(0.2) + "'/>" +
|
|
866
|
+
"<path d='M-9 -20 L9 -20 L4 -8 L-4 -8 Z' fill='#8A8A86'/>" +
|
|
867
|
+
"<path d='M-3 -8 L3 -8 L0 -1 Z' fill='" + ((p.nozzle.temp > 150) ? NOZZLE_COLOR : "#8A8A86") + "'/>" +
|
|
868
|
+
((p.status == "printing") ? "<circle cx='0' cy='0' r='3' fill='" + color + "'/>" : "") +
|
|
869
|
+
"</g></g>";
|
|
870
|
+
|
|
871
|
+
layers = "<text id='layer-text' x='16' y='26' class='t-small'>Layer " + Math.max(1, Math.round(progress * job.layers)) + " / " + job.layers + "</text>" +
|
|
872
|
+
"<text id='z-text' x='" + (W - 16) + "' y='26' text-anchor='end' class='t-small'>Z " + p.position.z.toFixed(1) + " mm</text>";
|
|
873
|
+
|
|
874
|
+
} else {
|
|
875
|
+
|
|
876
|
+
layers = "<text x='" + cx + "' y='" + (bedY - 70) + "' text-anchor='middle' class='t-empty'>" + ((p.queue.length) ? "Bed is empty · Next: " + escapeHtml(p.queue[0].file) : "Bed is empty") + "</text>";
|
|
877
|
+
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
const bed = "<rect x='50' y='" + bedY + "' width='" + (W - 100) + "' height='10' rx='3' fill='" + ((p.bed.temp > 40) ? ChartBox.alpha(BED_COLOR, 0.55) : T.surface4) + "'/>" +
|
|
881
|
+
"<rect x='40' y='" + (bedY + 10) + "' width='" + (W - 80) + "' height='6' rx='2' fill='#2A2A28'/>";
|
|
882
|
+
|
|
883
|
+
return "<svg viewBox='0 0 " + W + " " + H + "' style='display:block; width:100%; height:auto; opacity:" + light + "; transition: opacity 0.4s'>" +
|
|
884
|
+
"<style>" +
|
|
885
|
+
".t-small { fill:" + Ink(0.5) + "; font-size:12px; }" +
|
|
886
|
+
".t-empty { fill:" + Ink(0.4) + "; font-size:14px; }" +
|
|
887
|
+
".nozzle-move { animation: nozzle 1.6s ease-in-out infinite alternate; }" +
|
|
888
|
+
"@keyframes nozzle { from { transform: translateX(-60px); } to { transform: translateX(60px); } }" +
|
|
889
|
+
"</style>" +
|
|
890
|
+
"<defs><linearGradient id='fill' x1='0' y1='0' x2='1' y2='0'>" +
|
|
891
|
+
"<stop offset='0' stop-color='" + color + "' stop-opacity='0.75'/><stop offset='0.5' stop-color='" + color + "'/><stop offset='1' stop-color='" + color + "' stop-opacity='0.6'/>" +
|
|
892
|
+
"</linearGradient></defs>" +
|
|
893
|
+
shape + printed + bed + nozzle + layers +
|
|
894
|
+
"</svg>";
|
|
895
|
+
|
|
896
|
+
};
|
|
897
|
+
|
|
898
|
+
// One heater gauge: a half arc, the value in the middle and the target as a marker line.
|
|
899
|
+
const createHeaterGauge = function (titleText, color) {
|
|
900
|
+
const gauge = Gauge({
|
|
901
|
+
width: 190,
|
|
902
|
+
height: 125,
|
|
903
|
+
styleName: T.compStyle,
|
|
904
|
+
startAngle: -90, // The arc opens upwards.
|
|
905
|
+
sweepAngle: 180,
|
|
906
|
+
radius: 58,
|
|
907
|
+
minValue: 0,
|
|
908
|
+
maxValue: TEMP_MAX,
|
|
909
|
+
value: 0,
|
|
910
|
+
markerValue: 0, // The target.
|
|
911
|
+
valueSuffix: "°",
|
|
912
|
+
titleText: titleText,
|
|
913
|
+
style: {
|
|
914
|
+
bar: { color: color, width: 10 },
|
|
915
|
+
track: { width: 10 },
|
|
916
|
+
value: { fontSize: 26 },
|
|
917
|
+
sub: { fontSize: 12 },
|
|
918
|
+
},
|
|
919
|
+
});
|
|
920
|
+
// WHY: A fixed width keeps the two gauges next to each other, as they were in the
|
|
921
|
+
// single SVG before. The group centers them and wraps on a narrow card.
|
|
922
|
+
gauge.elem.style.flexShrink = "0";
|
|
923
|
+
return gauge;
|
|
924
|
+
};
|
|
925
|
+
|
|
926
|
+
// Spool: the filament ring gets thinner when it is used.
|
|
927
|
+
const createSpoolSvg = function (p) {
|
|
928
|
+
const f = p.filament;
|
|
929
|
+
const ratio = Math.max(0, Math.min(1, f.leftG / f.spoolG));
|
|
930
|
+
const inner = 22, outer = 50;
|
|
931
|
+
const r = inner + (outer - inner) * ratio;
|
|
932
|
+
let rings = "";
|
|
933
|
+
for (let rr = inner + 3; rr < r; rr += 3) rings += "<circle cx='55' cy='55' r='" + rr + "' fill='none' stroke='black' stroke-opacity='0.18' stroke-width='0.8'/>";
|
|
934
|
+
return "<svg viewBox='0 0 110 110' style='display:block; width:100%; height:100%'>" +
|
|
935
|
+
"<circle cx='55' cy='55' r='53' fill='#2A2A28' stroke='" + Ink(0.15) + "'/>" +
|
|
936
|
+
((ratio > 0) ? "<circle cx='55' cy='55' r='" + r.toFixed(1) + "' fill='" + f.color + "'/>" + rings : "") +
|
|
937
|
+
"<circle cx='55' cy='55' r='" + inner + "' fill='#1E1E1D' stroke='" + Ink(0.2) + "'/>" +
|
|
938
|
+
"<circle cx='55' cy='55' r='7' fill='" + PAGE_COLOR + "' stroke='" + Ink(0.25) + "'/>" +
|
|
939
|
+
[0, 120, 240].map(function (a) { const rad = a * Math.PI / 180; return "<circle cx='" + (55 + Math.cos(rad) * 14).toFixed(1) + "' cy='" + (55 + Math.sin(rad) * 14).toFixed(1) + "' r='3' fill='" + PAGE_COLOR + "'/>"; }).join("") +
|
|
940
|
+
"<text x='55' y='104' text-anchor='middle' style='fill:" + Ink(0.95) + "; font-size:0px'></text>" +
|
|
941
|
+
"</svg>";
|
|
942
|
+
};
|
|
943
|
+
|
|
944
|
+
// *** VALUE CONVERTERS:
|
|
945
|
+
|
|
946
|
+
const sliderToSpeed = function (value) {
|
|
947
|
+
return Math.round((50 + value * 1.5) / 10) * 10; // 50% - 200%
|
|
948
|
+
};
|
|
949
|
+
|
|
950
|
+
const speedToSlider = function (speed) {
|
|
951
|
+
return (speed - 50) / 1.5;
|
|
952
|
+
};
|
|
953
|
+
|
|
954
|
+
// *** ACTIONS:
|
|
955
|
+
|
|
956
|
+
const jog = function (axis, step) {
|
|
957
|
+
if (isBusy(printer)) return;
|
|
958
|
+
const limits = { x: 250, y: 210, z: 220 };
|
|
959
|
+
const p = printer.position;
|
|
960
|
+
p[axis] = Math.round(Math.max(0, Math.min(limits[axis], p[axis] + step)) * 10) / 10;
|
|
961
|
+
renderLive();
|
|
962
|
+
};
|
|
963
|
+
|
|
964
|
+
const homeAxes = function () {
|
|
965
|
+
if (isBusy(printer)) return;
|
|
966
|
+
printer.position = { x: 0, y: 0, z: 0 };
|
|
967
|
+
addEvent(printer, "Info", "All axes are homed");
|
|
968
|
+
renderLive();
|
|
969
|
+
};
|
|
970
|
+
|
|
971
|
+
const startNextJob = function (p) {
|
|
972
|
+
if (isBusy(p) || !p.queue.length) return;
|
|
973
|
+
const job = p.queue[0];
|
|
974
|
+
if (job.material != p.filament.material) {
|
|
975
|
+
addEvent(p, "Error", "Wrong filament: the job needs " + job.material + ", loaded " + p.filament.material);
|
|
976
|
+
return;
|
|
977
|
+
}
|
|
978
|
+
if (p.filament.leftG < job.grams) {
|
|
979
|
+
Theme.confirm({
|
|
980
|
+
titleText: "Not Enough Filament",
|
|
981
|
+
messageText: "<b>" + escapeHtml(job.file) + "</b> needs " + job.grams + " g, but " + Math.round(p.filament.leftG) + " g is left. The print will pause when the filament ends.",
|
|
982
|
+
confirmText: "Start Anyway",
|
|
983
|
+
onAnswer: function (isConfirmed) {
|
|
984
|
+
if (!isConfirmed) return;
|
|
985
|
+
p.queue.shift();
|
|
986
|
+
startJob(p, job);
|
|
987
|
+
renderAll();
|
|
988
|
+
},
|
|
989
|
+
});
|
|
990
|
+
return;
|
|
991
|
+
}
|
|
992
|
+
p.queue.shift();
|
|
993
|
+
startJob(p, job);
|
|
994
|
+
renderAll();
|
|
995
|
+
};
|
|
996
|
+
|
|
997
|
+
// *** RENDER:
|
|
998
|
+
|
|
999
|
+
const selectPrinter = function (index) {
|
|
1000
|
+
|
|
1001
|
+
printer = PRINTERS[index];
|
|
1002
|
+
|
|
1003
|
+
chartTemp.whenReady(function () {
|
|
1004
|
+
const h = printer.history;
|
|
1005
|
+
chartTemp.data.labels = h.labels.slice();
|
|
1006
|
+
chartTemp.data.datasets[0].data = h.nozzle.slice();
|
|
1007
|
+
chartTemp.data.datasets[1].data = h.bed.slice();
|
|
1008
|
+
chartTemp.update("none");
|
|
1009
|
+
});
|
|
1010
|
+
|
|
1011
|
+
renderAll();
|
|
1012
|
+
|
|
1013
|
+
};
|
|
1014
|
+
|
|
1015
|
+
const renderAll = function () {
|
|
1016
|
+
renderControls();
|
|
1017
|
+
renderPreview();
|
|
1018
|
+
renderLive();
|
|
1019
|
+
renderQueue();
|
|
1020
|
+
renderEvents();
|
|
1021
|
+
};
|
|
1022
|
+
|
|
1023
|
+
// Every second
|
|
1024
|
+
const renderLive = function () {
|
|
1025
|
+
|
|
1026
|
+
const p = printer;
|
|
1027
|
+
const status = STATUS_LIST[p.status];
|
|
1028
|
+
|
|
1029
|
+
setPill(lblStatus, "● " + status.text, status.color);
|
|
1030
|
+
lblSubtitle.text = p.model + " · " + p.ip + " · FW " + p.firmware + " · " + Math.round(p.printHours).toLocaleString("en-US") + " print hours";
|
|
1031
|
+
|
|
1032
|
+
renderJob();
|
|
1033
|
+
renderTemperatures();
|
|
1034
|
+
|
|
1035
|
+
lblSpeed.text = p.speed + "%";
|
|
1036
|
+
lblFan.text = p.fan + "%";
|
|
1037
|
+
lblPosition.text = "X " + p.position.x.toFixed(1) + " · Y " + p.position.y.toFixed(1) + " · Z " + p.position.z.toFixed(1) + " mm";
|
|
1038
|
+
setInteractive(grpJog, !isBusy(p));
|
|
1039
|
+
|
|
1040
|
+
renderFilament();
|
|
1041
|
+
|
|
1042
|
+
if (p.status == "printing") updatePreview(); // WHY: The printed part grows.
|
|
1043
|
+
|
|
1044
|
+
};
|
|
1045
|
+
|
|
1046
|
+
const renderJob = function () {
|
|
1047
|
+
|
|
1048
|
+
const p = printer;
|
|
1049
|
+
const job = p.job;
|
|
1050
|
+
|
|
1051
|
+
lblJobFile.visible = (job) ? 1 : 0;
|
|
1052
|
+
lblJobInfo.visible = (job) ? 1 : 0;
|
|
1053
|
+
jobProgress.visible = (job) ? 1 : 0;
|
|
1054
|
+
lblJobEmpty.visible = (job) ? 0 : 1;
|
|
1055
|
+
|
|
1056
|
+
if (job) {
|
|
1057
|
+
const progress = job.done / job.minutes;
|
|
1058
|
+
const left = (job.minutes - job.done) / (p.speed / 100);
|
|
1059
|
+
const eta = new Date(Date.now() + left * 60000).toLocaleTimeString("en-GB", { hour: "2-digit", minute: "2-digit" });
|
|
1060
|
+
lblJobFile.text = escapeHtml(job.file);
|
|
1061
|
+
lblJobInfo.text = job.material + " · " + job.grams + " g · Elapsed " + formatMinutes(job.done) +
|
|
1062
|
+
((p.status == "done") ? "" : " · Left " + formatMinutes(left) + " (ETA " + eta + ")") +
|
|
1063
|
+
((p.pauseReason) ? " · <span style='color:" + WARNING_COLOR + "'>" + escapeHtml(p.pauseReason) + "</span>" : "");
|
|
1064
|
+
jobProgress.setValue(Math.floor(progress * 1000) / 10, 1);
|
|
1065
|
+
jobProgress.setStatus((p.status == "done") ? "success" : (p.status == "paused") ? "error" : "normal");
|
|
1066
|
+
jobProgress.setTitleText("");
|
|
1067
|
+
} else {
|
|
1068
|
+
lblJobEmpty.text = (p.queue.length) ? "No job. " + p.queue.length + " jobs in the queue." : "No job and the queue is empty.";
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
grpJob.lblRight.text = (job) ? Math.floor(job.done / job.minutes * 100) + "%" : "";
|
|
1072
|
+
|
|
1073
|
+
btnPause.visible = (job) ? 1 : 0;
|
|
1074
|
+
btnPause.setText((p.status == "paused") ? "Resume" : (p.status == "done") ? "Clear the Bed" : "Pause");
|
|
1075
|
+
btnCancel.visible = (job && p.status != "done") ? 1 : 0;
|
|
1076
|
+
btnStartNext.visible = (!job && p.queue.length) ? 1 : 0;
|
|
1077
|
+
|
|
1078
|
+
};
|
|
1079
|
+
|
|
1080
|
+
const renderTemperatures = function () {
|
|
1081
|
+
|
|
1082
|
+
const set = function (gauge, heater) {
|
|
1083
|
+
gauge.setValue(Math.round(heater.temp));
|
|
1084
|
+
gauge.setMarkerValue(heater.target);
|
|
1085
|
+
gauge.setSubText((heater.target > 0) ? "Target " + heater.target + "°" : "Off");
|
|
1086
|
+
// WHY: With the heater off the target line means nothing, so it is hidden.
|
|
1087
|
+
gauge.elem.querySelector(".gauge-marker").style.opacity = (heater.target > 0) ? 1 : 0;
|
|
1088
|
+
};
|
|
1089
|
+
set(gaugeNozzle, printer.nozzle);
|
|
1090
|
+
set(gaugeBed, printer.bed);
|
|
1091
|
+
|
|
1092
|
+
const p = printer;
|
|
1093
|
+
const heating = (p.nozzle.target > 0 && p.nozzle.temp < p.nozzle.target - 3) || (p.bed.target > 0 && p.bed.temp < p.bed.target - 2);
|
|
1094
|
+
lblTempInfo.text = (heating) ? "Heating… ready in about " + Math.max(1, Math.ceil(Math.max((p.nozzle.target - p.nozzle.temp) / 9, (p.bed.target - p.bed.temp) / 2.5))) + " s"
|
|
1095
|
+
: (p.nozzle.target || p.bed.target) ? "Temperatures are stable." : "Heaters are off.";
|
|
1096
|
+
|
|
1097
|
+
};
|
|
1098
|
+
|
|
1099
|
+
const renderPreview = function () {
|
|
1100
|
+
previewBox.elem.innerHTML = createPreviewSvg(printer);
|
|
1101
|
+
previewBox.jobFile = (printer.job) ? printer.id + printer.job.file : "";
|
|
1102
|
+
};
|
|
1103
|
+
|
|
1104
|
+
// Only the printed height, the nozzle and the texts are changed.
|
|
1105
|
+
// WHY: Creating the SVG again every second restarts the nozzle animation (it jumps).
|
|
1106
|
+
const updatePreview = function () {
|
|
1107
|
+
const p = printer;
|
|
1108
|
+
const svg = previewBox.elem.querySelector("svg");
|
|
1109
|
+
if (!svg || !p.job || previewBox.jobFile != p.id + p.job.file || !svg.querySelector("#cut-rect")) return renderPreview();
|
|
1110
|
+
const bedY = 196, maxH = 150;
|
|
1111
|
+
const progress = p.job.done / p.job.minutes;
|
|
1112
|
+
const printedY = bedY - progress * maxH;
|
|
1113
|
+
const rect = svg.querySelector("#cut-rect");
|
|
1114
|
+
rect.setAttribute("y", printedY.toFixed(1));
|
|
1115
|
+
rect.setAttribute("height", (bedY - printedY + 1).toFixed(1));
|
|
1116
|
+
svg.querySelector("#nozzle-pos").setAttribute("transform", "translate(220 " + (printedY - 2).toFixed(1) + ")");
|
|
1117
|
+
svg.querySelector("#layer-text").textContent = "Layer " + Math.max(1, Math.round(progress * p.job.layers)) + " / " + p.job.layers;
|
|
1118
|
+
svg.querySelector("#z-text").textContent = "Z " + p.position.z.toFixed(1) + " mm";
|
|
1119
|
+
};
|
|
1120
|
+
|
|
1121
|
+
const renderFilament = function () {
|
|
1122
|
+
|
|
1123
|
+
const f = printer.filament;
|
|
1124
|
+
spoolBox.elem.innerHTML = createSpoolSvg(printer);
|
|
1125
|
+
|
|
1126
|
+
filamentLabels.material.text = f.material + " · 1.75 mm";
|
|
1127
|
+
filamentLabels.color.text = "<span style='color:" + f.color + "'>●</span> " + f.colorName;
|
|
1128
|
+
filamentLabels.left.text = Math.round(f.leftG) + " g left · about " + Math.round(f.leftG / GRAMS_PER_METER) + " m";
|
|
1129
|
+
filamentLabels.card.lblRight.text = Math.round(f.leftG / f.spoolG * 100) + "%";
|
|
1130
|
+
|
|
1131
|
+
const needed = getNeededGrams(printer);
|
|
1132
|
+
let text = "No job to check", color = Ink(0.5);
|
|
1133
|
+
if (needed > 0) {
|
|
1134
|
+
const what = (printer.job) ? "the job" : "the next job";
|
|
1135
|
+
if (f.leftG >= needed * 1.1) { text = "✓ Enough for " + what + " (" + Math.round(needed) + " g)"; color = ACCENT_COLOR; }
|
|
1136
|
+
else if (f.leftG > 0) { text = "! Not enough for " + what + " (" + Math.round(needed) + " g)"; color = WARNING_COLOR; }
|
|
1137
|
+
else { text = "✕ Spool is empty"; color = ERROR_COLOR; }
|
|
1138
|
+
}
|
|
1139
|
+
setPill(lblFilamentCheck, text, color);
|
|
1140
|
+
|
|
1141
|
+
setInteractive(btnLoad, !isBusy(printer));
|
|
1142
|
+
setInteractive(btnUnload, !isBusy(printer) && f.leftG > 0);
|
|
1143
|
+
|
|
1144
|
+
};
|
|
1145
|
+
|
|
1146
|
+
// Speed, fan, lights, preset
|
|
1147
|
+
const renderControls = function () {
|
|
1148
|
+
|
|
1149
|
+
const p = printer;
|
|
1150
|
+
isRendering = 1;
|
|
1151
|
+
|
|
1152
|
+
if (sliderToSpeed(sliderSpeed.getValue()) != p.speed) sliderSpeed.setValue(speedToSlider(p.speed));
|
|
1153
|
+
if (Math.round(sliderFan.getValue()) != p.fan) sliderFan.setValue(p.fan);
|
|
1154
|
+
if (toggleLights.value !== p.lights) toggleLights.setValue(p.lights);
|
|
1155
|
+
|
|
1156
|
+
const presetIndex = PRESETS.findIndex(function (preset) { return preset.nozzle == p.nozzle.target && preset.bed == p.bed.target; });
|
|
1157
|
+
if (presetIndex >= 0 && presetIndex != presetSelect.selectedIndex) presetSelect.setSelectedIndex(presetIndex);
|
|
1158
|
+
|
|
1159
|
+
const index = PRINTERS.indexOf(p);
|
|
1160
|
+
if (printerSelect.selectedIndex != index) printerSelect.setSelectedIndex(index);
|
|
1161
|
+
|
|
1162
|
+
isRendering = 0;
|
|
1163
|
+
|
|
1164
|
+
};
|
|
1165
|
+
|
|
1166
|
+
const renderQueue = function () {
|
|
1167
|
+
|
|
1168
|
+
const p = printer;
|
|
1169
|
+
grpQueueHost.card.lblRight.text = (p.queue.length) ? p.queue.length + " jobs · " + formatMinutes(p.queue.reduce(function (sum, job) { return sum + job.minutes; }, 0)) : "";
|
|
1170
|
+
|
|
1171
|
+
renderInto(grpQueueHost, function () {
|
|
1172
|
+
|
|
1173
|
+
if (!p.queue.length) {
|
|
1174
|
+
Label({ text: "The queue is empty. Send a job from your slicer.", fontSize: 13, textColor: Ink(0.45), padding: [0, 4] });
|
|
1175
|
+
return;
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
p.queue.forEach(function (job, index) {
|
|
1179
|
+
|
|
1180
|
+
HGroup({ width: "100%", height: "auto", align: "left center", gap: 12 });
|
|
1181
|
+
that.elem.style.padding = "10px 0px";
|
|
1182
|
+
if (index > 0) that.elem.style.borderTop = "1px solid " + Ink(0.06);
|
|
1183
|
+
|
|
1184
|
+
Label({ text: String(index + 1), fontSize: 13, textColor: Ink(0.5), width: 26, height: 26, round: 100, color: FIELD_COLOR, textAlign: "center" });
|
|
1185
|
+
that.elem.style.lineHeight = "26px";
|
|
1186
|
+
that.elem.style.flexShrink = "0";
|
|
1187
|
+
|
|
1188
|
+
VGroup({ width: "auto", height: "auto", align: "left top", gap: 0 });
|
|
1189
|
+
that.elem.style.flex = "1 1 auto";
|
|
1190
|
+
that.elem.style.minWidth = "0";
|
|
1191
|
+
Label({ text: escapeHtml(job.file), fontSize: 14, textColor: Ink(0.9), width: "100%" });
|
|
1192
|
+
that.elem.style.whiteSpace = "nowrap";
|
|
1193
|
+
that.elem.style.overflow = "hidden";
|
|
1194
|
+
that.elem.style.textOverflow = "ellipsis";
|
|
1195
|
+
const wrongMaterial = job.material != p.filament.material;
|
|
1196
|
+
Label({ text: formatMinutes(job.minutes) + " · " + job.grams + " g · " + ((wrongMaterial) ? "<span style='color:" + ERROR_COLOR + "'>" + job.material + " (not loaded)</span>" : job.material), fontSize: 12, textColor: Ink(0.45) });
|
|
1197
|
+
endGroup();
|
|
1198
|
+
|
|
1199
|
+
const btnRemove = HGroup({ width: 30, height: 30, align: "center center", round: 8 });
|
|
1200
|
+
btnRemove.elem.style.cursor = "pointer";
|
|
1201
|
+
btnRemove.elem.title = "Remove from the queue";
|
|
1202
|
+
btnRemove.on("mouseover", function () { btnRemove.color = Ink(0.08); });
|
|
1203
|
+
btnRemove.on("mouseout", function () { btnRemove.color = "transparent"; });
|
|
1204
|
+
btnRemove.on("click", function () {
|
|
1205
|
+
p.queue.splice(index, 1);
|
|
1206
|
+
addEvent(p, "Info", "Removed from the queue: " + job.file);
|
|
1207
|
+
renderAll();
|
|
1208
|
+
});
|
|
1209
|
+
Label({ text: "✕", fontSize: 14, textColor: Ink(0.5) });
|
|
1210
|
+
endGroup();
|
|
1211
|
+
|
|
1212
|
+
endGroup();
|
|
1213
|
+
|
|
1214
|
+
});
|
|
1215
|
+
|
|
1216
|
+
});
|
|
1217
|
+
|
|
1218
|
+
};
|
|
1219
|
+
|
|
1220
|
+
const renderEvents = function () {
|
|
1221
|
+
|
|
1222
|
+
const LEVEL_COLORS = { "Info": Ink(0.35), "Success": ACCENT_COLOR, "Warning": WARNING_COLOR, "Error": ERROR_COLOR };
|
|
1223
|
+
|
|
1224
|
+
renderInto(grpEventHost, function () {
|
|
1225
|
+
|
|
1226
|
+
printer.events.slice(0, 8).forEach(function (e, index) {
|
|
1227
|
+
|
|
1228
|
+
HGroup({ width: "100%", height: "auto", align: "left top", gap: 10 });
|
|
1229
|
+
that.elem.style.padding = "7px 0px";
|
|
1230
|
+
if (index > 0) that.elem.style.borderTop = "1px solid " + Ink(0.05);
|
|
1231
|
+
|
|
1232
|
+
Box({ width: 8, height: 8, round: 100, color: LEVEL_COLORS[e.level] });
|
|
1233
|
+
that.elem.style.marginTop = "6px";
|
|
1234
|
+
that.elem.style.flexShrink = "0";
|
|
1235
|
+
|
|
1236
|
+
Label({ text: escapeHtml(e.message), fontSize: 13, textColor: Ink(0.8), width: "auto" });
|
|
1237
|
+
that.elem.style.flex = "1 1 auto";
|
|
1238
|
+
that.elem.style.minWidth = "0";
|
|
1239
|
+
|
|
1240
|
+
Label({ text: e.time, fontSize: 12, textColor: Ink(0.4) });
|
|
1241
|
+
that.elem.style.flexShrink = "0";
|
|
1242
|
+
|
|
1243
|
+
endGroup();
|
|
1244
|
+
|
|
1245
|
+
});
|
|
1246
|
+
|
|
1247
|
+
});
|
|
1248
|
+
|
|
1249
|
+
};
|
|
1250
|
+
|
|
1251
|
+
</script>
|
|
1252
|
+
|
|
1253
|
+
</head>
|
|
1254
|
+
<body>
|
|
1255
|
+
|
|
1256
|
+
<!-- HTML content -->
|
|
1257
|
+
|
|
1258
|
+
</body>
|
|
1259
|
+
</html>
|