mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-09 15:05:35 +00:00
fix: collection name not displayed correctly when too large.
This commit is contained in:
@@ -33,14 +33,19 @@ export default function CollectionItem({
|
|||||||
href={appendCollectionId(route('dashboard').path, collection.id)}
|
href={appendCollectionId(route('dashboard').path, collection.id)}
|
||||||
key={collection.id}
|
key={collection.id}
|
||||||
ref={itemRef}
|
ref={itemRef}
|
||||||
|
title={collection.name}
|
||||||
>
|
>
|
||||||
<FolderIcon className={classes.linkIcon} />
|
<FolderIcon className={classes.linkIcon} />
|
||||||
<Text lineClamp={1} maw={showLinks ? '160px' : '200px'}>
|
<Text lineClamp={1} maw={'200px'} style={{ wordBreak: 'break-all' }}>
|
||||||
{collection.name}
|
{collection.name}
|
||||||
</Text>
|
</Text>
|
||||||
{showLinks && (
|
{showLinks && (
|
||||||
<Text c="var(--mantine-color-gray-5)" ml="xs">
|
<Text
|
||||||
— {linksCount}
|
style={{ whiteSpace: 'nowrap' }}
|
||||||
|
c="var(--mantine-color-gray-5)"
|
||||||
|
ml={4}
|
||||||
|
>
|
||||||
|
— {linksCount}0
|
||||||
</Text>
|
</Text>
|
||||||
)}
|
)}
|
||||||
</Link>
|
</Link>
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ export function DashboardHeader({ navbar, aside }: DashboardHeaderProps) {
|
|||||||
hiddenFrom="sm"
|
hiddenFrom="sm"
|
||||||
size="sm"
|
size="sm"
|
||||||
/>
|
/>
|
||||||
<Box w="50%">
|
<Box>
|
||||||
<Text lineClamp={1}>
|
<Text lineClamp={1}>
|
||||||
{activeCollection?.name}{' '}
|
{activeCollection?.name}{' '}
|
||||||
{activeCollection?.visibility === Visibility.PUBLIC && (
|
{activeCollection?.visibility === Visibility.PUBLIC && (
|
||||||
|
|||||||
@@ -14,7 +14,13 @@ export const FavoriteItem = ({ link }: { link: LinkWithCollection }) => (
|
|||||||
<Text lineClamp={1} c="blue">
|
<Text lineClamp={1} c="blue">
|
||||||
{link.name}
|
{link.name}
|
||||||
</Text>
|
</Text>
|
||||||
<Text c="gray" size="xs" mb={4} lineClamp={1}>
|
<Text
|
||||||
|
c="gray"
|
||||||
|
size="xs"
|
||||||
|
mb={4}
|
||||||
|
lineClamp={1}
|
||||||
|
style={{ wordBreak: 'break-all' }}
|
||||||
|
>
|
||||||
{link.collection.name}
|
{link.collection.name}
|
||||||
</Text>
|
</Text>
|
||||||
</Flex>
|
</Flex>
|
||||||
|
|||||||
Reference in New Issue
Block a user