support adding modal dialogs in modules. add bambu printer manager dialog
This commit is contained in:
parent
384d8bdc58
commit
eb3bb95f4d
4 changed files with 83 additions and 23 deletions
|
|
@ -881,17 +881,19 @@ gapp.register("kiri.init", (root, exports) => {
|
|||
|
||||
modal: $('modal'),
|
||||
modalBox: $('modal-box'),
|
||||
help: $('mod-help'),
|
||||
setup: $('mod-setup'),
|
||||
prefs: $('mod-prefs'),
|
||||
files: $('mod-files'),
|
||||
saves: $('mod-saves'),
|
||||
tools: $('mod-tools'),
|
||||
xany: $('mod-x-any'),
|
||||
xsla: $('mod-x-sla'),
|
||||
xlaser: $('mod-x-laser'),
|
||||
local: $('mod-local'),
|
||||
any: $('mod-any'),
|
||||
modals: {
|
||||
help: $('mod-help'),
|
||||
setup: $('mod-setup'),
|
||||
prefs: $('mod-prefs'),
|
||||
files: $('mod-files'),
|
||||
saves: $('mod-saves'),
|
||||
tools: $('mod-tools'),
|
||||
xany: $('mod-x-any'),
|
||||
xsla: $('mod-x-sla'),
|
||||
xlaser: $('mod-x-laser'),
|
||||
local: $('mod-local'),
|
||||
any: $('mod-any'),
|
||||
},
|
||||
|
||||
catalogBody: $('catalogBody'),
|
||||
catalogList: $('catalogList'),
|
||||
|
|
|
|||
|
|
@ -641,8 +641,9 @@ gapp.register("kiri.main", (root, exports) => {
|
|||
visible = modalShowing(),
|
||||
info = { pct: 0 };
|
||||
|
||||
["help","setup","tools","prefs","saves","files","xany","xlaser","xsla","local","any"].forEach(name => {
|
||||
UI[name].style.display = name === which ? 'flex' : '';
|
||||
// hide all modals befroe showing another
|
||||
Object.keys(UI.modals).forEach(name => {
|
||||
UI.modals[name].style.display = name === which ? 'flex' : '';
|
||||
});
|
||||
|
||||
function ondone() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue