support adding modal dialogs in modules. add bambu printer manager dialog

This commit is contained in:
Stewart Allen 2025-01-26 22:46:44 -05:00
commit eb3bb95f4d
4 changed files with 83 additions and 23 deletions

View file

@ -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() {