mirror of
https://github.com/vladmandic/sdnext.git
synced 2026-01-27 15:02:48 +03:00
17 lines
567 B
JavaScript
17 lines
567 B
JavaScript
function setupControlUI() {
|
|
const tabs = ['input', 'output', 'preview'];
|
|
for (const tab of tabs) {
|
|
const btn = gradioApp().getElementById(`control-${tab}-button`);
|
|
btn.style.cursor = 'pointer';
|
|
btn.onclick = () => {
|
|
const t = gradioApp().getElementById(`control-tab-${tab}`);
|
|
t.style.display = t.style.display === 'none' ? 'block' : 'none';
|
|
const c = gradioApp().getElementById(`control-${tab}-column`);
|
|
c.style.flexGrow = c.style.flexGrow === '0' ? '9' : '0';
|
|
};
|
|
}
|
|
log('initControlUI');
|
|
}
|
|
|
|
onUiLoaded(setupControlUI);
|