Small fixes
This commit is contained in:
parent
94c171d6bf
commit
cc24134f37
|
@ -36,9 +36,13 @@ const { t, getLocalizedUrl } = await getI18n(currentLocale);
|
||||||
}
|
}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div>
|
{
|
||||||
{credits.length > 0 && <Credits credits={credits} />}
|
credits.length > 0 && (
|
||||||
</div>
|
<div>
|
||||||
|
<Credits credits={credits} />
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
@ -7,7 +7,7 @@ interface Props {
|
||||||
href: string;
|
href: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { icon = "material-symbols:folder", title, href, lang } = Astro.props;
|
const { icon = "material-symbols:folder-open", title, href, lang } = Astro.props;
|
||||||
---
|
---
|
||||||
|
|
||||||
{/* ------------------------------------------- HTML ------------------------------------------- */}
|
{/* ------------------------------------------- HTML ------------------------------------------- */}
|
||||||
|
|
|
@ -14,9 +14,22 @@ if (response instanceof Response) {
|
||||||
}
|
}
|
||||||
Astro.locals.sdkCalls.add(response.endpointCalled);
|
Astro.locals.sdkCalls.add(response.endpointCalled);
|
||||||
const image = response.data;
|
const image = response.data;
|
||||||
const { filename, translations, attributes, credits, createdAt, updatedAt, mimeType } = image;
|
const {
|
||||||
|
filename,
|
||||||
|
translations,
|
||||||
|
attributes,
|
||||||
|
credits,
|
||||||
|
createdAt,
|
||||||
|
updatedAt,
|
||||||
|
mimeType,
|
||||||
|
filesize,
|
||||||
|
width,
|
||||||
|
height,
|
||||||
|
} = image;
|
||||||
|
|
||||||
const { getLocalizedMatch, formatDate, t } = await getI18n(Astro.locals.currentLocale);
|
const { getLocalizedMatch, formatDate, t, formatFilesize } = await getI18n(
|
||||||
|
Astro.locals.currentLocale
|
||||||
|
);
|
||||||
|
|
||||||
const { pretitle, title, subtitle, description, language } =
|
const { pretitle, title, subtitle, description, language } =
|
||||||
translations.length > 0
|
translations.length > 0
|
||||||
|
@ -40,6 +53,18 @@ const metaAttributes = [
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
: []),
|
: []),
|
||||||
|
{
|
||||||
|
title: t("global.media.attributes.resolution"),
|
||||||
|
icon: "material-symbols:photo-size-select-large",
|
||||||
|
values: [{ name: `${width} x ${height}` }],
|
||||||
|
withBorder: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t("global.media.attributes.filesize"),
|
||||||
|
icon: "material-symbols:hard-drive",
|
||||||
|
values: [{ name: formatFilesize(filesize) }],
|
||||||
|
withBorder: false,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: t("global.media.attributes.createdAt"),
|
title: t("global.media.attributes.createdAt"),
|
||||||
icon: "material-symbols:calendar-add-on",
|
icon: "material-symbols:calendar-add-on",
|
||||||
|
|
Loading…
Reference in New Issue