admin/fs: link field overflowing on mobile

Massimo Melina committed Jan 24, 2024 at 19:24 UTC db849cf6d5f3bca46095a176f0245caae5dc1598
1 file changed +9 -1
admin/src/FileForm.ts
+9 -1
@@ -292,7 +292,15 @@ function LinkField({ value, statusApi }: LinkFieldProps) {
292 if (root)
293 value &&= value.indexOf(root) === 1 ? value.slice(root.length) : undefined
294 const link = prefix(data?.baseUrl || '', value)
295 - const RenderLink = useMemo(() => forwardRef((props: any, ref) => h(Link, { ref, ...props, href: link, style: { height: 'auto' }, target: 'frontend' }, link)), [link])
295 + const RenderLink = useMemo(() => forwardRef((props: any, ref) =>
296 + h(Link, {
297 + ref,
298 + ...props,
299 + href: link,
300 + style: { height: 'auto', overflow: 'hidden', textOverflow: 'ellipsis' },
301 + target: 'frontend',
302 + }, link)
303 + ), [link])
304 return h(Box, { display: 'flex' },
305 !urls ? 'error' : // check data is ok
306 h(DisplayField, {