Merge remote-tracking branch 'missionfloyd/extra-network-preview-lazyload' into dev
This commit is contained in:
commit
3d959f5b49
@ -1,6 +1,6 @@
|
|||||||
<div class='card' style={style} onclick={card_clicked}>
|
<div class='card' style={style} onclick={card_clicked}>
|
||||||
|
{background_image}
|
||||||
{metadata_button}
|
{metadata_button}
|
||||||
|
|
||||||
<div class='actions'>
|
<div class='actions'>
|
||||||
<div class='additional'>
|
<div class='additional'>
|
||||||
<ul>
|
<ul>
|
||||||
@ -12,4 +12,3 @@
|
|||||||
<span class='description'>{description}</span>
|
<span class='description'>{description}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -161,7 +161,7 @@ class ExtraNetworksPage:
|
|||||||
|
|
||||||
height = f"height: {shared.opts.extra_networks_card_height}px;" if shared.opts.extra_networks_card_height else ''
|
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 ''
|
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_button = ""
|
||||||
metadata = item.get("metadata")
|
metadata = item.get("metadata")
|
||||||
if metadata:
|
if metadata:
|
||||||
@ -186,7 +186,8 @@ class ExtraNetworksPage:
|
|||||||
return ""
|
return ""
|
||||||
|
|
||||||
args = {
|
args = {
|
||||||
"style": f"'display: none; {height}{width}{background_image}'",
|
"background_image": background_image,
|
||||||
|
"style": f"'display: none; {height}{width}'",
|
||||||
"prompt": item.get("prompt", None),
|
"prompt": item.get("prompt", None),
|
||||||
"tabname": json.dumps(tabname),
|
"tabname": json.dumps(tabname),
|
||||||
"local_preview": json.dumps(item["local_preview"]),
|
"local_preview": json.dumps(item["local_preview"]),
|
||||||
|
Loading…
Reference in New Issue
Block a user