factor device dialog out of init. remove Pallete3 support

This commit is contained in:
Stewart Allen 2024-09-14 17:46:54 -04:00
commit f05bcbce4e
7 changed files with 402 additions and 649 deletions

View file

@ -15,6 +15,7 @@
// dep: kiri.widget
// dep: kiri.stats
// dep: kiri.stacks
// dep: kiri.devices
// dep: kiri.function
// dep: kiri.platform
// dep: kiri.selection
@ -71,12 +72,6 @@ gapp.register("kiri.main", (root, exports) => {
SECURE,
STACKS,
},
device: {
code: currentDeviceCode,
get: currentDeviceName,
set: noop, // set during init
clone: noop // set during init
},
dialog: {
show: showModal,
hide: hideModal,
@ -938,7 +933,7 @@ gapp.register("kiri.main", (root, exports) => {
// restore cached device profile for this mode
if (current.cdev[mode]) {
current.device = clone(current.cdev[mode]);
api.event.emit('device.select', currentDeviceName());
api.event.emit('device.select', api.device.get());
}
// hide/show
api.uc.setVisible($('set-tools'), mode === 'CAM');
@ -964,14 +959,6 @@ gapp.register("kiri.main", (root, exports) => {
}
}
function currentDeviceName() {
return settings.get().filter[getMode()];
}
function currentDeviceCode() {
return settings.get().devices[currentDeviceName()];
}
function currentProcessName() {
return settings.get().cproc[getMode()];
}