avoid layout-shift for qr-codes

This commit is contained in:
ed 2024-11-22 22:44:44 +00:00
parent db069c3d4a
commit 5afb562aa3
3 changed files with 4 additions and 2 deletions

View file

@ -4673,7 +4673,7 @@ var fileman = (function () {
return; return;
} }
surl = surl.slice(15).trim(); surl = surl.slice(15).trim();
var txt = esc(surl) + '<img class="b64" src="' + surl + '?qr" />'; var txt = esc(surl) + '<img class="b64" width="100" height="100" src="' + surl + '?qr" />';
modal.confirm(txt + L.fs_ok, function() { modal.confirm(txt + L.fs_ok, function() {
cliptxt(surl, function () { cliptxt(surl, function () {
toast.ok(2, L.clipped); toast.ok(2, L.clipped);

View file

@ -45,7 +45,7 @@ function qr(e) {
function showqr(href) { function showqr(href) {
var vhref = href.replace('?qr&', '?').replace('?qr', ''); var vhref = href.replace('?qr&', '?').replace('?qr', '');
modal.alert(esc(vhref) + '<img class="b64" src="' + href + '" />'); modal.alert(esc(vhref) + '<img class="b64" width="100" height="100" src="' + href + '" />');
} }
(function() { (function() {

View file

@ -322,6 +322,8 @@ html.y #tth {
margin: .1em auto; margin: .1em auto;
width: 60%; width: 60%;
height: 60%; height: 60%;
background: #999;
background: rgba(128,128,128,0.2);
} }
#modalb { #modalb {
position: sticky; position: sticky;