Skip to content

Commit

Permalink
fix: UI issues in Safari
Browse files Browse the repository at this point in the history
  • Loading branch information
bouassaba committed Jul 1, 2024
1 parent b4d81f4 commit 03d89f3
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 70 deletions.
2 changes: 1 addition & 1 deletion ui/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ export default [
},
},
{
ignores: ['*.cjs'],
ignores: ['*.cjs', 'dist'],
},
]
63 changes: 0 additions & 63 deletions ui/src/components/common/orb.tsx

This file was deleted.

4 changes: 2 additions & 2 deletions ui/src/components/file/file-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import {
IconSecurity,
IconSelectCheckBox,
IconUpload,
IconVisibility,
} from '@/lib/components/icons'
import downloadFile from '@/lib/helpers/download-file'
import {
Expand All @@ -55,7 +56,6 @@ import { modalDidOpen as mosaicModalDidOpen } from '@/store/ui/mosaic'
import { listModalDidOpen } from '@/store/ui/snapshots'
import { drawerDidOpen } from '@/store/ui/uploads'
import { modalDidOpen as watermarkModalDidOpen } from '@/store/ui/watermark'
import Orb from '../common/orb'

export type FileMenuProps = {
isOpen?: boolean
Expand Down Expand Up @@ -236,7 +236,7 @@ const FileMenu = ({
<MenuOptionGroup>
{isInsightsAuthorized ? (
<MenuItem
icon={<Orb width="16px" height="16px" />}
icon={<IconVisibility />}
onClick={(event: MouseEvent) => {
event.stopPropagation()
dispatch(insightsModalDidOpen())
Expand Down
6 changes: 5 additions & 1 deletion ui/src/components/file/list/item/icon/icon-diverse/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,11 @@ const IconDiverse = ({ file, scale }: IconFontProps) => {
}

return (
<img src={image} style={{ width: `${width}px`, height: `${height}px` }} />
<img
src={image}
className="pointer-events-none select-none"
style={{ width: `${width}px`, height: `${height}px` }}
/>
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const IconFolder = ({ file, scale, isLoading }: IconFolderProps) => {
<>
<img
src={FolderSvg}
className="pointer-events-none select-none"
style={{ width: `${width}px`, height: `${height}px` }}
/>
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const IconThumbnail = ({ file, scale }: IconThumbnailProps) => {
}}
className={cx(
'pointer-events-none',
'select-none',
'object-cover',
'border',
'border-solid',
Expand Down
6 changes: 3 additions & 3 deletions ui/src/components/file/list/item/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ const ListItem = ({
'transition',
'duration-400',
'ease-in-out',
{ 'bg-transparent': !isChecked },
{ 'bg-transparent': !isChecked && !isDragging },
'rounded-md',
'select-none',
'cursor-default',
Expand All @@ -154,8 +154,8 @@ const ListItem = ({
'active:gray-200',
'active:dark:gray-600',
{
'bg-gray-100': isChecked,
'dark:bg-gray-700': isChecked,
'bg-gray-100': isChecked || isDragging,
'dark:bg-gray-700': isChecked || isDragging,
},
'border-2',
{
Expand Down

0 comments on commit 03d89f3

Please sign in to comment.