mirror of https://github.com/vladmandic/automatic
Allow addition to monitored options
parent
3ca4ebf2d0
commit
93fc65b2ea
|
|
@ -53,6 +53,7 @@ const jsConfig = defineConfig([
|
|||
generateForever: 'readonly',
|
||||
showContributors: 'readonly',
|
||||
opts: 'writable',
|
||||
monitorOption: 'readonly',
|
||||
sortUIElements: 'readonly',
|
||||
all_gallery_buttons: 'readonly',
|
||||
selected_gallery_button: 'readonly',
|
||||
|
|
|
|||
|
|
@ -11,6 +11,10 @@ const monitoredOpts = [
|
|||
{ sd_backend: () => gradioApp().getElementById('refresh_sd_model_checkpoint')?.click() },
|
||||
];
|
||||
|
||||
function monitorOption(option, callback) {
|
||||
monitoredOpts.push({ [option]: callback });
|
||||
}
|
||||
|
||||
const AppyOpts = [
|
||||
{ compact_view: (val, old) => toggleCompact(val, old) },
|
||||
{ gradio_theme: (val, old) => setTheme(val, old) },
|
||||
|
|
|
|||
Loading…
Reference in New Issue