mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 01:04:32 +02:00
fix control input media with non-english locales
Signed-off-by: vladmandic <mandic00@live.com>
This commit is contained in:
@@ -3,7 +3,11 @@ function controlInputMode(inputMode, ...args) {
|
||||
if (updateEl) updateEl.click();
|
||||
const tab = gradioApp().querySelector('#control-tab-input button.selected');
|
||||
if (!tab) return ['Image', ...args];
|
||||
let inputTab = tab.innerText;
|
||||
// let inputTab = tab.innerText;
|
||||
const tabs = Array.from(gradioApp().querySelectorAll('#control-tab-input button'));
|
||||
const tabIdx = tabs.findIndex((btn) => btn.classList.contains('selected'))
|
||||
const tabNames = ['Image', 'Video', 'Batch', 'Folder'];
|
||||
let inputTab = tabNames[tabIdx] || 'Image';
|
||||
log('controlInputMode', { mode: inputMode, tab: inputTab, kanvas: typeof Kanvas });
|
||||
if ((inputTab === 'Image') && (typeof 'Kanvas' !== 'undefined')) {
|
||||
inputTab = 'Kanvas';
|
||||
|
||||
Reference in New Issue
Block a user