refactor: only show open filesend menu option on mobile
This commit is contained in:
@@ -14,6 +14,7 @@ import { ApplicationGroup } from '@/Application/ApplicationGroup'
|
||||
import { formatLastSyncDate } from '@/Utils/DateUtils'
|
||||
import Spinner from '@/Components/Spinner/Spinner'
|
||||
import { MenuItemIconSize } from '@/Constants/TailwindClassNames'
|
||||
import { MutuallyExclusiveMediaQueryBreakpoints, useMediaQuery } from '@/Hooks/useMediaQuery'
|
||||
|
||||
type Props = {
|
||||
viewControllerManager: ViewControllerManager
|
||||
@@ -98,6 +99,8 @@ const GeneralAccountMenu: FunctionComponent<Props> = ({
|
||||
const CREATE_ACCOUNT_INDEX = 1
|
||||
const SWITCHER_INDEX = 0
|
||||
|
||||
const isMobileScreen = useMediaQuery(MutuallyExclusiveMediaQueryBreakpoints.sm)
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="mt-1 mb-1 flex items-center justify-between px-3">
|
||||
@@ -183,10 +186,12 @@ const GeneralAccountMenu: FunctionComponent<Props> = ({
|
||||
</div>
|
||||
<span className="text-neutral">v{application.version}</span>
|
||||
</MenuItem>
|
||||
<MenuItem onClick={openFileSend}>
|
||||
<Icon type="open-in" className={iconClassName} />
|
||||
Open FileSend
|
||||
</MenuItem>
|
||||
{isMobileScreen && (
|
||||
<MenuItem onClick={openFileSend}>
|
||||
<Icon type="open-in" className={iconClassName} />
|
||||
Open FileSend
|
||||
</MenuItem>
|
||||
)}
|
||||
<MenuItem onClick={() => viewControllerManager.isImportModalVisible.set(true)}>
|
||||
<Icon type="archive" className={iconClassName} />
|
||||
Import
|
||||
|
||||
Reference in New Issue
Block a user