fix: open folder in new tab

This commit is contained in:
diced 2023-03-20 22:25:56 -07:00
parent bcd68ae98b
commit eb2713bc23
No known key found for this signature in database
GPG key ID: 370BD1BA142842D1

View file

@ -4,6 +4,7 @@ import { useModals } from '@mantine/modals';
import { showNotification } from '@mantine/notifications';
import {
IconClipboardCopy,
IconExternalLink,
IconFiles,
IconFolderMinus,
IconFolderPlus,
@ -154,6 +155,7 @@ export default function Folders({ disableMediaPreview, exifEnabled, compress })
</Stack>
</Group>
<Group>
<Stack>
<Tooltip label={folder.public ? 'Make folder private' : 'Make folder public'}>
<ActionIcon
aria-label={folder.public ? 'make private' : 'make public'}
@ -162,6 +164,13 @@ export default function Folders({ disableMediaPreview, exifEnabled, compress })
{folder.public ? <IconLock size='1rem' /> : <IconLockOpen size='1rem' />}
</ActionIcon>
</Tooltip>
<Tooltip label='Delete folder'>
<ActionIcon aria-label='delete' onClick={() => deleteFolder(folder)}>
<IconFolderMinus size='1rem' />
</ActionIcon>
</Tooltip>
</Stack>
<Stack>
<ActionIcon
aria-label='view files'
onClick={() => {
@ -196,9 +205,13 @@ export default function Folders({ disableMediaPreview, exifEnabled, compress })
>
<IconClipboardCopy size='1rem' />
</ActionIcon>
<ActionIcon aria-label='delete' onClick={() => deleteFolder(folder)}>
<IconFolderMinus size='1rem' />
<ActionIcon
aria-label='open in new tab'
onClick={() => window.open(`/folder/${folder.id}`)}
>
<IconExternalLink size='1rem' />
</ActionIcon>
</Stack>
</Group>
</Group>
</Card>