fix: open folder in new tab
This commit is contained in:
parent
bcd68ae98b
commit
eb2713bc23
1 changed files with 55 additions and 42 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue