fix(photo-viewer): update iframe style to use aspect ratio

- Modified the iframe style in SharePanel to utilize the aspect ratio based on photo dimensions, enhancing responsiveness.

Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
Innei
2025-08-31 22:54:10 +08:00
parent c43ff365b5
commit 473fc90add

View File

@@ -282,8 +282,7 @@ export const SharePanel = ({ photo, trigger, blobSrc }: SharePanelProps) => {
<code className="text-text-secondary font-mono text-xs break-all whitespace-pre select-all">
{`<iframe
src="${siteConfig.url.replace(/\/$/, '')}/share/iframe?id=${photo.id}"
height="500"
style="width: 100%;"
style="width: 100%; aspect-ratio: ${photo.width} / ${photo.height}"
allowTransparency
sandbox="allow-scripts allow-same-origin allow-popups"
/>`}