mirror of
https://github.com/vladmandic/automatic
synced 2026-09-18 16:54:33 +02:00
add compact view
This commit is contained in:
@@ -6,6 +6,10 @@ const monitoredOpts = [
|
||||
{ sd_backend: () => gradioApp().getElementById('refresh_sd_model_checkpoint')?.click() },
|
||||
];
|
||||
|
||||
const AppyOpts = [
|
||||
{ compact_view: (val) => toggleCompact(val) },
|
||||
];
|
||||
|
||||
function updateOpts(json_string) {
|
||||
const settings_data = JSON.parse(json_string);
|
||||
for (const op of monitoredOpts) {
|
||||
@@ -16,6 +20,11 @@ function updateOpts(json_string) {
|
||||
if (callback) callback();
|
||||
}
|
||||
}
|
||||
for (const op of AppyOpts) {
|
||||
const key = Object.keys(op)[0];
|
||||
const callback = op[key];
|
||||
if (callback) callback(settings_data.values[key]);
|
||||
}
|
||||
opts = settings_data.values;
|
||||
opts_metadata = settings_data.metadata;
|
||||
Object.entries(opts_metadata).forEach(([opt, meta]) => {
|
||||
|
||||
Reference in New Issue
Block a user