update extra networks

This commit is contained in:
Vladimir Mandic
2023-07-02 07:43:01 -04:00
parent ab52ae924f
commit d61b0cfd4c
6 changed files with 37 additions and 32 deletions
+4 -5
View File
@@ -32,19 +32,19 @@ function setupExtraNetworksForTab(tabname) {
if (rect.top > 0) {
if (!en) return
if (window.opts.extra_networks_card_cover == 'cover') {
en.style.zIndex = 0;
en.style.zIndex = 9999;
en.style.position = 'absolute';
en.style.right = 'unset';
en.style.width = 'unset';
el.style.height = document.body.offsetHeight - el.getBoundingClientRect().top + 'px';
gradioApp().getElementById(`${tabname}_settings`).parentNode.style.width = 'unset'
} if (window.opts.extra_networks_card_cover == 'sidebar') {
en.style.zIndex = 9999;
en.style.zIndex = 0;
en.style.position = 'absolute';
en.style.right = '0';
en.style.width = '38vw';
en.style.width = window.opts.extra_networks_sidebar_width + 'vw';
el.style.height = gradioApp().getElementById(`${tabname}_settings`).offsetHeight - 90 + 'px';
gradioApp().getElementById(`${tabname}_settings`).parentNode.style.width = '60vw'
gradioApp().getElementById(`${tabname}_settings`).parentNode.style.width = 100 - 2 - window.opts.extra_networks_sidebar_width + 'vw';
} else {
en.style.zIndex = 0;
en.style.position = 'relative';
@@ -156,7 +156,6 @@ function readCardDescription(event, tabname, filename, descript, extraPage, card
const button = gradioApp().getElementById(`${tabname}_read_description`);
textarea.value = filename;
description.value = descript;
console.log(textarea.value, description.value);
updateInput(textarea);
updateInput(description);
button.click();
+1 -1
View File
@@ -542,7 +542,7 @@ table.settings-value-table td{
.extra-networks-page { display: flex }
.extra-networks .custom-button { min-width: 60px; width: 100%; background: none; justify-content: left; padding: 2px 8px 2px 8px; box-shadow: none; }
.extra-networks .custom-button:hover { background: var(--button-primary-background-fill) }
.extra-network-cards { display: flex; flex-wrap: wrap; height: 50vh; overflow-y: scroll; overflow-x: hidden; scroll-snap-type: y mandatory; }
.extra-network-cards { display: flex; flex-wrap: wrap; height: 50vh; overflow-y: scroll; overflow-x: hidden; scroll-snap-type: y mandatory; width: -webkit-fill-available; }
.extra-network-cards .card { height: fit-content; margin: 0.5em; position: relative; scroll-snap-align: start; scroll-margin-top: 0; }
.extra-network-cards .card .overlay { position: absolute; bottom: 0; padding: 0.2em; z-index: 10; width: 100%; background: none; }
.extra-network-cards .card:hover .overlay { background: rgba(0, 0, 0, 0.40); }