mirror of
https://github.com/vladmandic/automatic
synced 2026-09-15 02:58:44 +02:00
Merge branch 'master' into master
This commit is contained in:
@@ -2,7 +2,6 @@ async function preloadImages() {
|
||||
const dark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||||
const imagePromises = [];
|
||||
const num = Math.floor(Math.random() * 7) + 1;
|
||||
|
||||
const imageUrls = [
|
||||
`file=html/logo-bg-${dark ? 'dark' : 'light'}.jpg`,
|
||||
`file=html/logo-bg-${num}.jpg`
|
||||
@@ -22,7 +21,9 @@ async function preloadImages() {
|
||||
console.error('Error preloading images:', error);
|
||||
}
|
||||
}
|
||||
|
||||
async function createSplash() {
|
||||
await preloadImages();
|
||||
const dark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||||
const num = Math.floor(Math.random() * 7) + 1;
|
||||
const splash = `
|
||||
@@ -38,8 +39,5 @@ async function removeSplash() {
|
||||
if (splash) splash.remove();
|
||||
console.log('removeSplash');
|
||||
}
|
||||
async function init() {
|
||||
await preloadImages();
|
||||
createSplash();
|
||||
}
|
||||
window.onload = init;
|
||||
|
||||
window.onload = createSplash;
|
||||
|
||||
@@ -13,6 +13,8 @@ function getUICurrentTabContent() {
|
||||
return gradioApp().querySelector('.tabitem[id^=tab_]:not([style*="display: none"])');
|
||||
}
|
||||
|
||||
const get_uiCurrentTabContent = getUICurrentTabContent;
|
||||
const get_uiCurrentTab = getUICurrentTab;
|
||||
const uiAfterUpdateCallbacks = [];
|
||||
const uiUpdateCallbacks = [];
|
||||
const uiLoadedCallbacks = [];
|
||||
|
||||
Reference in New Issue
Block a user