Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Stable Diffusion Webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
novelai-storage
Stable Diffusion Webui
Commits
3d959f5b
Commit
3d959f5b
authored
May 18, 2023
by
AUTOMATIC
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'missionfloyd/extra-network-preview-lazyload' into dev
parents
6837cf6a
8410b135
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
4 deletions
+11
-4
html/extra-networks-card.html
html/extra-networks-card.html
+1
-2
modules/ui_extra_networks.py
modules/ui_extra_networks.py
+3
-2
style.css
style.css
+7
-0
No files found.
html/extra-networks-card.html
View file @
3d959f5b
<div
class=
'card'
style=
{style}
onclick=
{card_clicked}
>
{background_image}
{metadata_button}
<div
class=
'actions'
>
<div
class=
'additional'
>
<ul>
...
...
@@ -12,4 +12,3 @@
<span
class=
'description'
>
{description}
</span>
</div>
</div>
modules/ui_extra_networks.py
View file @
3d959f5b
...
...
@@ -161,7 +161,7 @@ class ExtraNetworksPage:
height
=
f
"height: {shared.opts.extra_networks_card_height}px;"
if
shared
.
opts
.
extra_networks_card_height
else
''
width
=
f
"width: {shared.opts.extra_networks_card_width}px;"
if
shared
.
opts
.
extra_networks_card_width
else
''
background_image
=
f
"background-image: url(
\"
{html.escape(preview)}
\"
);"
if
preview
else
''
background_image
=
f
'<img src="{html.escape(preview)}" class="preview" loading="lazy">'
if
preview
else
''
metadata_button
=
""
metadata
=
item
.
get
(
"metadata"
)
if
metadata
:
...
...
@@ -186,7 +186,8 @@ class ExtraNetworksPage:
return
""
args
=
{
"style"
:
f
"'display: none; {height}{width}{background_image}'"
,
"background_image"
:
background_image
,
"style"
:
f
"'display: none; {height}{width}'"
,
"prompt"
:
item
.
get
(
"prompt"
,
None
),
"tabname"
:
json
.
dumps
(
tabname
),
"local_preview"
:
json
.
dumps
(
item
[
"local_preview"
]),
...
...
style.css
View file @
3d959f5b
...
...
@@ -901,3 +901,10 @@ footer {
.extra-network-cards
.card
ul
a
:hover
{
color
:
red
;
}
.extra-network-cards
.card
.preview
{
position
:
absolute
;
object-fit
:
cover
;
width
:
100%
;
height
:
100%
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment