fix spacing issues around images/pdfs in ivans and rs

This commit is contained in:
2026-08-11 13:11:11 -07:00
parent 058b51795b
commit 2bea05bf29
2 changed files with 11 additions and 9 deletions
@@ -181,15 +181,16 @@ export default function RemoteSensing({ settings, widgetID }) {
w="100%" h="100%"
justify="space-between" align="center"
gap={2}
p={1} pl={3} pr={3}
borderTopRadius="lg"
borderBottomRadius={collapsible.open ? "0" : "lg"}
bg="gray.700"
>
<Flex direction="column" w="100%" minW={0} pl={3} textAlign="left" color="gray.100">
<Flex direction="column" w="100%" minW={0} textAlign="left" color="gray.100">
<Text truncate >{item?.volcano_name}</Text>
<Text truncate fontSize="xs" color="gray.300/90">{item?.country}</Text>
</Flex>
<Flex pr={3} minW={0} w="100%">
<Flex w="100%" minW={0} justify="right">
<Text truncate pl={2} pr={2} borderRadius="lg" bg="gray.800/50" color="gray.100" fontSize="sm">{item?.report_time}</Text>
</Flex>
</Flex>
@@ -225,13 +226,13 @@ export default function RemoteSensing({ settings, widgetID }) {
</a>
</Flex>
</object>
<br/>
</Box>
);
// IMAGE FILE TYPE
else if (file?.type === "image") return (
<Box key={index} w="100%" h="100%" p={1}>
<br />
<Flex dir="row" justify="space-between" align="center" mb={2}>
<Text pl={1} pr={1} bg="gray.600/50" borderRadius="md" fontSize="xs" color="gray.300">{file?.name}</Text>
<Text pl={1} pr={1} bg="gray.600/50" borderRadius="md" fontSize="xs" color="gray.300/90">PNG</Text>
@@ -246,6 +247,7 @@ export default function RemoteSensing({ settings, widgetID }) {
// DOWNLOADABLE LINK
else if (file?.type === "download") return (
<Flex key={index} dir="row" w="100%" h="100%" p={1} align="center" justify="space-between">
<br />
<Text pl={1} pr={1} bg="gray.600/50" borderRadius="md" fontSize="xs" color="gray.300">{file?.name}</Text>
<Button asChild variant="surface" size="xxs" fontSize="xs" pl={2} pr={2}>
<a href={file?.url} target="_blank" rel="noopener noreferrer">Download</a>